
Real traffic is messy. New requests arrive while others are mid-generation. In autoregressive LLM serving, keeping a batch fixed until its longest response finishes leaves completed requests unable to make room for new work. Continuous batching lets the server update the active batch between generation steps.
The scheduler can admit waiting requests when capacity becomes available, rather than waiting for every request in a fixed batch to finish. This is iteration-level scheduling. It does not mean reloading model weights for each token or request: in a typical GPU-resident deployment, weights remain loaded while the server processes many requests. Throughput gains depend on the model, hardware, traffic and serving configuration.
Prefill processes the prompt tokens and builds their key/value cache. Decode uses that cached state to generate subsequent tokens autoregressively. The prompt is the input, not an extra sequence alongside it.
Prefill can process many prompt tokens in parallel. A serving engine may split long prompts into chunks and interleave them with decode work. Prefill is often compute-intensive; small-batch decode is often limited by memory bandwidth. The bottleneck depends on the workload and hardware.
Continuous batching is a serving-engine scheduling technique and does not require retraining the model. PagedAttention addresses a separate problem: managing the KV cache in blocks that need not be contiguous. These techniques can work together, but neither is a synonym for the other.
Check current hardware, locations, pricing and deployment requirements before choosing an instance.
Try Compute now
Batching can spread work across more requests per model iteration, but higher total throughput does not guarantee lower latency for every user. Compare both queueing delay and token-delivery latency under the same workload.
This section describes key steps to create an efficient batching setup for your models.
Start with defaults, then change one thing at a time:
For thorough validation, it is recommended to run these tests over several iterations, using different iterations and multiple iterations to cover a range of scenarios. For example, you can vary prompt lengths or concurrency levels in each run to observe system behavior.
Track these at minimum:
Before deciding what your inference server records, use our privacy checklist for LLM inference in Europe to review logging, retention, access, and the full data path.
Continuous batching is not magic. It is a practical way to keep GPUs busy and users happy when traffic is uneven. Start with safe caps, measure TTFT and TPS, and adjust batch limits where the numbers say it matters.
Plan a self-managed deployment
Use the existing vLLM endpoint on Compute walkthrough as a reference, not confirmation that its image or configuration is currently available. Check current Compute documentation and available hardware, and configure endpoint authentication and TLS for your deployment.
Prefill processes prompt tokens into cached attention state, potentially in chunks. Decode then generates tokens using that state.
Big enough to keep the GPU busy during decode without causing cache thrash. Test with your real prompts and cap max tokens.
Queueing and prefill work often dominate at high load. Inspect prompt lengths, concurrency, preemptions and scheduler settings; cache hit rate alone cannot diagnose the cause.
Yes. Streaming is the default for many servers. Users see tokens while the scheduler keeps admitting other requests.
No. Continuous batching can be useful on one GPU when multiple requests are in flight. Multiple GPUs may be needed for model capacity or throughput, but the benefit must be measured.
For English prose, 1,000 tokens is sometimes approximated as 750 words. Do not use that shortcut to size a request: count tokens with the model’s tokenizer, since language and text type change the ratio.
A token is a unit of text used in natural language processing, often a word or subword piece that the model processes during inference or training.
TTFT means time to first token. From the client’s perspective, it runs from request submission to receipt of the first output token. Server-side timings use a different boundary.
For a streaming request, time from submission to the first non-empty token-bearing response. Record the measurement boundary and keep it consistent across tests.
TPOT means time per output token, a latency measure, usually expressed in milliseconds per token. A common per-request calculation excludes the first token: (total latency − TTFT) / (output tokens − 1), for responses longer than one token. Check the benchmark tool’s definition.
TPS means tokens per second. State whether you mean one response or total output across concurrent requests; the two can move in opposite directions as load increases.
KV cache refers to the key-value cache that stores intermediate key and value tensors computed during the attention mechanism to speed up subsequent token generation.
GPU KV cache is the storage of key-value pairs in GPU memory used during model inference to optimize attention computations and reduce redundant calculations.
In large language models, the KV cache holds cached key and value vectors from previous tokens to efficiently compute attention for new tokens without recalculating past states.
A general key-value store retrieves values by keys. An LLM KV cache instead retains attention key and value tensors for token positions. The shared abbreviation does not make them the same system.
Request-level dynamic batching groups compatible requests before execution, with an optional wait to form a larger batch. Triton’s dynamic batcher is intended for stateless models. Continuous LLM batching instead revisits the active set between generation iterations.
A static batch has fixed membership for an execution. A dynamic batch is assembled from queued requests using configured limits and, optionally, a waiting window. Continuous batching adds a different capability: changing active requests between generation iterations. Static batching does not inherently require waiting for a completely full batch.
Pick one AI, compute, or storage workload and see the difference for yourself. Spin it up in minutes, or let our team map your fastest path to production.