Experiments #57
Fewer dispatches per decode layer on mlx-serve (PATCHED): fold each layer's two KV-cache SliceUpdates into...
done
What was tested
Fewer dispatches per The writing phase: the model produces the reply one token at a time. Read more layer on mlx-serve (PATCHED): fold each layer's two The memory where the model keeps what it has already read, so it does not recompute it for every new token. Read more SliceUpdates into the fused QK-norm and RoPE kernel, and join the norms and gathers the graph shows separately; size first by deleting one op class in a forward-meter build (`MLX_SERVE_DECODE_FWD_UBENCH`)
Model and setup
the best
Expected gain
+2% to +6% decode (**inferred** from rows 55 and 56: about 5 us per removed dispatch)
Where the idea came from
row 56
Outcome
done 2026-10-30: lossless (65 dispatches gone, replies identical); race +0.6% [+0.6, +0.7] beyond the 0.09% floor but under the 0.7% threshold: A valid experiment that did not beat the best score by more than the noise.; base of row 57b (`docs/experiments/2026-10-30-mac-dispatch-fusion/`)
Lesson
a lossless cut of 65 side-branch dispatches is real (+0.6%, interval +0.6% to +0.7%) but below a 0.7% threshold: small lossless cuts are not raced alone; stack them with the critical-path cuts (router norm, joined K/V writes) and race the stack.
Adopted
no (The middle value when results are sorted: half the requests were faster, half slower. +0.6% under the 0.7% threshold; the patch stays the base of row 57b, which stacks the critical-path cuts)