Abstract
In the context of Machine Learning as a Service (MLaaS) clouds, the extensive use of Large Language Models (LLMs) often requires efficient management of significant query loads. When providing real-time inference services, several challenges arise. Firstly, increasing the number of GPUs may lead to a decrease in inference speed due to heightened communication overhead, while an inadequate number of GPUs can lead to out-of-memory errors. Secondly, different deployment strategies need to be evaluated to guarantee optimal utilization and minimal inference latency. Lastly, inefficient orchestration of inference queries can easily lead to significant Service Level Objective (SLO) violations. To address these challenges, we propose a Unified and Efficient approach for Large Language Model inference serving (UELLM), which consists of three main components: 1) resource profiler, 2) batch scheduler, and 3) LLM deployer. UELLM minimizes resource overhead, reduces inference latency, and lowers SLO violation rates. Compared with state-of-the-art (SOTA) techniques, UELLM reduces the inference latency by 72.3% to 90.3%, enhances GPU utilization by 1.2X to 4.1X, and increases throughput by 1.92X to 4.98X, it can also serve without violating the inference latency SLO.
Introduction
Deploying Large Language Models (LLMs) at scale within Machine Learning as a Service (MLaaS) environments presents a complex optimization problem. Providers must balance the risk of Out-of-Memory (OOM) errors from under-provisioning against the diminishing returns and increased communication latency caused by over-provisioning GPUs. Furthermore, standard batching techniques often fail to account for the variable output lengths of LLM queries, leading to significant memory waste through padding. UELLM addresses these systemic inefficiencies by unifying resource profiling, scheduling, and deployment.
System Architecture
The UELLM framework is built upon three integrated pillars designed to optimize the inference pipeline from request arrival to hardware execution.
- Resource Profiler: To preemptively manage resource demands, UELLM employs a fine-tuned ChatGLM3-6B model to predict the expected output length of incoming queries. By achieving high accuracy (~99% on specific benchmarks), the system can allocate resources more precisely.
- SLO-ODBS (Batch Scheduler): This component utilizes an SLO-aware "bin-packing" algorithm. It groups requests not just by arrival time, but by predicted output length and Service Level Objective (SLO) deadlines. This minimizes padding overhead and ensures high-priority requests meet their latency targets.
- HELR (LLM Deployer): Recognizing that hardware topology significantly impacts performance, the deployer uses dynamic programming to map model layers to GPUs based on physical interconnects (e.g., NVLink vs. PCIe). This strategy minimizes communication bottlenecks.
Key Insights: KV Cache and Topology
A critical bottleneck in LLM inference is the Key-Value (KV) Cache, which stores previous tokens and grows linearly with sequence length. UELLM's length-aware batching directly mitigates this by grouping similar requests, reducing redundant token processing. Additionally, the research emphasizes that hardware awareness is mandatory; the arrangement of a model across a cluster's specific wiring can double throughput, proving that simply adding more compute is insufficient without strategic mapping.
Performance Evaluation
UELLM was evaluated on a cluster of Nvidia RTX 3090 GPUs using datasets including Alpaca and Google Natural-Question. The system was compared against state-of-the-art baselines like Morphling and $S^3$.
The results demonstrate substantial improvements across all key metrics:
- Latency: Inference latency was reduced by 72.3% to 90.3%.
- Throughput: Tokens-per-second increased by 1.92× to 4.98×.
- Utilization: GPU utilization improved by 1.2× to 4.1×.
- SLO Compliance: Under high-load scenarios, UELLM maintained a 0% SLO violation rate, significantly outperforming modular baseline methods.
Conclusion
UELLM demonstrates that a unified approach to LLM serving—combining predictive profiling, intelligent scheduling, and topology-aware deployment—can drastically improve the efficiency of MLaaS clouds. While future work will focus on scaling these techniques to multi-node distributed environments, UELLM currently provides a robust solution for maximizing the performance of local GPU clusters.
Summary updated