IN THIS BREAKDOWN · 10 SECTIONS
You can read 18% of this breakdown.
The paper in one minute
Every request has two phases. Prefill processes the whole prompt at once; it is compute-bound and saturates the GPU even for a single request. Decode produces one token per request per iteration; it is memory-bound, since each iteration reads all the weights to do very little arithmetic, so batching many decodes together is nearly free.
Servers like vLLM and Orca batch at the iteration level and admit new requests eagerly, running their prefills first because that grows the next decode batch. The cost is a generation stall: while a multi-thousand-token prompt is processed, every ongoing response pauses, sometimes for seconds. Time between tokens (TBT) at the tail goes up with load. Older request-level batching avoids stalls but leaves the GPU underused. So operators trade throughput against latency.
Sarathi-Serve removes the trade with two pieces. Chunked prefill splits a long prompt into chunks of a few hundred tokens, computed over several iterations. Stall-free batching builds each iteration in a fixed order: all running decodes, then any partly done prefill, then new requests, until a token budget is reached. Because decode iterations have idle compute, adding a few hundred prefill tokens barely lengthens them, and no running response ever waits for a whole prompt. Iterations also become uniform, which removes pipeline bubbles when a model is split across machines.
The token budget sets the trade: 512 tokens for strict latency targets, 2,048 for relaxed ones. Built on vLLM, Sarathi-Serve served 2.6x more load than vLLM for Mistral-7B and 3.7x for Yi-34B under strict P99 TBT targets, and made pipeline parallelism over ordinary Ethernet practical for Falcon-180B.
Research notes: the problem, approach and results
more queries per second than vLLM for Yi-34B on two A100s within a strict P99 time-between-tokens target
how much longer an iteration can take when a full prompt joins a decode batch unchunked, versus a decode-only batch
extra prefill time from chunking at 512 tokens per chunk; near zero at 2,048
LLM servers batch requests at every iteration for throughput, and they admit new prompts eagerly. A new prompt's prefill can take seconds; while it runs, every ongoing response stops producing tokens. Smaller batches avoid these generation stalls but waste the GPU. With pipeline parallelism, uneven iterations also leave stages idle.
Decode iterations are memory-bound and leave compute idle. Split each prompt into chunks and build every iteration from all running decodes plus prefill chunks up to a fixed token budget (stall-free batching), so new requests join without pausing anyone and iterations take about the same time. Pick the budget from the latency target.
Against vLLM at strict tail-latency targets, serving capacity rose 2.6x for Mistral-7B on one A100 and 3.7x for Yi-34B on two A100s. With pipeline parallelism across two nodes, Falcon-180B served 3.6x more than vLLM's hybrid-parallel setup under strict targets.
Why it matters to an FDE
Users notice two latencies: time to first token and how smoothly the rest streams. When a customer says "the answer freezes mid-sentence when it's busy," the cause is often a scheduler stalling decodes to run someone else's long prompt.
Ask how the serving engine admits prefills. Chunked prefill is now a standard option in major engines; whether it is on, and with what token budget, changes tail latency at load more than most other settings.
Batch size limits don't fix it. The paper found vLLM's capacity under strict latency targets barely moved across maximum batch sizes of 32, 64 and 128, because stalls come from prefill length, not batch size.
Long prompts make it worse. RAG, document and agent workloads with prompts in the thousands of tokens are where prefill interference is largest; the arXiv-summarization workload (median prompt 7,059 tokens) had the lowest capacities in the paper.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 149 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
Why decodes have slack, the token budget, the TTFT cost, pipeline parallelism and three misreadings
Free account - 04How it works
The batch-building loop, picking the budget, chunk overheads and the pipeline-parallel effect
Premium - 05The numbers that matter
Setups and SLOs, capacity results, the latency trade-off curve, pipeline results and ablations
Premium - 06Try it yourself
Recheck ratios and tables, then simulate prefill-first and stall-free schedulers under load
Premium - 07Where it breaks
TTFT cost, budget tuning, very long prompts, no disaggregation comparison, and slips
Premium - 08Using it on a deployment
Diagnosing stalls, setting the token budget, and what to measure at load
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
