LLM Library
Running and Using LLMsAnimated
Continuous Batching
Keeping the GPU busy by swapping requests in and out every step.
The idea
Requests finish at different times. Continuous batching removes finished ones and adds waiting ones after every step, instead of waiting for a whole batch to end.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
Continuous batching: every tick, each running request makes one token of progress.
- tick:
- 1
1/17
Continuous batching is how vLLM, TGI and TensorRT-LLM keep throughput high.
Step by step
- 1Run one step for all active requests
- 2Remove finished ones
- 3Add waiting ones
- 4Repeat
Where it is used
vLLM, TGI, TensorRT-LLM.
Watch out for
It needs memory management, which paged attention provides.