Verba/Rapida

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 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 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 path's fixed cost (1.99x a step at 2 rows), not matmul width; superseded by row 153w

Want to see what these experiments produced? Lesto, the Gemma 4 inference engine for Apple silicon Macs, is on lestoengine.com

Made by Federico Andrioli, @fedeandri on X A research lab's own measurements, generated from its files. Data built