TL;DR
Researchers have developed a "training-free self-scheduling" paradigm where Large Language Models (LLMs) use their own reasoning capabilities to predict the length of incoming requests. By prioritizing shorter tasks—a classic "Shortest Job First" strategy—this approach achieves up to a 6× reduction in latency and a 9× increase in throughput without requiring any additional model training or auxiliary predictors.
What Problem Does This Paper Address?
In the world of LLM serving, the default scheduling policy is usually First-Come-First-Served (FCFS). While simple, FCFS suffers from a major bottleneck known as Head-of-Line (HoL) blocking. Imagine standing in a grocery line behind someone with three full carts when you only have a single candy bar; you are "blocked" by a much longer task. In LLM serving, a request for a 2,000-token essay can stall dozens of 5-token "Yes/No" queries, leading to poor user experience and inefficient GPU utilization.
Existing solutions try to predict request lengths using auxiliary models (like BERT or lightweight regression models). However, these predictors require expensive training, add system complexity, and often fail to generalize. If you train a predictor on chat data, it will likely perform poorly on specialized domains like competitive programming or advanced mathematics.
Methods
The authors propose LLM Self-Scheduling, leveraging the model's internal "intuition" about how long a response will take. Instead of an external model, the serving LLM itself acts as the scheduler. They investigated three primary strategies:
- PrefillOnly: Uses the probability (logits) of the very first token to guess which request in a batch will be the shortest. It’s the fastest but least accurate.
- RankOnly: The LLM is prompted to look at a batch of requests and simply rank them from "easiest/shortest" to "hardest/longest."
- LengthOnly: The LLM is prompted to estimate the specific number of tokens each response will require. This is the most accurate but incurs the highest token overhead.
To prevent long requests from being ignored forever, the authors implemented a Unified Batching and Priority Scheduling algorithm with an anti-starvation mechanism. If a request waits too long, its priority is boosted to ensure it eventually reaches the GPU.
Datasets
The researchers evaluated their method across three distinct domains to test generalization:
- NuminaMath: Competition-level math problems that require deep reasoning and often produce long Chain-of-Thought (CoT) responses.
- TACO: A benchmark for algorithmic code generation, representing highly technical, structured tasks.
- ShareGPT: A dataset of real-world user interactions, representing general-purpose conversational AI.
Key Insights and Ideas
- The "LLM-as-a-Judge" for Scheduling: The core "aha" moment is that if an LLM is smart enough to solve a math problem, it is smart enough to know that the problem is difficult and will require a long explanation.
- Generalization is Free: Unlike BERT-based predictors that need retraining for every new domain, self-scheduling generalizes instantly. The same LLM can schedule math, code, and chat requests interchangeably because it understands the context of all three.
- Long-Tail Sensitivity: The method is most effective on datasets with "long-tail" distributions (like math and code), where the difference between the shortest and longest requests is massive.
- Thinking Mode Compatibility: The approach remains effective even for "thinking" models (like DeepSeek-R1 or Qwen-7B-Cold), where internal reasoning steps make output lengths even more unpredictable for traditional schedulers.
Key Results
The performance gains are substantial across the board:
- Latency: Achieved up to a 6× reduction in P95 latency for math workloads.
- Throughput: Increased throughput by up to 9× in specific scenarios.
- Efficiency: Improved Time to First Token (TTFT) by 5× and Time per Output Token (TPOT) by 3×.
- Negligible Overhead: The
LengthOnlystrategy, despite being the most "expensive," only added about 55ms of latency to a batch of 20 requests—a tiny fraction of the time saved by avoiding HoL blocking.
Limitations and Future Work
While promising, the paper notes a few areas for further exploration:
- Prompt Overhead: Even though the overhead is small, the LLM still spends tokens on scheduling rather than answering. Optimizing the "rank prompts" to be even more concise is a clear next step.
- Batching Dependencies: The system's efficiency relies on having a large enough pool of incoming requests to create meaningful batches for comparison. In very low-traffic scenarios, the benefits diminish.
- Fairness vs. Efficiency: While the anti-starvation mechanism works, the authors suggest that fine-tuning the balance between "Shortest Job First" efficiency and absolute fairness is a complex, ongoing challenge for system designers.
This work marks a shift toward "intelligent" infrastructure, where the model isn't just a passive engine, but an active participant in managing its own workload.
Summary updated