Topic 3
Batching shares the read
If decode spends its time reading weights, the obvious trick is to use each read for more than one sequence. Decode 8 conversations together and the 498 MB of weights is read once per step for all 8; only each conversation's KV cache is extra.
Predict first
Throughput keeps rising with the batch, then stops. On the CPU it peaked at 1,183 tokens/s at batch 64 and fell to 972 at batch 128. That last point is just past the CPU's ridge in operations per byte, but it reaches only about 242 of the 1,953 billion operations per second the CPU managed on a plain matrix multiply, so it is not simply hitting the compute roof. We didn't measure what does limit it. The GPU's step at batch 128 jumped to 536 ms in this run; we did not re-run or investigate it.
Each user still pays: the step got longer, so each conversation's tokens arrive more slowly (lesson 1's throughput page).
A note on repeatability: this run's CPU steps at batch 1, 4 and 16 were 9.1, 14.0 and 19.9 ms. Lesson 1, using the same code in a separate run, measured 8.0, 13.5 and 18.5 ms. The same machine gives numbers up to 14% apart between runs, which is why we quote ratios.
Quick check