Introduction
Serving Large Language Models (LLMs) at scale is challenging due to the inherent unpredictability of generation lengths. Standard scheduling techniques often suffer from significant computational waste or memory underutilization. Sequence-Level Scheduling (SLS) leads to excessive padding, while Iteration-Level Scheduling (ILS) often employs conservative memory management to prevent out-of-memory (OOM) errors. This paper introduces Slice-Level Scheduling (SCLS), a novel paradigm that partitions the generation process into fixed-length slices to optimize throughput and load balancing.
The SCLS Paradigm
SCLS breaks the predefined maximum generation length into smaller, manageable chunks called slices (e.g., 128 tokens). This approach transforms the scheduling problem from a stochastic guessing game into a deterministic optimization task. By limiting the number of iterations per schedule interval, the system can precisely estimate memory usage and serving time.
System Architecture
The SCLS framework comprises four primary components designed to maximize hardware utilization:
- Serving Time & Memory Estimators: Analytical models that predict batch performance and VRAM requirements based on slice size.
- Adaptive Batcher: A dynamic programming-based algorithm that maximizes batch size while strictly adhering to memory constraints.
- Max-Min Offloader: A load balancer that assigns the most computationally intensive batches to the least-loaded GPU workers.
- Adaptive Schedule Interval: A mechanism that dynamically adjusts how often the system fetches new requests from the pool based on current worker loads.
Motivation and Data Analysis
Analysis of over 400,000 requests from ShareGPT and CodeFuse logs reveals that the majority of LLM queries are relatively short (under 512 tokens). This distribution justifies the slicing approach; while slicing introduces a minor "re-prefill" overhead for long sequences—where the system must recalculate hidden states if a request exceeds its slice—the vast majority of requests benefit from increased batching efficiency without incurring significant penalties.
Key Results
Evaluations conducted on 8 NVIDIA A100 GPUs demonstrate that SCLS significantly outperforms existing methods across several metrics:
- Throughput: SCLS achieved up to a 315.8% increase over SLS and a 171.0% increase over state-of-the-art ILS (DeepSpeed-FastGen).
- Latency: Average response times were reduced by up to 91.1% compared to SLS.
- Load Balancing: SCLS achieved a much lower standard deviation in completion times across GPU instances, indicating near-perfect workload distribution.
- Efficiency: The system drastically reduced the number of "invalid" and "pad" tokens that typically waste GPU cycles in traditional batching.
Conclusion
Slice-Level Scheduling offers a robust solution for high-throughput LLM serving. By leveraging the predictability of fixed-length slices, SCLS enables more aggressive batching and superior load balancing. While the re-prefill overhead remains a minor limitation for long-form generation, future work exploring prefix-caching and integration with continuous batching frameworks promises to further refine this high-performance serving architecture.
Summary updated