Skip to main content

Continuous batching for LLM inference

Static batching is a poor fit for generated text.

Put several requests in one batch and they will rarely finish together. One answer stops after 18 tokens, another after 300, and a third may hit its maximum length.

If the batch cannot change until every request finishes, completed slots sit idle and new work waits outside.

Continuous batching fixes that lifecycle mismatch by scheduling at model-iteration boundaries. The foundational design appears as iteration-level scheduling in the Orca paper.

In this article

  • Static batches assume a shared finish line
  • Continuous batching reschedules between iterations
  • One iteration may contain uneven work
  • The scheduler spends a token budget
  • Batch membership and memory allocation are coupled
  • Follow one sequence through the loop
  • Iteration boundaries create useful control points
  • Preemption is the pressure-release valve
  • Chunked prefill protects live decodes
  • Throughput claims need a latency boundary
  • Watch percentiles, not a single average
  • Continuous batching is not request concurrency
  • A practical tuning order
  • The systems view

Continue reading

This field note is part of Fanout Pro, with the complete archive, courses, labs, and every Daily paper guide.

See plans