Metal half of the v0.33.0 fold: golden recalibration for the 27fec909 MLX pin + measured mlx-metal-0-33-0 profile (preflight PASS) - #225
Conversation
The #208 fold moved MLX adf21dea -> 27fec909, and the new Metal kernels round the fused-nvfp4 matmuls differently: the known quantized-vs- dequantized per-element gap grew from <=0.14 (2026-08-11 calibration) to <=0.19 on the 26b/31b towers, tripping the 0.15+5% bound on one sampled element each while every aggregate stayed within 0.2%. The bf16 control — the same Go code on gemma4:26b-mlx-bf16 against its own regenerated golden — measures <=0.06, as close to the reference as the reference is to itself across MLX versions, so the port is structurally sound and the drift lives in the quantized kernels. Goldens regenerated per the test header's procedure (12b came out byte-identical — its reference never moved); per-element bound raised to 0.20+5% with the observation recorded; the bf16 control golden is now committed so the discriminating experiment is repeatable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… closes The #208 payload move (llama.cpp b10434 -> b10488, MLX adf21dea -> 27fec909) required a new mlx-metal profile per ADR 0011. Measured fresh on 0.33.0-maxusai-21cfe88e against the build-under-test on :11437 with measure_ladder.py (rows rendered from its --out JSON, ADR 0012 rule 8): all four arches reproduce their mlx-metal-0-32-14 ladders exactly, so the payload move is inert for token accounting, as PR #166 found for the llama.cpp half. First full preflight: VERDICT PASS (runs/preflight-mlx-metal-0330-first.json), think probes valid-JSON on all arches. BINARIES.md gains the c82b046 rollback row and the 21cfe88 provenance row; the #217 task doc's Metal-half checkboxes close. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Reviewing as consolidator. Regenerating a golden is the one operation that can launder a regression — a recalibrated reference passes its own test by construction — so the only question that matters is whether the movement was explained before the numbers were replaced. It was, and the discriminating control is the right one. The bf16 control is what makes this a diagnosis rather than a goalpost move:
That separates the two hypotheses cleanly. If the port had drifted, bf16 would drift too, because it runs the same Go path. It does not — so the port is intact and the movement is in fused-nvfp4 Metal kernel rounding, which only the quantized towers traverse. Committing that control golden so the discriminating experiment is repeatable is the part I would have asked for. Three other things done in the right order:
One thing I would state explicitly in the test comment, since the bound moved: On the profile halfRequiring a new All four arches reproducing their Committing the preflight run JSON alongside the VERDICT PASS is good practice — a verdict without its artifact is a claim. |
Closes the Metal half of the v0.33.0 fold's acceptance criteria (the open checkboxes in
docs/maxusai/tasks/upstream-sync-2026-08-26.md), on the native build0.33.0-maxusai-21cfe88e(llama.cpp b10488, MLX 27fec909) built and validated on 10.8.0.3 today.Commit 1 —
test(mlxrunner): golden recalibration for the 27fec909 MLX pinRunning the fold's native gate surfaced
TestVisionGoldenParityfailures ongemma4:26b-nvfp4and31b-nvfp4(12b passed). Root-caused, not patched over:0.15+5%|g|bound (max deltas 0.19 / 0.16).x/mlxrunner/model/since the 2026-08-11 calibration; the thrash-check commit eliminated by mechanism (CUDA-only, runner-subprocess-only). Last variable: libmlx (adf21dea → 27fec909, TASK: merge upstream/main 6bba484f (v0.32.15+3) — parser-deadlock fix, metadata cache, MLX/llama bumps #208).gemma4:26b-mlx-bf16against its own regenerated golden measures ≤0.059 per element — as close to the reference as the reference is to itself across MLX versions (≤0.0625). Port structure proven; the pin bump changed fused-nvfp4 Metal kernel rounding, growing the quantization gap to ≤0.19 on the deepest towers.Fix: goldens regenerated per the test header's documented procedure (12b came out byte-identical — its reference never moved), per-element bound raised to
0.20+5%|g|with the observation recorded in the comment, and the bf16 control golden committed so the discriminating experiment is repeatable.Commit 2 —
preflight: themlx-metal-0-33-0profile, measuredThe #208 payload move requires a new profile per ADR 0011 (never a widened pattern over two payloads). Measured fresh against the build-under-test on
:11437withmeasure_ladder.py, rows rendered from its--outJSON (ADR 0012 rule 8 — no hand transcription):mlx-metal-0-32-14ladders exactly — gemma4/gemma4_unified flat at 1102 (prefix 19), qwen35/qwen35moe[68, 146, 578, 2306, 5186](prefix 13). The payload move is inert for token accounting, as PR preflight: measured apple-silicon-mlx baseline for 0.32.14 / b10434 #166 found for the llama.cpp half.preflight/runs/preflight-mlx-metal-0330-first.json.test_verdicts.pygreen (50 tests — the new rows are inside the gate).0.32.14-maxusai-c82b0464rollback row (last pre-0.33.0 deploy, preflight-PASSED 2026-08-22) and the0.33.0-maxusai-21cfe88eprovenance row; both archived at~/.ollama/binaries/with checksums.TestDFlash*all pass with real MLX) and criterion 4 (Metal half) checkboxes close.Native gate summary on
0.33.0-maxusai-21cfe88ego test ./x/mlxrunner/ -p 1(native)TestDFlash*(draft-cache settling, real MLX)test_verdicts.pygo test ./llm/ -run TestImageTokensForSizemlx-metalpreflight🤖 Generated with Claude Code