[Paper Review] Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve
Sarathi-Serve introduces stall-free, chunked-prefill batching to improve LLM inference throughput while maintaining low time-between-tokens latency, achieving up to 2.6x–6.9x speedups over Orca/vLLM across multiple models and GPUs.
Each LLM serving request goes through two phases. The first is prefill which processes the entire input prompt and produces the first output token and the second is decode which generates the rest of output tokens, one-at-a-time. Prefill iterations have high latency but saturate GPU compute due to parallel processing of the input prompt. In contrast, decode iterations have low latency but also low compute utilization because a decode iteration processes only a single token per request. This makes batching highly effective for decodes and consequently for overall throughput. However, batching multiple requests leads to an interleaving of prefill and decode iterations which makes it challenging to achieve both high throughput and low latency. We introduce an efficient LLM inference scheduler, Sarathi-Serve, to address this throughput-latency tradeoff. Sarathi-Serve introduces chunked-prefills which splits a prefill request into near equal sized chunks and creates stall-free schedules that adds new requests in a batch without pausing ongoing decodes. Stall-free scheduling unlocks the opportunity to improve throughput with large batch sizes while minimizing the effect of batching on latency. Furthermore, uniform batches in Sarathi-Serve ameliorate the imbalance between iterations resulting in minimal pipeline bubbles. Our techniques yield significant improvements in inference performance across models and hardware under tail latency constraints. For Mistral-7B on single A100 GPUs, we achieve 2.6x higher serving capacity and up to 3.7x higher serving capacity for the Yi-34B model on two A100 GPUs as compared to vLLM. When used with pipeline parallelism on Falcon-180B, Sarathi-Serve provides up to 5.6x gain in the end-to-end serving capacity. The source code for Sarathi-Serve is available at https://github.com/microsoft/sarathi-serve.
Motivation & Objective
- Motivate reducing the throughput-latency trade-off in online LLM serving.
- Develop a stall-free scheduler that allows new requests to join an ongoing batch without delaying decodes.
- Leverage chunked-prefills to maximize decode batch utilization while bounding per-iteration latency.
- Evaluate throughput and latency across diverse models and hardware configurations.
- Quantify impact of chunked-prefills on key performance metrics (TTFT, TBT, capacity).
Proposed method
- Classify existing schedulers as prefill-prioritizing or decode-prioritizing and identify their pitfalls.
- Introduce Sarathi-Serve, a stall-free, iteration-level scheduler built on chunked-prefills and decode-coalescence.
- Use chunked-prefills to split long prefill work across iterations while coalescing with ongoing decodes.
- Define a token budget per scheduling iteration to bound latency and maximize throughput.
- Adopt a hybrid batching strategy that maintains decode progress while opportunistically processing prefill chunks.
- Evaluate on multiple models (Mistral-7B, Yi-34B, LLaMA2-70B, Falcon-180B) and hardware (A100s, A40s) with real-world traces.
Experimental results
Research questions
- RQ1How much throughput capacity can Sarathi-Serve deliver under various SLOs compared with state-of-the-art schedulers?
- RQ2What is the overhead introduced by chunked-prefills in terms of latency and KV-cache access?
- RQ3How does stall-free batching impact TBT and TTFT relative to prefill- or decode-prioritizing schemes?
- RQ4How do chunked-prefills and stall-free batching perform across different model sizes and hardware configurations?
Key findings
- Sarathi-Serve consistently outperforms Orca and vLLM across models and workloads under both strict and relaxed SLOs.
- Mistral-7B achieves up to 2.6x higher serving capacity on a single A100 with Sarathi-Serve.
- Yi-34B achieves up to 2.8x higher capacity under the new scheduler.
- Falcon-180B shows up to 6.9x higher capacity using 8 A100 GPUs with Sarathi-Serve.
- Chunked-prefills bound latency growth and enable higher decode batch throughput, reducing generation stalls.
- Overall, stall-free batching minimizes TBT spikes while preserving high throughput; TTFT may incur modest overhead due to chunking.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.