Continuous Batching
A batching method where the request packet is not fixed: new requests are added to processing immediately, and completed ones are removed without waiting for the rest.
Problem with static batching
In regular batching, the system waits until a full packet is formed, and all requests in it are processed for the same amount of time. If one request generates a short response and another a long one, the short one waits for the long one, and the GPU is idle.
How continuous batching solves this
Requests live independently: - a new one arrives — it immediately joins the next step; - finishes generation — frees up a slot; - the slot is immediately occupied by the next one from the queue.
The GPU remains almost always busy, and short requests are not slowed down by long ones.
Who uses it
Modern inference servers — vLLM, TensorRT-LLM, and others — work exactly this way. This is one of the reasons why they are noticeably faster than naive implementations.