Verba/Rapida

Experiments #95

`qmv_fast` for K % 256 == 0: MLX picks its fast one-token 4-bit kernel only when K % 512 == 0...

sweep

What was tested

`qmv_fast` for K % 256 == 0: MLX picks its fast one-token 4-bit kernel only when K % 512 == 0 (`.cpp:151`, `:488`, verified 2026-10-31), so every projection reading K = 2816 (fused QKV, full-layer Q

Model and setup

K, dense gate-up, the head; about 860 MB of the about 2.2 GB a step reads) runs the guarded `qmv`; port MLX PR 4598 (closed unmerged, `qmv_fast_impl` with one pack per thread, 1.05x to 1.21x reported at M=1 on M1 Pro); check bit-exactness against `qmv`

Expected gain

the best

Where the idea came from

0 (voucher)

Outcome

sweep 2026-10-31 | closed 2026-10-31 by row 94: a one-pack fast kernel is bit-identical to `qmv` and no faster at the five K = 2816 shapes

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