TL;DR
This paper introduces QLM, a novel queue management system designed to optimize the serving of Large Language Models (LLMs) by intelligently handling both interactive and batch requests with varying Service Level Objectives (SLOs). QLM significantly improves SLO attainment and throughput by accurately estimating request waiting times and orchestrating LLM Serving Operations (LSOs).
What Problem Does This Paper Address?
The increasing demand for LLM-powered applications, from chatbots to data analysis tools, has created a critical need for efficient LLM serving systems. Existing systems often struggle to balance the demands of low-latency interactive requests (like those for chatbots) with the more relaxed SLOs of batch requests (like data processing). This mismatch leads to inefficient resource utilization, poor multiplexing of different request types and models, and ultimately, a failure to meet SLOs. The core challenge is to manage a unified queue of diverse requests to maximize SLO satisfaction and resource efficiency.
Methods
QLM tackles this problem through a multi-pronged approach:
- Request Groups: Instead of managing individual requests, QLM groups similar requests (based on model type, SLO, and token distribution) to simplify optimization and reduce overhead.
- Virtual Queues: These queues abstract the underlying LLM serving instances, providing a unified interface for managing LLM Serving Operations (LSOs).
- Request Waiting Time (RWT) Estimator: This novel component accurately estimates the waiting time for requests, leveraging statistical properties of continuous batching in LLM inference. This is crucial because traditional DNN serving systems often overestimate waiting times, leading to suboptimal resource allocation.
- Global Scheduler: This component uses the RWT estimates to reorder request groups within virtual queues, aiming to maximize SLO attainment. It employs a linear programming model to handle complex interdependencies between LSOs and SLO constraints.
- LLM Serving Operations (LSOs): QLM orchestrates key operations like request pulling, request eviction (to prioritize interactive requests), load balancing, and model swapping to dynamically manage resources and meet SLOs.
Datasets
The paper uses the ShareGPT dataset for its experimental workloads. This dataset is described as being derived from production requirements. The authors also mention using workloads with varying input and output token distributions, as illustrated in Figure 8 of the paper.
Key Insights and Ideas
- The "batch vs. interactive" dilemma is real: Simply mixing batch and interactive requests without intelligent management leads to significant performance degradation and SLO violations.
- Accurate waiting time estimation is key: Overestimating waiting times, as done by previous systems, leads to wasted resources. QLM's RWT estimator provides a more precise prediction, enabling better scheduling.
- Request grouping simplifies complexity: Treating groups of similar requests as single units dramatically reduces the computational burden of optimization.
- LSOs are powerful tools, but need orchestration: Operations like request eviction and model swapping are essential, but their effectiveness hinges on intelligent coordination, which QLM provides.
- LLM inference has unique characteristics: The autoregressive nature and KV cache management of LLMs require specialized approaches, which QLM's RWT estimator accounts for.
Key Results
QLM demonstrates significant improvements over baseline systems (vLLM, EDF, SHEPHERD):
- SLO Attainment: QLM achieves 40-90% higher SLO attainment compared to vanilla vLLM and 50-90% higher compared to traditional ML serving systems like SHEPHERD.
- Request Throughput: QLM improves throughput by 20-400% in single-model serving and 3-4x higher in multi-model serving.
- Resource Utilization: QLM maintains or improves device utilization, leading to 2-5x GPU requirement reduction in some scenarios.
- LSO Contributions: The paper shows that each LSO (request pulling, eviction, load balancing, model swapping) contributes to performance, with model swapping being particularly impactful in multi-model scenarios.
Limitations and Future Work
- Small Queue Size Conservatism: For very small queues, QLM's RWT estimator may overestimate waiting times, leading to underutilization.
- Out-of-Distribution Tokens: Extremely rare token distributions (many standard deviations from the mean) could lead to underestimation and potential SLO violations, though the authors note these are rare in practice.
- Insufficient Resources: If the demand for LLM serving consistently exceeds available resources, QLM might not be able to meet all SLOs. In such cases, scaling up resources, falling back to heuristics, or implementing admission control are suggested.
- Future Work: The authors suggest extending QLM to support other LSOs like GPU partitioning (NVIDIA MIG), handling end-to-end latency SLOs (including decoding iterations), and defining SLOs based on inter-token latency. They also propose exploring strict request priorities instead of SLOs.
Summary updated