Experiments #33
MLX PR 4787 (open, 2026-10-28: affine `qmv_mma` for 3 to 16 rows on chips without NAX, M1 to M4) built into...
closed
What was tested
MLX PR 4787 (open, 2026-10-28: affine `qmv_mma` for 3 to 16 rows on chips without NAX, M1 to M4) built into the MLX under mlx-vlm 0.7.10 (C++ and Metal, so a build step on the rented Mac, never the installed package; PATCHED), so MTP's 7-row verify of the dense projections and the head stops running at batch cost; the author's M4 numbers: affine4 1.84x at 7 rows, 2.21x at 8, affine8 1.26x at 7 (OptiQ keeps The step where each token looks back at the earlier tokens to decide what matters. Read more and the head at 8-bit); it reaches `quantized_matmul` only (dense attention projections, dense MLP, head: 2.48 of the 3.44 GB per step, row 13), not the experts' `gather_qmm`. Timing-free first: one verify step's dense matmul time at 1, 4 and 7 rows with and without the build, and whether mlx-serve's own engine (row 31: it ships its own The writing phase: the model produces the reply one token at a time. Read more attention) calls MLX's `quantized_matmul` at all; then decode paired against mlx-vlm + MTP + the D512 overlay (row 30b)
Model and setup
gemma-4-26b-a4b OptiQ-4bit + MTP assistant
Expected gain
+5 to +12% decode (**guess** from the PR's M4 kernel ratios on the dense share of a verify step)
Where the idea came from
`docs/research/2026-10-29-gap-levers-merge.md` (claim 8a)
Outcome
closed 2026-11-13 by row 153v: the verify's cost is the The text you send to the model before it starts answering. path's fixed cost (1.99x a step at 2 rows), not matmul width; superseded by row 153w