mlxsmith 0.1.1__py3-none-any.whl → 0.1.2__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/accel/__init__.py +0 -3
- mlxsmith/cli.py +1 -2
- mlxsmith/config_models.py +1 -1
- mlxsmith/util.py +0 -6
- {mlxsmith-0.1.1.dist-info → mlxsmith-0.1.2.dist-info}/METADATA +3 -13
- {mlxsmith-0.1.1.dist-info → mlxsmith-0.1.2.dist-info}/RECORD +10 -11
- mlxsmith/accel/zmlx_backend.py +0 -42
- {mlxsmith-0.1.1.dist-info → mlxsmith-0.1.2.dist-info}/WHEEL +0 -0
- {mlxsmith-0.1.1.dist-info → mlxsmith-0.1.2.dist-info}/entry_points.txt +0 -0
- {mlxsmith-0.1.1.dist-info → mlxsmith-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {mlxsmith-0.1.1.dist-info → mlxsmith-0.1.2.dist-info}/top_level.txt +0 -0
mlxsmith/accel/__init__.py
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from .none import NoneBackend
|
|
3
|
-
from .zmlx_backend import ZMLXBackend
|
|
4
3
|
|
|
5
4
|
def get_backend(name: str):
|
|
6
5
|
if name == "none":
|
|
7
6
|
return NoneBackend()
|
|
8
|
-
if name == "zmlx":
|
|
9
|
-
return ZMLXBackend()
|
|
10
7
|
raise ValueError(f"Unknown accel backend: {name}")
|
mlxsmith/cli.py
CHANGED
|
@@ -83,7 +83,6 @@ def doctor():
|
|
|
83
83
|
table.add_row("cpu_count", str(info.cpu_count))
|
|
84
84
|
table.add_row("metal", str(info.has_metal))
|
|
85
85
|
table.add_row("mlx", f"{info.has_mlx} {info.mlx_version or ''}".strip())
|
|
86
|
-
table.add_row("zmlx", str(info.has_zmlx))
|
|
87
86
|
console.print(table)
|
|
88
87
|
|
|
89
88
|
|
|
@@ -729,7 +728,7 @@ def rlm_history(limit: int = typer.Option(10, "--limit")):
|
|
|
729
728
|
|
|
730
729
|
@accel_app.command("status")
|
|
731
730
|
def accel_status():
|
|
732
|
-
backends = ["none"
|
|
731
|
+
backends = ["none"]
|
|
733
732
|
table = Table(title="mlxsmith accel status")
|
|
734
733
|
table.add_column("backend")
|
|
735
734
|
table.add_column("available")
|
mlxsmith/config_models.py
CHANGED
mlxsmith/util.py
CHANGED
|
@@ -46,7 +46,6 @@ class SystemInfo:
|
|
|
46
46
|
has_metal: Optional[bool]
|
|
47
47
|
has_mlx: bool
|
|
48
48
|
mlx_version: Optional[str]
|
|
49
|
-
has_zmlx: bool
|
|
50
49
|
|
|
51
50
|
def detect_system() -> SystemInfo:
|
|
52
51
|
has_mlx = False
|
|
@@ -58,10 +57,6 @@ def detect_system() -> SystemInfo:
|
|
|
58
57
|
except Exception:
|
|
59
58
|
pass
|
|
60
59
|
|
|
61
|
-
import importlib.util
|
|
62
|
-
|
|
63
|
-
has_zmlx = importlib.util.find_spec("zmlx") is not None
|
|
64
|
-
|
|
65
60
|
# Metal detection (best-effort): on macOS we assume Metal is present; for CI, this is not reliable.
|
|
66
61
|
has_metal = None
|
|
67
62
|
if sys.platform == "darwin":
|
|
@@ -83,7 +78,6 @@ def detect_system() -> SystemInfo:
|
|
|
83
78
|
has_metal=has_metal,
|
|
84
79
|
has_mlx=has_mlx,
|
|
85
80
|
mlx_version=mlx_version,
|
|
86
|
-
has_zmlx=has_zmlx,
|
|
87
81
|
)
|
|
88
82
|
|
|
89
83
|
def require(cond: bool, msg: str):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mlxsmith
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
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
|
|
@@ -40,8 +40,6 @@ Provides-Extra: serve
|
|
|
40
40
|
Requires-Dist: fastapi>=0.128.0; extra == "serve"
|
|
41
41
|
Requires-Dist: uvicorn>=0.40.0; extra == "serve"
|
|
42
42
|
Requires-Dist: httpx>=0.28.0; extra == "serve"
|
|
43
|
-
Provides-Extra: zmlx
|
|
44
|
-
Requires-Dist: zmlx; extra == "zmlx"
|
|
45
43
|
Provides-Extra: dev
|
|
46
44
|
Requires-Dist: pytest>=9.0.0; extra == "dev"
|
|
47
45
|
Requires-Dist: ruff>=0.14.0; extra == "dev"
|
|
@@ -59,7 +57,7 @@ Dynamic: license-file
|
|
|
59
57
|
|
|
60
58
|
Apple Silicon MLX fine-tuning toolkit — SFT, DPO/ORPO, GRPO, distillation, and OpenAI-compatible serving.
|
|
61
59
|
|
|
62
|
-
**Status:** alpha (v0.1.
|
|
60
|
+
**Status:** alpha (v0.1.2). Full training pipeline validated on Qwen3-4B.
|
|
63
61
|
|
|
64
62
|
## Install
|
|
65
63
|
|
|
@@ -85,7 +83,7 @@ pip install "mlxsmith[all]"
|
|
|
85
83
|
```bash
|
|
86
84
|
mlxsmith init myproj
|
|
87
85
|
cd myproj
|
|
88
|
-
mlxsmith doctor # check Python, MLX, Metal
|
|
86
|
+
mlxsmith doctor # check Python, MLX, Metal
|
|
89
87
|
```
|
|
90
88
|
|
|
91
89
|
## Training
|
|
@@ -269,14 +267,6 @@ mlxsmith rlm history # view history
|
|
|
269
267
|
|
|
270
268
|
Includes task generation, mutation for data diversity, corpus management, EMA-based gating, and weight pointer IPC for multi-process coordination. See `docs/orchestrator.md`.
|
|
271
269
|
|
|
272
|
-
### ZMLX acceleration
|
|
273
|
-
|
|
274
|
-
Optional zero-copy MLX acceleration backend.
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
mlxsmith accel status
|
|
278
|
-
```
|
|
279
|
-
|
|
280
270
|
## Docs
|
|
281
271
|
|
|
282
272
|
- `docs/PROJECT_FORMAT.md` — project layout and artifacts
|
|
@@ -2,20 +2,19 @@ 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
4
|
mlxsmith/bench.py,sha256=VBgY9uOGm3xhmL3UrNNOnUoa3P0yaVQQ7wxykIEmDEw,3778
|
|
5
|
-
mlxsmith/cli.py,sha256=
|
|
5
|
+
mlxsmith/cli.py,sha256=MAS21bSz4DTkdMAao99KdtI0FtZFUEVQatSsS7VHPQ0,35713
|
|
6
6
|
mlxsmith/config.py,sha256=K1VbN-3WoWf4vzZ6BNeTgEz2DFH8s9YminqwyNBVLj0,16389
|
|
7
|
-
mlxsmith/config_models.py,sha256=
|
|
7
|
+
mlxsmith/config_models.py,sha256=x827pTs-SfPyqXI3mPR6h-cz7KQ69zQICPAaeGlW-A4,8399
|
|
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
|
|
11
11
|
mlxsmith/models.py,sha256=BRaPTxzqy-5KEKdccveMgjpbRP0ZmbRnA_su8rz2P4k,8033
|
|
12
12
|
mlxsmith/runs.py,sha256=2voYBryGGMlAKskHJ7TDiIPQL2_fFxSQ8RgtfGZ7ccg,1409
|
|
13
13
|
mlxsmith/server.py,sha256=Fk-i9xK_Teq0Z0m-W1GRJVtcG0nYvd4bQ85lnAUuT1w,10690
|
|
14
|
-
mlxsmith/util.py,sha256=
|
|
15
|
-
mlxsmith/accel/__init__.py,sha256=
|
|
14
|
+
mlxsmith/util.py,sha256=Cke2FxIVNmvpW9ElPxL5bc0JO_YFVHWtBwpR3QRtfWQ,4410
|
|
15
|
+
mlxsmith/accel/__init__.py,sha256=fBY65q66jql1q5YMT9aIo96dgvVLHqS_LoJbVNA2xHY,201
|
|
16
16
|
mlxsmith/accel/base.py,sha256=o0kmxV68KbxOmucC3eDjKbFA8dfTT2ETqN0XD_l3mM0,435
|
|
17
17
|
mlxsmith/accel/none.py,sha256=WhxECIBv-pE63Vh1Iv86ObgT9JHOi4hA4BUyJc__sKU,362
|
|
18
|
-
mlxsmith/accel/zmlx_backend.py,sha256=JfzQ44v9hrCJgcqU018ZD7qLNlubIe09CwYRpKyfwR8,1529
|
|
19
18
|
mlxsmith/api/__init__.py,sha256=IrpIXDkUJm4BZqahYOK_0BkxvomlscEvCoLCm4GDxo8,998
|
|
20
19
|
mlxsmith/api/handlers.py,sha256=94Spq4glFp7mRwmKrFqt7erd1Af_PxVP_vpxCo2UFdQ,46896
|
|
21
20
|
mlxsmith/api/schemas.py,sha256=Q18kF9FKtvT1vdnXy6feSNTtCV2FiRWDzfdsPzc0te8,19316
|
|
@@ -61,9 +60,9 @@ mlxsmith/verifiers/jsonschema.py,sha256=hG_8c07Hwv-tpN2g0oxELwmLRxS8QGzRFwabmo4y
|
|
|
61
60
|
mlxsmith/verifiers/pytest_verifier.py,sha256=ARNajzxUPNwtzSow6I2d0mLopZyvY29_d3F1sYVwEUY,2514
|
|
62
61
|
mlxsmith/verifiers/regex.py,sha256=N7z3koE8Iy-a4DBs4404iQCNX2WGxequm5g4umric2Y,524
|
|
63
62
|
mlxsmith/verifiers/types.py,sha256=FytBxB1OnNX1EcqZXSSs3WvL0GRv7byW4mfBMf6xP68,240
|
|
64
|
-
mlxsmith-0.1.
|
|
65
|
-
mlxsmith-0.1.
|
|
66
|
-
mlxsmith-0.1.
|
|
67
|
-
mlxsmith-0.1.
|
|
68
|
-
mlxsmith-0.1.
|
|
69
|
-
mlxsmith-0.1.
|
|
63
|
+
mlxsmith-0.1.2.dist-info/licenses/LICENSE,sha256=ESYyLizI0WWtxMeS7rGVcX3ivMezm-HOd5WdeOh-9oU,1056
|
|
64
|
+
mlxsmith-0.1.2.dist-info/METADATA,sha256=mtwo3IlnvH9ffCKWSHbxRMTLQFyzrvDi29BCyzbteqk,8963
|
|
65
|
+
mlxsmith-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
66
|
+
mlxsmith-0.1.2.dist-info/entry_points.txt,sha256=ys7GcKEjhzhkkTMBmmaNavTgsjqOuFnCKIG2w8Wcn6w,46
|
|
67
|
+
mlxsmith-0.1.2.dist-info/top_level.txt,sha256=hKBwc8bn7uoI-_5Yhcq1T3IuChFhUFdzItIkZK1up6A,9
|
|
68
|
+
mlxsmith-0.1.2.dist-info/RECORD,,
|
mlxsmith/accel/zmlx_backend.py
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import Any, Dict
|
|
4
|
-
from .base import AccelStats
|
|
5
|
-
|
|
6
|
-
class ZMLXBackend:
|
|
7
|
-
name = "zmlx"
|
|
8
|
-
|
|
9
|
-
def __init__(self):
|
|
10
|
-
self._available = False
|
|
11
|
-
self._notes = {}
|
|
12
|
-
try:
|
|
13
|
-
import zmlx # type: ignore
|
|
14
|
-
self._available = True
|
|
15
|
-
self._notes["zmlx_version"] = getattr(zmlx, "__version__", None)
|
|
16
|
-
except Exception as e:
|
|
17
|
-
self._available = False
|
|
18
|
-
self._notes["error"] = f"{type(e).__name__}: {e}"
|
|
19
|
-
|
|
20
|
-
def patch(self) -> None:
|
|
21
|
-
if not self._available:
|
|
22
|
-
# soft fail; caller should report status
|
|
23
|
-
return
|
|
24
|
-
# ZMLX can patch ops/modules. We keep this intentionally minimal and safe.
|
|
25
|
-
try:
|
|
26
|
-
import zmlx # type: ignore
|
|
27
|
-
# If ZMLX provides a global patch hook, call it; otherwise, no-op.
|
|
28
|
-
patch_fn = getattr(zmlx, "patch", None)
|
|
29
|
-
if callable(patch_fn):
|
|
30
|
-
patch_fn()
|
|
31
|
-
self._notes["patched"] = True
|
|
32
|
-
else:
|
|
33
|
-
self._notes["patched"] = False
|
|
34
|
-
self._notes["hint"] = "No zmlx.patch() found; implement patch hook or integrate per-module."
|
|
35
|
-
except Exception as e:
|
|
36
|
-
self._notes["patched_error"] = f"{type(e).__name__}: {e}"
|
|
37
|
-
|
|
38
|
-
def warmup(self, model: Any, example_batch: Any) -> Dict[str, Any]:
|
|
39
|
-
return {"warmup": "not_implemented", "notes": self._notes}
|
|
40
|
-
|
|
41
|
-
def stats(self) -> AccelStats:
|
|
42
|
-
return AccelStats(backend="zmlx", notes=self._notes)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|