Experiments #56
mlx-serve's forward meter and decode graph dump at 8k
done
What was tested
mlx-serve's forward meter and The writing phase: the model produces the reply one token at a time. Read more graph dump at 8k
Model and setup
the best
Expected gain
op count per step (**measured**)
Where the idea came from
row 55
Outcome
done 2026-10-30: 15.84 ms per forward, 2,126 ops, about 590 kernels (205 custom, 173 matmuls, 60 KV writes, 46 norms); dispatch count is the lever
Lesson
on the M4 Pro a dependent tiny kernel costs 4 to 7 us whatever its size, and the patched best launches about 590 per decode step with the A graphics card, used here as the chip that does the heavy arithmetic for a model. 97% busy: per-step overhead is dispatch count, so fusing ops (the KV writes, norms, gathers) is the remaining Mac lever below the weight bytes.
Adopted
no (diagnostics)