Inference without Interference: Disaggregate LLM Inference for Mixed Downstream Workloads

Cunchen Hu, Heyang Huang, Liangliang Xu, Xusheng Chen, Jiang Xu, Shuang Chen, Hao Feng, Chenxi Wang, Sa Wang, Yungang Bao, Ninghui Sun, Yizhou ShanarXiv 2024 · DOI

Abstract

Large Language Model (LLM) inference involves two distinct phases: a compute-intensive prefill phase and a memory-intensive decode phase. Current serving systems often co-locate these phases, leading to significant resource interference and performance degradation. We present TetriInfer, a novel inference system that disaggregates prefill and decode instances. By employing chunked prefill, length prediction for intelligent scheduling, and dynamic instance flipping, TetriInfer achieves up to a 97% reduction in latency and a 2.4x improvement in cost-efficiency compared to state-of-the-art systems like vLLM.

Introduction

The deployment of Large Language Models (LLMs) faces a significant challenge in balancing throughput and latency across diverse workloads. LLM inference consists of two phases with vastly different resource profiles. The prefill phase processes input prompts and is characterized by high compute intensity that scales quadratically with prompt length. In contrast, the decode phase generates tokens sequentially, making it memory-bandwidth bound and highly sensitive to latency.

Figure 2: Throughput and GPU utilization characteristics for (a) Prefill and (b) Decode phases.

As shown in Figure 2, the prefill phase reaches high GPU utilization quickly as the number of tokens increases, whereas the decode phase's utilization is more dependent on batch size and remains relatively lower. Existing systems like vLLM use "continuous batching" to run both phases simultaneously on the same GPU. However, this co-location leads to a "resource tug-of-war" where compute-heavy prefill tasks interfere with latency-sensitive decode tasks.

The Interference Problem

The primary motivation for this work is the observation of massive performance degradation due to phase interference. A single heavy prefill task can significantly delay concurrent decode iterations.

Figure 6: Interference between prefill and decode phases. (a-b) Decode iteration time increases with background prefill load. (c-d) Prefill time increases with background decode load.

Figure 6 quantifies this interference, showing that adding heavy prefill (HP) or light prefill (LP) background tasks can cause a multi-fold increase in decode iteration time. Conversely, a large number of concurrent decode tasks can also slow down the prefill phase. This interference necessitates a system design that physically separates these workloads.

TetriInfer System Design

TetriInfer addresses these challenges through three main architectural pillars:

  • Disaggregated Instances: TetriInfer separates GPUs into dedicated Prefill Instances and Decode Instances. After the prefill phase is completed on a dedicated node, the resulting KV cache is transferred over the network to a decode instance for token generation.
  • Chunked Prefill: To prevent large prompts from monopolizing GPU resources, TetriInfer processes prompts in fixed-size chunks. This ensures consistent GPU utilization and prevents long-tail latency for other requests.
  • Two-Level Scheduling with Length Prediction: TetriInfer utilizes a small, fine-tuned auxiliary model (OPT-125M) to predict the expected output length of each request. This allows the scheduler to balance "heavy" (long-output) and "light" (short-output) requests across decode instances, avoiding hotspots.
  • Instance Flipping: To adapt to dynamic traffic patterns, TetriInfer can re-role an instance between prefill and decode functions in approximately 5–7 milliseconds.

Evaluation and Results

TetriInfer was evaluated using the OPT-13B model on NVIDIA V100 GPUs across various datasets, including ShareGPT, Alpaca-PubMed, and writing tasks. Compared to the industry-standard vLLM, TetriInfer demonstrated significant improvements:

  • Latency: For workloads characterized by light prompts and heavy generation, TetriInfer reduced the Time-to-First-Token (TTFT) by 97%.
  • Job Completion Time (JCT): Average JCT was reduced by 47% to 50% for typical mixed workloads.
  • Cost-Efficiency: TetriInfer achieved 2.4x better performance-per-dollar, using 38% fewer resources while maintaining superior latency.
  • Prediction Accuracy: The OPT-125M predictor achieved approximately 75% accuracy in bucketizing request lengths, which proved sufficient for effective load balancing.

Conclusion

TetriInfer demonstrates that disaggregating the prefill and decode phases is a highly effective strategy for scaling LLM inference. By eliminating the interference inherent in co-located execution and using predictive scheduling, the system provides a significant leap in both performance and cost-efficiency for real-world, mixed-workload environments.

Summary updated

BibTeX
@misc{hu2024inference,
  author = {Cunchen Hu and Heyang Huang and Liangliang Xu and Xusheng Chen and Jiang Xu and Shuang Chen and Hao Feng and Chenxi Wang and Sa Wang and Yungang Bao and Ninghui Sun and Yizhou Shan},
  title = {{Inference without Interference: Disaggregate LLM Inference for Mixed Downstream Workloads}},
  year = {2024},
  eprint = {2401.11181},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.11181},
}
Figure