← Lab
roofline
confirmedC++ · llama.cppInference, serving & evaluationJuly 6, 2026
the question
Is token decode memory-bandwidth-bound, and does batching escape it?
what came out
Decode sits far below the roofline ridge (arithmetic intensity ~3 FLOP/byte vs 9.0), so it's memory-bandwidth-bound. On an M4 Pro with a measured 221 GB/s STREAM ceiling, a single 1.5B stream already uses 67% of peak bandwidth; batching to 4 raises it to 92% and 207 tok/s but stays memory-bound: it amortizes the weight read, it doesn't escape it. All three pre-registered predictions held.
method & receipts
- Result: confirmed
- Pre-registered: the prediction was written down and committed before the run.
- Reproducible: one script re-runs the whole thing from scratch.
- Adversarial self-review: my own skeptic's pass over each claim, kept in the repo.
- Machine-readable claims: every reported number, in a checkable file.
- Tested: a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/roofline