Keep or Preempt? Termination-Aware Scheduling for LLM Serving with Speculative Decoding

Ziyu Cheng, Mingyan Li, Songtao Guo, Chang Han, Hongyu Xu, Xu LuoNeurIPS 2026

TL;DR

Imagine running a grocery store express lane, except some customers move through scanning five items at once while others scan one by one. Judging who finishes first just by counting items in their cart suddenly breaks down—and that is the exact scheduling dilemma created by speculative decoding in Large Language Models (LLMs). This paper introduces AlmostDone, a lightweight scheduling framework that peeks inside a model's live execution to spot requests on the verge of finishing, dramatically cutting wait times without thrashing the GPU.

What Problem Does This Paper Address?

When you chat with an LLM, you care about two clocks: how quickly it starts talking (Time-To-First-Token, or TTFT) and how long it takes to finish (End-to-End latency, or E2E). Under heavy traffic, long requests clog up GPU capacity—a bottleneck called head-of-line blocking.

Historically, the optimal remedy is Shortest Remaining Processing Time (SRPT) scheduling: let quick tasks cut in front of long ones. In standard LLM serving, where models generate one token per step, "remaining tokens" equals "remaining time." Schedulers simply guess the output token length and prioritize accordingly.

Enter speculative decoding, where a tiny, fast "draft" model guesses several tokens ahead, and the massive "target" LLM verifies them in a single parallel step. Now, one step might yield five tokens or just one, depending on how well the draft model guessed. Token count is no longer a reliable proxy for time! Worse, pausing a running request to let an urgent one cut in (preemption) isn't free; swapping memory states too aggressively slows down token generation across the board.

Figure 1: Speculative decoding process and motivation for ALMOSTDONE.

Methods

Instead of guessing total token lengths upfront, AlmostDone reframes the problem around verification steps using two tightly coupled, online components:

  1. The Near-Termination Predictor: Rather than asking "How many tokens are left?", a tiny neural network asks "Will this request finish within the next few verification rounds?" After each step, it ingests live signals that require zero extra LLM forward passes: draft acceptance patterns, verifier confidence margins, the step index, and hidden states already computed by the target LLM. Using a 1D convolution and a Gated Recurrent Unit (GRU), it outputs a weighted "near-termination score." Crucially, this tiny computation runs asynchronously in parallel with ongoing GPU decoding, hiding its own latency.
  2. Switching-Aware Scheduling Policy: At each scheduling epoch, the controller decides who stays on the GPU and who gets paused. It balances three competing forces: keeping requests with high near-termination scores, admitting waiting requests that have grown urgent, and respecting a long-term "switching cost" budget. Using a mathematical technique called Lyapunov optimization (modeled as a virtual queue), it prevents pause-resume churn by refusing to preempt requests unless the urgency benefit clearly outweighs the interruption penalty.

Datasets

No new datasets were introduced; the authors used established benchmarks to simulate realistic online traffic:

  • Alpaca: 52,000 requests split 80/20. The 80% split trained the predictor, while held-out requests formed three controlled test workloads (500, 1,000, and 2,000 requests).
  • ShareGPT: Used to test zero-shot generalization on unseen conversational prompts without retraining the predictor.
  • BurstGPT: Real-world arrival timestamps replayed over ShareGPT prompts to test how the system handles sudden, spiky traffic surges.

Key Insights and Ideas

  • Steps beat tokens: Even with an "oracle" scheduler that magically knows exact future output lengths, sorting requests by verification steps dramatically outperforms sorting by token count under speculative decoding. Two 700-token responses can require vastly different numbers of GPU rounds depending on how predictable the text is to the draft model.
  • Imminent completion is all you need: Estimating exact remaining time early in a prompt's life is noisy and error-prone. Simply knowing which requests are "almost done" right now is much easier to predict accurately and is sufficient to keep the batch moving smoothly.
  • Preemption is a double-edged sword: Pausing a request four times inflates its median end-to-end latency by ~1.7× and inter-token latency by ~4.3×. Treating preemption as a budgeted resource prevents the scheduler from sabotaging itself under heavy load.

Key Results

Built atop the popular open-source vLLM engine (primarily testing Qwen2.5-7B with a 0.5B draft model, alongside Llama-3 and Qwen3 pairs), AlmostDone delivered substantial speedups:

  • Vs. Default vLLM (First-Come, First-Served): Up to 5.65× lower mean TTFT (and 5.29× median), alongside 1.63× lower mean and 2.46× lower median E2E latency. For example, under heavy load (100 req/s on Trace-2), mean TTFT plunged from 141.0s to 39.8s.
  • Vs. Prompt-Length Predictors: A DistilBERT-based shortest-job-first scheduler performed nearly identically to basic FCFS under speculative decoding, proving prompt-only token estimates fall flat here.
  • Vs. Oracle Baselines: Against TRAIL+—a preemptive baseline gifted with exact ground-truth future token lengths—AlmostDone still achieved up to 2.06× lower mean TTFT and 1.29× lower mean E2E latency, proving that runtime step awareness trumps perfect token-length foresight.

Limitations and Future Work

The authors highlight two practical boundaries:

  • Pair-Specific Training: Because the predictor reads internal hidden states and specific draft-verify dynamics, it must be trained separately for each target–draft model pair. Transferring a single predictor across model families without retraining remains an open question.
  • Single-Instance Scope: Multi-GPU tests used tensor parallelism within a single serving instance. Scaling this termination-aware logic to route or migrate requests across a distributed cluster of multiple independent workers is left for future exploration.

Summary updated

Abstract

Efficient inference is critical for interactive large language model (LLM) serving, where both time-to-first-token (TTFT) and end-to-end (E2E) latency shape user experience. Speculative decoding has emerged as a promising solution that reduces inference latency by employing lightweight drafting and parallel verification. However, it introduces a new scheduling issue, i.e., traditional shortest remaining processing time (SRPT) scheduling based on output length estimation becomes less reliable due to its paradigm shift in inference structure. In this paper, we explore the preemption mechanism of speculative decoding-based LLM serving systems and show that — besides the output length, a request's remaining service time depends on draft acceptance and the number of verification rounds. Building on this insight, we develop a novel termination-aware scheduling framework, named AlmostDone, which first *identifies requests that are almost done* within several future local decoding steps. It achieves this by introducing a lightweight predictor built from runtime draft-and-verify states, which helps approximate the SRPT-like scheduling better than existing approaches. Then, AlmostDone *determines whether preemption is worthwhile* through a switching-aware online policy to limit excessive running-set alterations.
BibTeX
@inproceedings{cheng2026keep,
  author = {Ziyu Cheng and Mingyan Li and Songtao Guo and Chang Han and Hongyu Xu and Xu Luo},
  title = {{Keep or Preempt? Termination-Aware Scheduling for LLM Serving with Speculative Decoding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=UVkupZzqjJ},
}
Figure