Verba/Rapida

Experiments #158

The fused gate+up+GeGLU MoE prefill path admitted from 4 rows per expert (today 32...

done

What was tested

The fused gate+up+GeGLU path admitted from 4 rows per expert (today 32, `moe_prefill_fused.zig:24`, `:180-185`): between 4 and 31 rows per expert MLX already runs the sorted row-block kernel at `bm = 32` (`.cpp:1996-2013`, `:1568`), the the fused path is bit-identical to by construction (`src/transformer.zig:11345-11347`); 57 of 100 session turns fall there (64 to 511 new , 323); lossless if `MLX_SERVE_MOE_PREFILL_FUSED_CHECK=1` holds at 384, 2,584 and 5,560 slots (`2026-11-13-mac-engine-audit/README.md` F5)

Model and setup

the best

Expected gain

warm first token about -15 ms on those turns (row 109 stage 1's 2.8 to 3.4 ms a layer per 2,048-token chunk scaled by slots, inferred), per-turn paired median reply -0.2% to -0.4%

Where the idea came from

row 109; engine audit 2026-11-13

Outcome

done 2026-11-13: , lossless (30 of 30 identical, fused checks true at 20 rows an expert) but every in-band warm first token slower, 11 of 11, median +30 ms (32-row tiles pad at 4 to 26 rows an expert; diagnostic, one block); the 32-row floor stays, row/158 out of the stack (`2026-11-13-mac-engine-audit/README.md` ยง Result, row 158)

Lesson

admitting Lesto's fused 32-row-tile MoE prefill from 4 rows an expert keeps replies identical but makes warm first tokens about 30 ms slower in the band it opens (4 to 26 rows an expert), because the tiles pad where MLX's 16-row kernel does not; the 32-row floor stays.

Adopted

no (slower in the band it opens; LESTO `row/158` stays on lesto-dev unmerged, out of the 154 and 159 stack)

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