Introduction
Traditional Large Language Model (LLM) serving systems are typically "content-ignorant," employing scheduling strategies like First-Come-First-Served (FCFS) or Shortest-Job-First (SJF). While these methods can optimize for aggregate metrics like throughput or average latency, they fail to account for the semantic importance of individual requests. In high-stakes environments—such as emergency dispatch or medical triage—this lack of awareness leads to "head-of-line blocking," where a critical, life-saving request may be delayed behind a low-priority routine task simply because of its arrival time.
This paper introduces Semantic Scheduling, a content-aware framework designed to prioritize urgent requests and intelligently manage GPU resources to ensure that time-sensitive tasks are processed with minimal delay.
The Semantic Scheduling Framework
The proposed system moves beyond simple latency-aware scheduling by implementing a multi-stage pipeline that integrates semantic understanding directly into the inference engine.
Dual Semantic Predictors
Upon arrival, every prompt is processed by two lightweight auxiliary models (e.g., DistilBERT). The first predicts Urgency based on the Emergency Severity Index (ESI), while the second estimates Output Length. These predictions allow the system to quantify both the priority and the expected computational cost of each request before it ever reaches the main LLM.
Priority-Driven Queue and Memory Management
To maintain high responsiveness, the system utilizes an asynchronous thread to manage a MinHeap queue. This ensures that the highest-priority task is always at the front of the line the moment GPU capacity becomes available.
Furthermore, the framework redefines how GPU memory (KV cache) is handled. When memory is full, the system uses a MaxHeap to identify "victim" requests—those with the lowest priority and longest remaining generation time—to be evicted. This "priority-based eviction" effectively sacrifices the memory state of less important tasks to keep the GPU's "focus" on critical emergencies.
Stage-Aware Continuous Batching
LLM inference consists of two distinct phases: prefilling (processing the prompt) and decoding (generating tokens). Standard continuous batching can allow a new low-priority prefill to stall the decoding of an existing high-priority request. The Semantic Scheduling algorithm employs stage-aware logic to dynamically adjust batches, preventing this specific type of priority inversion.
Experimental Evaluation
The researchers evaluated the system using a real-world-inspired EMS Dataset containing ~1,000 conversational interactions with emergency services, annotated with ESI urgency levels. They also tested the system against synthetic "request spikes" of up to 100 concurrent requests to simulate extreme congestion.
Key Results
- Critical Task Acceleration: For the most urgent tasks (Urgency Level 0), the system achieved a staggering 167.3x speed-up in normalized waiting time compared to standard FCFS baselines.
- Resilience to Congestion: During traffic bursts, semantic scheduling outperformed traditional baselines (like Highest-Priority Job First) by 1.7x to 8.7x.
- Efficiency: Despite the overhead of running auxiliary predictor models, the reduction in queuing delays for high-priority tasks resulted in significantly lower overall system latency for critical workloads.
Discussion and Future Work
The core insight of this work is that in critical domains, average waiting time is a secondary metric; the true measure of success is the latency of the most vital tasks. By treating the KV cache as a prioritized resource and using semantic predictors, the system ensures that the LLM's "attention" is always directed where it is needed most.
However, the system's performance is inherently tied to the accuracy of its predictors. If a critical request is misclassified as low-priority, the benefits of the system are negated. Future research will focus on developing more robust, ensemble-based predictors and exploring other semantic dimensions beyond urgency, such as task dependencies in complex agentic workflows.
Summary updated