How continuous batching keeps GPUs busy: LLM inference runs steps, not requests
arpit_bhayani · x · 2026-08-26
Arpit Bhayani explains continuous batching in LLM serving:
- Generation is a loop: each iteration runs one forward pass and emits one token; a 500-token response is 500 separate steps.
- Continuous batching decouples steps from requests: after every token step, the scheduler evicts finished sequences (EOS) and slots queued requests into the open slot mid-generation — token 3 of a new request can sit next to token 400 of a long one.
- The GPU just runs a forward pass over whatever sequences occupy its batch slots.
- This works because attention and the KV cache are per-sequence (with PagedAttention managing memory), so mixed-stage batching corrupts no one's context.
Result: high GPU utilization and lower average latency, since no request waits behind a slow one.
More from Infra
- ASML CFO says US Match Act restricting DUV sales to China would backfire — pstAsiatech · 2026-10-15
- Bloomberg breakdown: a 1GW Texas AI data center may need nearly $3B for overruns alone — rohanpaul_ai · 2026-10-15
- 7 System Design Algorithms to Know: Merkle Trees to CAP/PACELC — goyalshaliniuk · 2026-10-15
- MiniCPM-V 4.7 runs a 35B MoE multimodal model on phones with just 3GB memory — nevrekaraishwa2 · 2026-10-15
- Sipeed MaixStation product page goes live for edge AI dev — xlltt · 2026-10-15
- Nvidia Is Now Worth More Than the Entire Indian Stock Market — theteknosaur · 2026-10-15