Inference / Serving
verifiedContinuous Batching
Batching requests together uses the hardware well, but sequences finish at different times, and a batch that waits for its slowest member leaves most of the accelerator idle. Continuous batching lets a finished sequence leave and a waiting one take its place at the next step, so the batch is refilled constantly rather than assembled once.
Schedule at the granularity of an iteration rather than a request. A completed sequence frees its slot immediately and a queued one joins mid-flight, which raises throughput several times over static batching at the same latency. It needs a KV cache that can be allocated and released per sequence, which is what makes paged attention its natural partner.
With static batching of size B and lengths n sub i , the batch occupies max sub i n sub i steps while doing Σ sub i n sub i tokens of useful work, so utilisation is Σn sub i /(B·max n sub i ) — poor whenever lengths vary. Iteration-level scheduling removes the max from the denominator, and utilisation stops depending on the spread of output lengths.
idle-slots holds 50% of the budget; rest holds the remaining 50%.
Batch slots idling for the longest sequence against those doing useful work. Drag the idle count to watch a wider spread in output lengths waste the accelerator.
Reviewed by opendroid · 2026-08-04
- arXiv:2309.06180 — Efficient Memory Management for Large Language Model Serving with PagedAttention