TL;DR
UELLM is a unified inference-serving framework that co-optimizes request batching and hardware deployment for Large Language Models (LLMs). By predicting request output lengths to minimize memory waste and strategically mapping model layers across specific GPU topologies, UELLM slashes inference latency by up to 90% and boosts throughput up to 5× while strictly satisfying Service Level Objectives (SLOs).
What Problem Does This Paper Address?
In Machine Learning as a Service (MLaaS) clouds, LLM inference is incredibly expensive, consuming up to 90% of cloud infrastructure costs. Serving these models in real-time presents a nasty trifecta of bottlenecks:
- Memory vs. Communication Trade-offs: LLMs are too massive for a single GPU, requiring distributed deployment. However, adding more GPUs increases communication overhead, while too few leads to Out-of-Memory (OOM) errors.
- The KV Cache Bloat: Standard batching techniques pad requests to match the longest sequence in a batch. Because the Key-Value (KV) cache grows linearly with batch size and sequence length, batching requests with highly disparate lengths wastes massive amounts of GPU memory and compute.
- Strict, Diverse SLOs: User-facing applications require low latency, but naive scheduling easily violates these Service Level Objectives (SLOs), especially when urgent, short requests get trapped behind long-running generation tasks.
As shown in the paper's motivational analysis, even slight changes in deployment configurations (GPU numbers and batch sizes) drastically impact latency, memory, and utilization:
Methods
UELLM addresses these challenges by unifying scheduling and deployment into a three-pronged architecture:
- Resource Profiler: Instead of blindly batching requests, UELLM uses an online fine-tuned LLM (ChatGLM3-6B) to predict the token length bucket of incoming queries. It achieves a high degree of accuracy, allowing the system to know the resource demands of a request before it runs.
- Batch Scheduler (SLO-ODBS): The SLO and Output-Driven Dynamic Batch Scheduler groups queries based on both their predicted output lengths and their remaining SLO time. By packing requests with similar lengths together, it minimizes redundant padding tokens and prevents SLO violations.
- LLM Deployer (HELR): The High-Efficiency Low-Latency Resource Allocation algorithm uses dynamic programming to automatically determine the optimal "device map"—meaning which model layers go to which specific GPU. It accounts for the cluster's exact network topology (e.g., prioritizing fast NVLink connections over slower PCIe bridges).
The end-to-end framework orchestrates these components seamlessly from application request to the GPU cluster:
Datasets
The authors utilized several open-source datasets to train and evaluate their resource profiler's length-prediction capabilities:
- Alpaca Q&A Dataset: Used for the initial fine-tuning of the ChatGLM3-6B predictor to categorize output lengths into distinct buckets.
- Google Natural-Questions Dataset & Alpaca GPT-4 Dataset: Used as evaluation benchmarks to test the generalizability of the length predictor.
The overall system evaluation was performed using the ChatGLM2-6B model deployed on a local cluster of four Nvidia RTX 3090 GPUs with artificially constrained power limits to simulate heterogeneous hardware environments.
Key Insights and Ideas
- Padding is the Enemy: Grouping requests with similar output lengths dramatically reduces the peak size of the KV cache. This optimization frees up memory, allowing for larger batch sizes and higher effective throughput.
- Topology-Aware Layer Mapping: Simply throwing more GPUs at a model can actually hurt performance due to communication bottlenecks. A smart layer-to-GPU mapping that respects hardware topology can double throughput compared to a naive configuration.
- The Power of Unification: Previous state-of-the-art methods looked at batching (like $S^3$) or deployment auto-configuration (like Morphling) in isolation. UELLM proves that co-designing the scheduling and deployment layers yields compounding performance gains.
Key Results
Compared to state-of-the-art baselines ($S^3$ and Morphling), the full UELLM implementation (UA) demonstrated massive performance leaps:
- Latency Reduction: Reduced inference latency by 72.3% to 90.3%.
- Throughput Boost: Increased throughput by 1.92× to 4.98×.
- Resource Efficiency: Enhanced GPU utilization by 1.2× to 4.1×.
- SLO Compliance: Achieved a 0% SLO violation rate (100% non-violation), whereas baseline methods like $S^3$ suffered from over 48% SLO violations under high request loads.
Limitations and Future Work
While the results are impressive, the paper notes a few limitations:
- Scale of Evaluation: The framework was evaluated on a relatively small local cluster (4× Nvidia RTX 3090 GPUs) using a 6-billion parameter model. It remains to be seen how well the dynamic programming deployment algorithm scales to massive, multi-node clusters running 100B+ parameter models.
- Predictor Robustness: The resource profiler relies on an online fine-tuned model to predict sequence lengths. If user prompt distributions shift drastically and rapidly, the predictor's accuracy might temporarily degrade before it adapts, potentially leading to sub-optimal batching.
Summary updated