mlxsmith 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mlxsmith/bench.py +12 -2
- mlxsmith/cli.py +187 -1
- mlxsmith/config_models.py +15 -1
- mlxsmith/integrations/__init__.py +19 -0
- mlxsmith/integrations/mlx_lm_lora.py +117 -0
- mlxsmith/llm/backend.py +8 -1
- mlxsmith/llm/mlx_lm_backend.py +59 -2
- mlxsmith/llm/mock_backend.py +8 -1
- mlxsmith/optim/__init__.py +3 -0
- mlxsmith/optim/muon.py +93 -0
- mlxsmith/orchestrator/daemon.py +44 -377
- mlxsmith/orchestrator/trainer_worker.py +4 -0
- mlxsmith/rlm/loop.py +53 -92
- mlxsmith/sdk/__init__.py +18 -2
- mlxsmith/sdk/losses.py +102 -1
- mlxsmith/sdk/training_client.py +24 -5
- mlxsmith/train/distill.py +6 -1
- mlxsmith/train/online_dpo.py +249 -0
- mlxsmith/train/pref.py +31 -29
- mlxsmith/train/rft.py +123 -38
- mlxsmith/train/self_verify.py +199 -0
- mlxsmith/train/sft.py +13 -2
- mlxsmith/verifiers/llm_judge.py +278 -0
- mlxsmith/verifiers/prime.py +127 -0
- {mlxsmith-0.1.2.dist-info → mlxsmith-0.1.3.dist-info}/METADATA +27 -1
- {mlxsmith-0.1.2.dist-info → mlxsmith-0.1.3.dist-info}/RECORD +30 -22
- {mlxsmith-0.1.2.dist-info → mlxsmith-0.1.3.dist-info}/WHEEL +0 -0
- {mlxsmith-0.1.2.dist-info → mlxsmith-0.1.3.dist-info}/entry_points.txt +0 -0
- {mlxsmith-0.1.2.dist-info → mlxsmith-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {mlxsmith-0.1.2.dist-info → mlxsmith-0.1.3.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mlxsmith
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Apple Silicon MLX fine-tuning toolkit — SFT, DPO/ORPO, GRPO, distillation, and OpenAI-compatible serving.
|
|
5
5
|
Author-email: Shannon Labs <hmbown@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -36,6 +36,8 @@ Provides-Extra: llm
|
|
|
36
36
|
Requires-Dist: mlx-lm>=0.30.5; extra == "llm"
|
|
37
37
|
Requires-Dist: transformers>=5.0.0; extra == "llm"
|
|
38
38
|
Requires-Dist: datasets>=3.0.0; extra == "llm"
|
|
39
|
+
Provides-Extra: lora
|
|
40
|
+
Requires-Dist: mlx-lm-lora>=1.0.0; extra == "lora"
|
|
39
41
|
Provides-Extra: serve
|
|
40
42
|
Requires-Dist: fastapi>=0.128.0; extra == "serve"
|
|
41
43
|
Requires-Dist: uvicorn>=0.40.0; extra == "serve"
|
|
@@ -46,6 +48,7 @@ Requires-Dist: ruff>=0.14.0; extra == "dev"
|
|
|
46
48
|
Provides-Extra: all
|
|
47
49
|
Requires-Dist: mlx>=0.30.4; extra == "all"
|
|
48
50
|
Requires-Dist: mlx-lm>=0.30.5; extra == "all"
|
|
51
|
+
Requires-Dist: mlx-lm-lora>=1.0.0; extra == "all"
|
|
49
52
|
Requires-Dist: transformers>=5.0.0; extra == "all"
|
|
50
53
|
Requires-Dist: datasets>=3.0.0; extra == "all"
|
|
51
54
|
Requires-Dist: fastapi>=0.128.0; extra == "all"
|
|
@@ -74,6 +77,9 @@ pip install mlxsmith
|
|
|
74
77
|
# Apple Silicon training + serving
|
|
75
78
|
pip install "mlxsmith[mlx,llm,serve]"
|
|
76
79
|
|
|
80
|
+
# mlx-lm-lora passthrough (advanced training methods)
|
|
81
|
+
pip install "mlxsmith[lora]"
|
|
82
|
+
|
|
77
83
|
# Everything
|
|
78
84
|
pip install "mlxsmith[all]"
|
|
79
85
|
```
|
|
@@ -131,6 +137,22 @@ mlxsmith distill --teacher large-model --student small-model --mode opd
|
|
|
131
137
|
mlxsmith pipeline
|
|
132
138
|
```
|
|
133
139
|
|
|
140
|
+
### mlx-lm-lora parity (all methods)
|
|
141
|
+
|
|
142
|
+
Use the passthrough to access mlx-lm-lora features (DPO variants, GRPO variants,
|
|
143
|
+
PPO, synthetic datasets, judge training, etc.):
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Train with mlx-lm-lora directly
|
|
147
|
+
mlxsmith lora train --model Qwen/Qwen3-4B-Instruct-2507 --data data/prefs --train-mode dpo -- --beta 0.1
|
|
148
|
+
|
|
149
|
+
# Generate synthetic datasets
|
|
150
|
+
mlxsmith lora synthetic prompts -- --model mlx-community/Qwen3-4B-Instruct-2507-4bit --num-samples 1000
|
|
151
|
+
|
|
152
|
+
# Train judge model
|
|
153
|
+
mlxsmith lora judge -- --model mlx-community/Qwen3-4B-Instruct-2507-4bit --data data/prefs
|
|
154
|
+
```
|
|
155
|
+
|
|
134
156
|
## Serving
|
|
135
157
|
|
|
136
158
|
OpenAI-compatible `/v1/chat/completions` endpoint.
|
|
@@ -202,6 +224,7 @@ Built-in verifiers for eval, RFT, and preference tuning:
|
|
|
202
224
|
- **pytest** — sandboxed test execution
|
|
203
225
|
- **docker** — containerized verification
|
|
204
226
|
- **compose** — multi-verifier composition (AND/OR/weighted)
|
|
227
|
+
- **llm_judge** — LLM-based self-verification / ThinkPRM-style verifier
|
|
205
228
|
|
|
206
229
|
See `docs/VERIFIERS.md` for the verifier API.
|
|
207
230
|
|
|
@@ -230,6 +253,9 @@ mlxsmith config env # show environment variable mapping
|
|
|
230
253
|
|
|
231
254
|
Config sources (in priority order): CLI flags > environment variables (`MLXSMITH__SECTION__KEY`) > config file > defaults.
|
|
232
255
|
|
|
256
|
+
Training optimizers are configurable via `train.optimizer` and `train.optimizer_kwargs`
|
|
257
|
+
(for example `adamw`, `adam`, `qhadam`, `muon` when available in MLX).
|
|
258
|
+
|
|
233
259
|
## SDK (programmatic API)
|
|
234
260
|
|
|
235
261
|
For building custom training loops:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
mlxsmith/__init__.py,sha256=CJZKl9Hp16DYlQR7yqstir-cL4n7GCw90d-meXliCHk,48
|
|
2
2
|
mlxsmith/adapters.py,sha256=wkQ2q_ugaxCviNARSmxehwBcc2_NKVJ7mOofT-y30TY,1318
|
|
3
3
|
mlxsmith/auth.py,sha256=_j_gx5ccZfpHs0_Xmpcgh_ELhX3ZBJLg2YYpjA-aPRI,2195
|
|
4
|
-
mlxsmith/bench.py,sha256=
|
|
5
|
-
mlxsmith/cli.py,sha256=
|
|
4
|
+
mlxsmith/bench.py,sha256=b2hNRT_lT1dhjlOr_5vn1HIk6dTz3CmtrrP3Qypu6bc,4048
|
|
5
|
+
mlxsmith/cli.py,sha256=GpG-4B8R_dIp73hbl_P5Tii5ARbEzeeubI0y2YCFFBE,42935
|
|
6
6
|
mlxsmith/config.py,sha256=K1VbN-3WoWf4vzZ6BNeTgEz2DFH8s9YminqwyNBVLj0,16389
|
|
7
|
-
mlxsmith/config_models.py,sha256=
|
|
7
|
+
mlxsmith/config_models.py,sha256=c51kbH57Nlj7iO5haGqsXS7ZSoHTMJCEiRGMd62LMOM,8912
|
|
8
8
|
mlxsmith/data.py,sha256=3ZlNS8bnD7LlWACEmULbf8RGQzCuf0QulFpI1PWvNuI,16160
|
|
9
9
|
mlxsmith/eval.py,sha256=nSARSEKKwZM8Ot5rUDDpGikaClGNxvg0ifgGkTA6mM0,3792
|
|
10
10
|
mlxsmith/infer.py,sha256=ekpHhTird0dnTJzFOc-O98rjwkEKgAr9AFicKlaB3MA,4610
|
|
@@ -21,48 +21,56 @@ mlxsmith/api/schemas.py,sha256=Q18kF9FKtvT1vdnXy6feSNTtCV2FiRWDzfdsPzc0te8,19316
|
|
|
21
21
|
mlxsmith/envs/__init__.py,sha256=t7QiEHtfyP1dUCj-4TJUN0hd9lRqBKYd5Ek7dgEwus4,671
|
|
22
22
|
mlxsmith/envs/system.py,sha256=2bChkOxm2S7d0WCrweHGhoI6-xOYDxlC0YbHH6Ibjq4,12782
|
|
23
23
|
mlxsmith/envs/token_env.py,sha256=rhv2o3eI1GyTtfAXG72z-31amNGaLv0KW56mEsWkXlY,6709
|
|
24
|
+
mlxsmith/integrations/__init__.py,sha256=TjPvsGDnw-nma0OHXqiUPWciKhCiLZ325_j3fsgtjnE,685
|
|
25
|
+
mlxsmith/integrations/mlx_lm_lora.py,sha256=KXyoqzWbBR2XEAlJuHHr-x2SwEgKJsOZUA--hdQfEwc,3296
|
|
24
26
|
mlxsmith/llm/__init__.py,sha256=jWEkXGdvwZ8tUYHVqWW3SYHXG-LSWaGbdwOR0mF_4Zw,396
|
|
25
|
-
mlxsmith/llm/backend.py,sha256=
|
|
27
|
+
mlxsmith/llm/backend.py,sha256=m0TdgtNWBbwzsB9riHu1sKWuXnNAVkRbHrv1RZI3XZA,4458
|
|
26
28
|
mlxsmith/llm/interface.py,sha256=udQl_R7ecmM4Nh20P50Nmnv2h853ByrgevjQIRDxX4g,6601
|
|
27
|
-
mlxsmith/llm/mlx_lm_backend.py,sha256=
|
|
28
|
-
mlxsmith/llm/mock_backend.py,sha256=
|
|
29
|
+
mlxsmith/llm/mlx_lm_backend.py,sha256=Obop9oFmuncxaNty7QnykGai_Ed55JbQrgjjQLhq4W8,20278
|
|
30
|
+
mlxsmith/llm/mock_backend.py,sha256=4xFjU-36ewZZTMMhf5IEDLcRDYw2IsNhpHt8gn-ZOz4,7562
|
|
29
31
|
mlxsmith/llm/registry.py,sha256=ZmYE-WclyMo6z0HwUufqt3tKT4E84xZ6I-PFu1Z5nws,309
|
|
32
|
+
mlxsmith/optim/__init__.py,sha256=60kanLQV28xaVe2xR7M__r0IhFjfFkDuzHjFC3K6Z3g,65
|
|
33
|
+
mlxsmith/optim/muon.py,sha256=h0ZNnR3EITlYFfb_7HtpnFnPWc0nvtT9mYqr-GThLbk,2857
|
|
30
34
|
mlxsmith/orchestrator/__init__.py,sha256=oc4qIkISZMGMvYeOqU8lDDmFL3uxDYJHsv_rra9DH-E,792
|
|
31
|
-
mlxsmith/orchestrator/daemon.py,sha256=
|
|
35
|
+
mlxsmith/orchestrator/daemon.py,sha256=_kTQ8QKIDPoo2znlHtB8jjsLbvbQ0m_EkxWspit1uGQ,3960
|
|
32
36
|
mlxsmith/orchestrator/inference_worker.py,sha256=PfmsanrBnx9HZNqG00jTQQTKqDa2bl-wUtYAWtxfzvs,17963
|
|
33
37
|
mlxsmith/orchestrator/queue.py,sha256=E8VymvJi2zEpuTwsG7JB-vROJGGS5evPPhIpkmdwtq4,11286
|
|
34
|
-
mlxsmith/orchestrator/trainer_worker.py,sha256=
|
|
38
|
+
mlxsmith/orchestrator/trainer_worker.py,sha256=MssjXrUcB7bOyajuP8W1eokibCrC0GTTGGeHAmiSXxg,16215
|
|
35
39
|
mlxsmith/rlm/__init__.py,sha256=Q09oRONXWTFXuWwMJOpGWg0I-UDkuib0OA1O_cNFp2U,236
|
|
36
40
|
mlxsmith/rlm/corpus.py,sha256=-p12H650_ybe2kXC219M4wXYpD08QHUpY92ErVjSfX8,2112
|
|
37
41
|
mlxsmith/rlm/gating.py,sha256=L18niYKEezphASdsgzW6pz3PN7ylA-L5Wu4_GLLVfHw,2455
|
|
38
42
|
mlxsmith/rlm/generate.py,sha256=q1v_TP8sqVj05omhoF60Ns1iX6yClgc7lP6njz4lK18,7601
|
|
39
43
|
mlxsmith/rlm/history.py,sha256=Vm4JtWqsZnqB-fuo3zWfweeogmmLTL3VHaYZ45vrkz8,299
|
|
40
44
|
mlxsmith/rlm/inference.py,sha256=ntCEKxD1KrkIXgZNQbD4jhS5rJPtwcVYc8qLc5E5cnc,5297
|
|
41
|
-
mlxsmith/rlm/loop.py,sha256=
|
|
45
|
+
mlxsmith/rlm/loop.py,sha256=hfajubtzBnwBof_ZE41sdKFY4G8WXu16dr8m-gNJFO0,47853
|
|
42
46
|
mlxsmith/rlm/mutate.py,sha256=_NUNMpVCRaEDgtzI8J2NOTcj5NnycZnP_UoUpFacjTs,2553
|
|
43
47
|
mlxsmith/rlm/trainer.py,sha256=RRXPlJy4SySpLZGge0ORMYs7HeiWgfGQNeMBOBfG4Ys,3014
|
|
44
48
|
mlxsmith/rlm/weights.py,sha256=tgl4Uc80QF9YpCCr3ewBmL7uru9As2fDA1Z1SgZn-e4,8455
|
|
45
|
-
mlxsmith/sdk/__init__.py,sha256=
|
|
49
|
+
mlxsmith/sdk/__init__.py,sha256=QzwWDSjtVi2iewp-hUI3MfE85xX3oK3PlrYXSAUAzBE,11105
|
|
46
50
|
mlxsmith/sdk/future.py,sha256=WmYB-fDstaEuv-FUNX_S7IJSENbVEsYYEEVzH02ImLk,16868
|
|
47
|
-
mlxsmith/sdk/losses.py,sha256=
|
|
51
|
+
mlxsmith/sdk/losses.py,sha256=Cq2udU9S1fn-glV-RRZBe1_4BtPqjzjucWiTy2cnClY,10243
|
|
48
52
|
mlxsmith/sdk/sampling_client.py,sha256=o7jfgYpVWXrrIHo4-SrGAJx4FAlYdo198da27Jp0Yj4,24899
|
|
49
|
-
mlxsmith/sdk/training_client.py,sha256=
|
|
53
|
+
mlxsmith/sdk/training_client.py,sha256=XVpl5kbpmpKWu-vecyMDJhf0zvoqQQiTpawqokU9ejE,24924
|
|
50
54
|
mlxsmith/train/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
|
-
mlxsmith/train/distill.py,sha256=
|
|
55
|
+
mlxsmith/train/distill.py,sha256=2yOr0QrSyQ3ZYEMtrtgb32rzVGvc-z_wLY9sxPuwUCY,10513
|
|
52
56
|
mlxsmith/train/lora.py,sha256=k3aNqBjMyE6rPGS2CAJRSDsTJiUa1ztjrA3k9N87IjY,9046
|
|
53
|
-
mlxsmith/train/
|
|
54
|
-
mlxsmith/train/
|
|
55
|
-
mlxsmith/train/
|
|
57
|
+
mlxsmith/train/online_dpo.py,sha256=48RPHyIeTUP3dtLsgHgPrLwDwf80Fjwa1Tdspt9R3L4,8837
|
|
58
|
+
mlxsmith/train/pref.py,sha256=1g3w5OS7evxP33bFPpF_oKjwxUiqpA5mhD-t6iWA6uw,6646
|
|
59
|
+
mlxsmith/train/rft.py,sha256=w7k8a_QYot7zCZAsI73vuuxIJJzrBuX9ot9TXmWsuYg,21957
|
|
60
|
+
mlxsmith/train/self_verify.py,sha256=dxoSBsIFt3mgMie3esr2v2qEdAw7ZMGZ8Cui6iADP7g,6994
|
|
61
|
+
mlxsmith/train/sft.py,sha256=naf2ny8kQQDU31TQZMBxC_9X6T0TajYtE7bofHgFw2o,5897
|
|
56
62
|
mlxsmith/verifiers/__init__.py,sha256=HXS9XWsPUYZ9WJaxVIPa1TWzwx948uymj23YIu4EW6Q,60
|
|
57
63
|
mlxsmith/verifiers/compose.py,sha256=jQlsBByNvniEsOVh8Ulvjb7L-VcPrxqjld5b1sjBc8c,3374
|
|
58
64
|
mlxsmith/verifiers/docker_verifier.py,sha256=BIqu2VVLsC8owNpiNbOZNmTirfpvuWNJS4F6UZYni1s,2925
|
|
59
65
|
mlxsmith/verifiers/jsonschema.py,sha256=hG_8c07Hwv-tpN2g0oxELwmLRxS8QGzRFwabmo4yY8Y,1324
|
|
66
|
+
mlxsmith/verifiers/llm_judge.py,sha256=g95reNiZ_oYsd4CNo7lViYk2UScMjmDT_qn3ztUnf9o,8557
|
|
67
|
+
mlxsmith/verifiers/prime.py,sha256=1CAJSmqMLxh8GTNyBeZDxPBn3h-R02qtDwjgKumhyTE,3946
|
|
60
68
|
mlxsmith/verifiers/pytest_verifier.py,sha256=ARNajzxUPNwtzSow6I2d0mLopZyvY29_d3F1sYVwEUY,2514
|
|
61
69
|
mlxsmith/verifiers/regex.py,sha256=N7z3koE8Iy-a4DBs4404iQCNX2WGxequm5g4umric2Y,524
|
|
62
70
|
mlxsmith/verifiers/types.py,sha256=FytBxB1OnNX1EcqZXSSs3WvL0GRv7byW4mfBMf6xP68,240
|
|
63
|
-
mlxsmith-0.1.
|
|
64
|
-
mlxsmith-0.1.
|
|
65
|
-
mlxsmith-0.1.
|
|
66
|
-
mlxsmith-0.1.
|
|
67
|
-
mlxsmith-0.1.
|
|
68
|
-
mlxsmith-0.1.
|
|
71
|
+
mlxsmith-0.1.3.dist-info/licenses/LICENSE,sha256=ESYyLizI0WWtxMeS7rGVcX3ivMezm-HOd5WdeOh-9oU,1056
|
|
72
|
+
mlxsmith-0.1.3.dist-info/METADATA,sha256=oVGtFReV_z88H31sGtEwBvyRVbJATH0vEhtxKad9z9o,9970
|
|
73
|
+
mlxsmith-0.1.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
74
|
+
mlxsmith-0.1.3.dist-info/entry_points.txt,sha256=ys7GcKEjhzhkkTMBmmaNavTgsjqOuFnCKIG2w8Wcn6w,46
|
|
75
|
+
mlxsmith-0.1.3.dist-info/top_level.txt,sha256=hKBwc8bn7uoI-_5Yhcq1T3IuChFhUFdzItIkZK1up6A,9
|
|
76
|
+
mlxsmith-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|