Why is batching the single biggest throughput lever for LLM decode?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Explain mechanically why batching N concurrent requests during decode raises GPU throughput far more than batching does for, say, a CNN classifier. Where does the linear scaling start to break down?
Decode is memory-bound, so one weight read per step is wasted on a single token. Batching amortizes that read across many tokens, raising throughput near-linearly until the compute roof.
Imagine a chef who must walk to a huge pantry and haul out every ingredient just to cook one tiny dish. The walk is the slow part, not the cooking. If only one order is on the ticket, that long walk feeds a single plate. But if twenty orders are waiting, the chef hauls the same ingredients once and plates all twenty in roughly the same trip. The walk to the pantry is reading the model weights from memory. The cooking is the actual math. Because the walk dominates, serving twenty requests together is almost as cheap as serving one. That is why batching is the biggest single throughput win for language model serving. It pays the expensive memory trip once and spreads it across many answers.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: decode is memory-bound at batch 1 + weight-read amortization across the batch + arithmetic intensity on the roofline + critical batch B-star + continuous batching + throughput-latency tension.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Claiming batching helps because the GPU has spare compute. The real reason is amortizing the weight read in a memory-bound regime; spare compute is the symptom, not the cause.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.