Experiments #160
A 16-row-tile variant of Lesto's fused gate+up+GeGLU MoE prefill kernel for 4 to 31 rows an expert, the...
runnable
What was tested
A 16-row-tile variant of Lesto's fused gate+up+GeGLU Mixture of experts: a model made of many specialist sub-networks where only a few run per token. Read more Prefill: the model reading the whole prompt before it can write the first token. Read more kernel for 4 to 31 rows an expert, the band where MLX's sorted row-block kernel runs `bm = 16` (`Storing the model's numbers with fewer bits to make it smaller and faster, at some risk to quality. Read more.cpp:1734`) and row 158's 32-row tiles (`BM = 32`, `src/moe_prefill_fused.zig:16`) padded and lost: a `BM = 16` instantiation chosen by rows an expert, so the fusion's saved passes stop paying for padding; lossless by the same per-row accumulation (row 158 was bit-identical at 20 rows an expert against MLX's 16-row kernel; `MLX_SERVE_MOE_PREFILL_FUSED_CHECK=1` at 384 and 2,656 slots)
Model and setup
the best
Expected gain
sized from row 158: 57 of 100 Cold means the server has never seen this prompt start; warm means part of it is already remembered from before. session turns fall in the band (64 to 511 new The unit of text a model reads and writes: roughly a short word or a piece of a longer one., The middle value when results are sorted: half the requests were faster, half slower. 323; F5); the fused path's own saving there is unmeasured: at most about -15 ms a turn (row 109 stage 1's 2.8 to 3.4 ms a layer per 2,048-token chunk scaled by slots, the scaling row 158 refuted at 32-row tiles), so about -0.4% per-turn paired median reply at best and 0 if the fusion saves nothing at these sizes; row 158's +30 ms in-band loss bounds what padding costs, not what fusion saves (inferred)
Where the idea came from
row 158 result, 2026-11-13
Outcome
runnable after rows 153w and 153d: a timing-free kernel check first (bit identity and per-layer A graphics card, used here as the chip that does the heavy arithmetic for a model. time at 8, 16 and 24 rows an expert against MLX's 16-row kernel), then a diagnostic with the switch on and off on 20 warm turns, bar -6 ms (`2026-11-13-mac-engine-audit/README.md` ยง Result, row 158)