Verba/Rapida

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 layer on mlx-serve (PATCHED): fold each layer's two 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: ; 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 ( +0.6% under the 0.7% threshold; the patch stays the base of row 57b, which stacks the critical-path cuts)

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