Abstract
Large Language Model (LLM) inference involves two distinct computational phases—prefill and decode—each with conflicting performance objectives. Researchers from UT Austin have introduced a novel theoretical and practical framework, culminating in the SLAI (SLO-Aware LLM Inference) scheduler. By treating these phases as interconnected tasks and leveraging hardware-aware "optimal tiling," SLAI achieves a 53% reduction in Time To First Token (TTFT) and a 26% increase in serving capacity while strictly adhering to Service Level Objectives (SLOs) for multi-tiered user groups.
The Challenge of Mixed-Mode LLM Workloads
Scaling LLM inference is complicated by the fundamental differences between its two primary execution phases:
- Prefill Phase: The model processes the entire input prompt simultaneously. This phase is compute-bound and highly parallelizable.
- Decode Phase: The model generates responses token-by-token. This phase is memory-bandwidth bound and sequential.
Users typically evaluate performance based on two metrics: Time To First Token (TTFT), which measures initial responsiveness, and Time Between Tokens (TBT), which determines the perceived smoothness of the output. Traditional schedulers often fail to balance these; prioritizing prefills causes "stuttering" in active decodes (high TBT), while prioritizing decodes leads to long queues for new requests (high TTFT).
Methodology: RAD and SLAI
The researchers addressed these challenges through a dual-pronged approach involving theoretical modeling and practical implementation.
Theoretical Foundation: The RAD Scheduler
The Resource-Aware Dynamic (RAD) scheduler introduces the concept of "optimal tiling." By scheduling batches in sizes that align with the GPU's underlying hardware architecture (such as Tensor Cores), RAD maximizes throughput. The theory proves that dynamic allocation between prefill and decode tasks is essential for reaching the Pareto frontier of inference performance.
Practical Implementation: The SLAI Scheduler
Building on RAD, the SLAI scheduler introduces a "Last Schedulable Time" logic. Unlike standard schedulers that execute every available decode immediately, SLAI calculates the maximum allowable delay for a decode operation without violating its TBT deadline. This "slack" allows the scheduler to insert more prefill chunks into the GPU batch, clearing the entry queue faster and reducing TTFT.
Key features of SLAI include:
- Just-in-Time Scheduling: Delaying non-critical decodes to prioritize urgent prefills.
- Dynamic Memory Management: Real-time monitoring of GPU memory to prevent overflows, shifting priority back to decodes when necessary to free up KV-cache space.
Key Insights: Exploiting Hardware and Latency Budgets
- The "Staircase" Effect: GPU efficiency does not scale linearly. Due to hardware tiling, adding a token to a batch may have zero marginal cost until a specific threshold is crossed. SLAI "packs" batches to hit these hardware sweet spots.
- Deferrable Decodes: If a user's TBT target is 500ms and the previous token took 100ms, the system has a 400ms budget to prioritize other tasks. SLAI treats this budget as a resource.
- Throughput-Latency Synergy: Smarter scheduling allows for higher GPU utilization (throughput) while simultaneously reducing wait times (latency).
Experimental Results
The system was evaluated using a Mistral-7B model on an NVIDIA RTX ADA 6000 GPU, utilizing traces from the openchat_shareGPT4 dataset. The simulation included "paying" users (0.1s TBT target) and "free" users (0.5s TBT target).
Compared to the state-of-the-art Sarathi-Serve scheduler:
- 53% Reduction in Median TTFT: New requests start generating text significantly faster.
- 26% Increase in Serving Capacity: The system handles more requests per second while maintaining a median TTFT under 0.5s.
- SLA Compliance: SLAI successfully prioritized premium users while utilizing the latency slack of free-tier users to optimize overall system throughput.
Limitations and Future Directions
While SLAI represents a significant advancement, several areas remain for future exploration. Integrating FlashAttention's fused operations into the theoretical model could further refine tiling strategies. Additionally, while the current implementation is single-GPU, extending the "last schedulable time" logic to distributed clusters with KV-cache migration presents a promising research path. Finally, testing the scheduler's robustness against highly unpredictable, "bursty" traffic patterns will be critical for production-grade deployment.
Summary updated