Inference

Continuous batching

Continuous batching admits and removes requests as individual decoding slots become available.

t1t2t3t4slot 1AADDslot 2BBBEslot 3CFFFA new request takes a freed slot immediately.
Continuous batching admits and removes requests as individual decoding slots become available. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

Static batches wait for every sequence to finish, wasting capacity on completed rows. Continuous scheduling replaces finished work without draining the whole batch.

A concrete example

Illustrative: when 3 of 16 sequences finish, the scheduler admits 3 waiting requests at the next scheduling boundary.

Do not confuse it with Dynamic batching

dynamic batching groups arrivals before execution; continuous batching reschedules during decoding.

Study the full lesson