Introduction: The Output Length Bottleneck
The surge in large language model (LLM) applications on personal devices has placed unprecedented, bursty workloads on cloud serving infrastructure. To handle this, modern systems often "disaggregate" the workload, splitting it into two distinct phases running on different machines: prefilling (processing the user's prompt) and decoding (generating the response token-by-token).
While disaggregation improves throughput, it introduces a critical scheduling challenge. Engineers know exactly how long an incoming prompt is, but the length of the generated response remains a "black box" until the generation is complete. Current state-of-the-art schedulers, such as vLLM or SGLang, typically rely on blind routing strategies like Round-Robin or Least-Request.
This blind approach frequently leads to severe load imbalance. If a single decode instance receives multiple requests requiring lengthy responses, its memory (specifically the KV Cache) quickly fills up. This causes queueing bottlenecks and forces the system to pause and swap data (preemption). The result is a massive spike in tail latency—the frustratingly long wait times users experience during peak loads.
The MAPS Framework
To address this persistent load imbalance, researchers introduce MAPS (Memory-Aware Predictive Scheduling), a framework designed specifically for disaggregated LLM serving. MAPS shifts the paradigm from reactive load balancing to proactive, predictive scheduling using three core components:
1. Device-Assisted Speculative Prediction
Instead of waiting for the cloud to guess the generation length, MAPS deploys a tiny, specialized LLM (such as a LoRA-tuned Vicuna-160M) directly on the user's edge device (e.g., a laptop or smartphone). This model predicts the response length concurrently with the cloud's prefill phase. By overlapping prediction with prefilling, MAPS effectively hides the prediction time, incurring negligible latency overhead.
2. Uncertainty-Aware Calibration (UAC)
Raw predictions are inherently flawed, and in LLM serving, underestimating output length is catastrophic. While over-reserving memory is manageable thanks to technologies like PagedAttention, under-reserving leads to memory exhaustion and costly preemptions.
To mitigate this, MAPS applies conformal calibration, a statistical technique that transforms a raw prediction into a calibrated upper bound. It provides a mathematical guarantee (e.g., a 90% confidence level) that the response will not exceed a certain number of tokens, allowing the scheduler to make safe, mathematically sound memory reservations.
3. Hierarchical Global-Local Scheduling
Armed with safe upper bounds, MAPS employs a two-tiered scheduling strategy:
- Global Routing: The system directs incoming requests to decode instances that have sufficient "reserved" memory for the predicted upper bound, preventing inter-decoder queue buildup.
- Local Scheduling: Within each decoder, MAPS utilizes a Shortest-Job-First (SJF) reordering policy. By allowing predicted short responses to "cut the line" ahead of massive generation tasks, it eliminates intra-decoder head-of-line blocking.
Experimental Setup
The researchers rigorously evaluated MAPS using a combination of real-world datasets and traces:
- Alpaca: Utilized for fine-tuning the speculative edge predictors (SP-7B and SP-160M).
- ShareGPT: A standard dataset of real-world user conversations used to simulate realistic generation workloads.
- BurstGPT: Production request arrival traces from Azure OpenAI, used to test the system's resilience against sudden traffic bursts.
Key Findings
The shift from reactive migration (e.g., systems like Llumnix) to proactive prediction yields dramatic performance improvements:
- Massive Latency Reductions: Across various workloads, MAPS reduced average end-to-end (E2E) latency by 42.6% compared to state-of-the-art baselines.
- Stabilized Tail Latency: The framework slashed P99 latency (the worst-case 1% of requests) by up to 84.8%, effectively eliminating the "randomly slow" requests that plague current LLM services.
- High Robustness: MAPS does not require a perfect crystal ball. Even when utilizing a highly compressed, less accurate 160M-parameter predictor, the system significantly outperformed vLLM and SGLang. The architectural design—specifically the uncertainty calibration—compensates for prediction inaccuracies.
- Near-Oracle Performance: In testing, MAPS performed almost as efficiently as an "Oracle" scheduler that possessed perfect knowledge of future output lengths.
Limitations and Future Directions
While MAPS presents a significant leap forward, the authors note a few areas for future exploration:
- Deployment Scale: The current evaluation was conducted on a cluster of six GPUs. While the architecture is theoretically scalable, its behavior across thousands of GPUs in a massive commercial cluster remains to be validated.
- Chain-of-Thought (CoT) Models: For reasoning models that "think" step-by-step (like OpenAI's o1), output lengths are highly variable due to internal monologues. Future iterations of MAPS will need CoT-aware predictors to handle this variance.
- Predictor Drift: As user behavior evolves over time, the on-device predictor's accuracy may degrade. While online calibration can help, periodic retraining of the edge models will likely be necessary to maintain optimal scheduling performance.
Conclusion
MAPS demonstrates that predicting LLM output lengths at the edge—and mathematically calibrating those predictions for safety—is a highly effective strategy for cloud load balancing. By preventing memory bottlenecks before they occur, MAPS offers a faster, more reliable serving infrastructure for the next generation of LLM applications.
Summary updated