Verba/Rapida

Experiments #59

Why one-token 4-bit matmuls reach only 62% to 66% of bandwidth (row 49): `quantized_matmul` at 1 row over N...

done

What was tested

Why one-token 4-bit matmuls reach only 62% to 66% of bandwidth (row 49): `quantized_matmul` at 1 row over N = 256 to 32,768 at K 2816 and 2112, independent against serialized, on the idle Mac; decides between concurrency or joining and a better single-row kernel

Model and setup

MLX of `~/engines/mlxlm`

Expected gain

sizes the about 4 ms of the step that is not bytes (rows 46, 57p)

Where the idea came from

rows 49, 57p

Outcome

done 2026-10-30: ~14 us fixed per serialized one-token matmul (4 us overlapped), ~2 ms of the step; 59b: prefetching does not hide it (`docs/experiments/2026-10-30-mac-dispatch-fusion/`)

Lesson

on the M4 Pro every serialized read of a few MB of weights costs about 10 to 14 us beyond its bytes, whatever the kernel: a one-token step pays it about 170 times; the only levers are fewer, larger reads or more per read (verify width), not a faster single-row kernel.

Adopted

no (a diagnostic)

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