Experiments #155e
The warm prefill chunk's MoE expert time above the bytes floor (row 155d: 81 to 88 ms scaled at the median...
done
What was tested
The Cold means the server has never seen this prompt start; warm means part of it is already remembered from before. Prefill: the model reading the whole prompt before it can write the first token. Read more chunk's Mixture of experts: a model made of many specialist sub-networks where only a few run per token. Read more expert time above the bytes floor (row 155d: 81 to 88 ms scaled at the The middle value when results are sorted: half the requests were faster, half slower. warm chunk of 104 to 118 The unit of text a model reads and writes: roughly a short word or a piece of a longer one. against 49.6 ms to read every expert weight once). Step 1, no build: one split trace of row 155d's 15 requests with `MLX_SERVE_MOE_PREFILL_FUSED_OFF=1` beside its own, giving per width the gather and fused routes' expert time, each width's excess over its bytes floor (experts touched times their bytes over 258.9 GB/s) and the kernels' own bandwidth; then a lossless kernel or route change for the width band holding most of the excess (row 158's lower fused threshold lost, so not that), checked on general text and the 50 sessions
Model and setup
the warm prefill forward
Expected gain
about -1.6% warm-turn reply, G about +0.8% on warm turns and +0.4% over all, The writing phase: the model produces the reply one token at a time. Read more unchanged (inferred)
Where the idea came from
row 155d
Outcome
done 2026-11-23 (read-rows): no further step opened; band-wide tile 155eg3: the band pick is stock; width rules (155ew's 8-row tile, the down-only 16,64,32,1,2 from 345 sized in the closure): about 0.05% of How long the whole answer takes, from sending the request to its last word. or less each; fused threshold 158, 155r3, 155rw: no Keeping a model loaded on a machine so it can answer requests over the network. gain lower, no served penalty at 520 to 768; a new band kernel is about +0.4% G by estimate and nothing on the +4.1% decode gap (`2026-11-23-mac-r155e-moe-route-split/README.md` ยง Result: row 155e closed)
Lesson
a roofline gap (the warm chunk's expert work 35.7 to 58.9 ms above its roofline floor) is not itself a lever. A band-wide tile found nothing, each width rule came to about 0.05% of reply time or less (0.053% and 0.041% for the 8-row tile, summed over the requests it touches; 0.033% and 0.022% for the down-only rule, charged to every request at its largest observed saving), lowering the fused threshold lost (row 158) and keeping it showed no served penalty at the tested widths above 512; the remaining candidate (a new kernel) is about +0.4% G by estimate and nothing on the decode target. Before opening a kernel row on a prefill roofline gap, size it on the track's driving metric.
Adopted
no (no tested change clears a pair's threshold; the fused route stays at 512 and the gather keeps its stock tile).