Repository navigation
Kev-27B runs on a 128 GB Mac through the MLX backend - #175
seanpaulconnelly wants to merge 1 commit into
Conversation
…n Apple Silicon path (expected ≈ 51 GB, untested at 27B) (#200) kev.mlx_model.load_full builds mlx-lm's qwen3_5 model from a full-weight checkpoint's own config.json and shards (strict names/shapes/dtype, LM head never materialized, nothing merged). Kev-4B as bf16 full weights: load peak 8.41 GB = its shards vs 15.87 GB for the LoRA merge; bit-identical to the LoRA path once the base's fp32 A_log / gated-norm tensors are rounded to bf16; max |dp| 0.015, 0 flips vs fp32 torch (runs/mlx-full-{4b,0.8b}). scripts/merge_lora_checkpoint.py --weights_dtype bf16, scripts/mlx_full_parity.py. Kev-27B v2 numbers are expected, not measured on a Mac; PR #175 credited for the v1 Mac result. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Hi Sean, thank you for this! Getting Kev-27B running on a 128 GB M5 Max, and checking it against the published numbers, was really useful to us. One update: Kev-27B v2, now If you have time, could you run v2 on your 128 GB Mac? Pull main and start |
…for v2 (full weights) and v1 (LoRA), and v1 parity v2 (jaredpalmer/kev-27b @ af0e6d5, full bf16 weights, loaded by the MLX path from jaredpalmer#200), served on an M5 Max with 128 GB: transfer-v4 development 0.849 against the published 0.851, Brier 0.218 against 0.218 (runs/mlx-27b-v2-transfer-v4). Server footprint 53.7 GB steady, 54.4 GB peak, for 51.2 GB of weights. v1 (tag v1-lora), served through the adapter-merge path: 0.849 against 0.848 (runs/mlx-27b-transfer-v4); max |dp| 0.022 against the torch bf16 path, 0 flips on 40 decision-v7 development questions (runs/mlx-parity-27b).
8faee40 to
13f5245
Compare
|
Thanks, Jared! Ran v2 on the 128 GB M5 Max, on main @
One unit note: I rebuilt the PR on current main and dropped my doc edits, since main's wording replaced them. It now holds only three reports: |
Kev-27B served through MLX on a 128 GB M5 Max: v2 (full weights, the path from #200) and v1 (the LoRA adapter). This PR adds the three reports and changes no docs or code.
v2 (full weights)
jaredpalmer/kev-27b@af0e6d5onkevmain @84847f0, no code changes:Accuracy.
kev.benchmark --remoteon transfer-v4 development (clean subset, n = 656; 764 requested, 0 rejected). Committed asruns/mlx-27b-v2-transfer-v4/report.json. The rule from #200 (accuracy within ±0.015 of 0.851, Brier within ±0.02) holds: the accuracy gap is one question of 656.runs/release/kev-27b-r23.json)Memory.
footprinton the server process, sampled about once a second from process start through the benchmark:footprintprints it (GiB)phys_footprint_peak, whole run)Right after load, before the first request,
footprintprinted 48 GB; it settled at 50 GB once requests ran, and the peak came during the benchmark, not at load. So the estimate in #200 holds: the peak is the weights plus about 3 GB, and there is no load spike. Nosysctlchange was needed. One unit note:footprintprints GiB, so v1's "52 GB steady, 97 GB peak" below are about 56 GB and 104 GB on the scale where the v2 weights are 51 GB.Load and latency. The footprint reached its loaded level 6 seconds after process start, and the server was answering within about 10. The shards had just been downloaded, so they were probably still in the page cache; a cold load will take longer. Benchmark latency per request: median 360 ms, p95 428 ms.
v1 (LoRA adapter, tag
v1-lora)Measured on 2026-09-28 at
kev@3e1cd3b, through the adapter-merge path:runs/mlx-27b-transfer-v4/report.json).scripts/mlx_parity.py --n 40against the torch bf16 path: max |dp| 0.022, mean 0.0035, 0 argmax flips (runs/mlx-parity-27b/report.json). The script printed this report and then failed to write it because the directory didn't exist; the committed file is that printed JSON, not a rerun.footprintprinted them.Test plan
kev.benchmark --remote ... --suite evals/v4/transfer-v4(development) against the v2 MLX server: 0.8491, n = 656 cleanKEV_BASE_URL=http://127.0.0.1:8009 pytest tests/test_api.pyagainst the v2 MLX server: 12 passed, 1 skippeduv run python scripts/verify_claims.py: verified 998 claimstests/test_conventions.py: 21 passed