Verba/Rapida

Experiments #173qf

The drafter's 162,489-row Latin head is the best's one matmul on MLX's slow qmv (`quantized.cpp:488` needs...

done

What was tested

The 's 162,489-row Latin head is the best's one matmul on MLX's slow qmv (`.cpp:488` needs N % 8 = 0; 162,489 % 8 = 1; 755 us a round at s8k, rows 173 and 175d): pad it to 162,496 rows (zero weights, scales and biases) for the fast qmv and slice the pad off before row 153q's scatter, so a pad row never reaches the argmax or the shortlist. Step 1 (done, laptop): every quantized matmul of the best against the condition, no other odd shape. Step 2: a microbench of 162,489 against 162,496 rows (with and without the slice) and 8,192 rows on Lesto's MLX, LESTO /173qf 257e19c7; a row when the sliced pad is 50 us a call under the served head; the served change is counted for identity (the fast kernel sums in another order)

Model and setup

the drafter head

Expected gain

up to about +0.4% (inferred: 100 us a round of 23.8 ms)

Where the idea came from

row 173qt (context)

Outcome

done 2026-11-20 18:35 (engine-rows): closed under its line; the sliced pad is 4.6 us slower a call than the served head (357.8 against 353.2 us), the pad alone 1.0 us faster (0.997x); slow and fast qmv read this head at the same 265 GB/s (`2026-11-20-mac-r173qt-cut-head-profile/README.md` ยง Result, row 173qf)

Lesson

on the M4, MLX's slow `qmv` (N % 8 not 0) reads a 4-bit 162,489 by 1,024 head at the same 265 GB/s as the fast one on a padded copy, so the fast-path alignment test is not a lever for a wide drafter head; check a kernel's measured rate per byte before padding a shape to reach its fast path.

Adopted

no (closed under its line).

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