NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SPIRIT: Speed-Driven Online Adaptation for Self-Speculative Decoding

Chenghao Liu, Chengbo Zhan, Hui Lu, Jia RaoNeurIPS 2026

TL;DR

Large language models generate text painfully slowly—one token at a time—and self-speculative decoding tries to speed this up by skipping layers to quickly "draft" guesses before verifying them in parallel. However, existing methods choose which layers to skip by optimizing for guess accuracy rather than actual wall-clock speed. SPIRIT fixes this objective mismatch by treating inference as a live control system that directly optimizes real-world throughput (tokens per second) on the fly, unlocking plug-and-play speedups of up to 2.48× with zero retraining or offline profiling.

What Problem Does This Paper Address?

Autoregressive decoding is the ultimate bottleneck in LLM serving: generating 100 tokens requires 100 sequential trips through a massive neural network. Speculative decoding breaks this bottleneck by having a fast "draft" model guess several tokens ahead, which the full "target" model then checks in a single parallel pass. Better yet, self-speculative decoding avoids hosting a second model entirely—it creates the drafter on the fly simply by skipping intermediate Attention and MLP layers inside the target model itself.

The catch? Knowing which layers to skip depends heavily on the task (summarizing news vs. writing Python). Offline calibration can take up to 20 hours of Bayesian optimization for a 70B model. Recent online methods adapt dynamically, but they optimize a surrogate proxy: agreement (how often the full model accepts the draft's guesses).

Figure 1: Why agreement alone is not the objective. (a) Similar draft acceptance can still yield different decode throughput. (b) Skip ratio shapes the dominant throughput frontier.

As the authors show above, agreement is not speed. Two layer-skipping configurations can have the exact same 97% acceptance rate, yet yield wildly different tokens-per-second because skipping different layers incurs different memory and compute costs. Optimizing for agreement leaves major wall-clock performance on the table.

Methods

SPIRIT reframes layer-skipping as a closed-loop runtime control problem that directly maximizes realized decode throughput—committed output tokens divided by elapsed wall-clock time—without interrupting generation for extra validation passes.

Figure 2: SPIRIT as closed-loop runtime control for self-speculative decoding. Each runtime window is both productive and evaluative: ordinary speculative execution advances decoding while emitting the statistics used for lightweight boundary updates (red), without any auxiliary validation stage. This induces two nested control loops: within-request hierarchical adaptation from ratio search to fixed-ratio layer refinement, and cross-request shift-aware profile reuse via stay, switch, refine, or restart.

What makes SPIRIT's architecture novel is how it structures and stabilizes this live search:

  • Execution-Native, Length-Normalized Feedback: Every short window of speculative generation acts as its own experiment, emitting token counts and timing data. Because LLM generation naturally slows down as the sequence grows (due to a ballooning KV-cache), SPIRIT applies an online length-aware normalization factor so the controller doesn't mistake normal long-context slowdown for a bad layer configuration.
  • Two-Stage Hierarchical Search (Within-Request): A raw binary mask over dozens of layers is a combinatorial nightmare. SPIRIT splits the choice into how much to skip (the skip ratio $r$) and where to skip (the pattern $L$). Stage I uses a confidence-guided "zooming" search to quickly lock onto the optimal skip ratio. Stage II freezes that ratio and refines the exact Attention/MLP pattern using a mix of random exploration and lightweight Bayesian optimization.
  • Shift-Aware Profile Reuse (Cross-Request): Real servers face shifting workloads. SPIRIT saves successful configurations alongside their statistical "signatures" in a profile bank. By watching the first few windows of a new request, it detects workload shifts and decides whether to stay put, switch to a stored profile, briefly refine, or restart search from scratch.

Datasets

Because SPIRIT is strictly training-free, datasets are used purely for live evaluation across diverse serving regimes:

  • General & Reasoning Tasks: CNN/DailyMail (summarization), TinyStories (open-ended generation), and GSM8K (mathematical reasoning).
  • Code Generation: HumanEval (evaluated under both greedy pass@1 and sampling pass@10).
  • Broad Multi-Domain Suite: SpecBench, covering Translation, Summarization, QA, Math, RAG, and Multi-turn dialogue.
  • Non-Stationary Stream: The authors construct a synthetic 600-request stream that cycles between TinyStories, CNN/DM, and GSM8K every 100 requests to stress-test adaptation to sudden task shifts.

Key Insights and Ideas

  • Goodhart's Law hits speculative decoding: Optimizing for draft acceptance rate ($\alpha$) instead of true throughput degrades average speedup by over 21% in ablations. A slightly less accurate drafter that runs much faster often wins the wall-clock race.
  • The skip ratio is the master knob: Plotting configurations reveals that the fraction of skipped layers ($r$) dictates the macro-level speed frontier, while specific layer choices ($L$) account for smaller local variations. Separating them shrinks the search space dramatically.
  • The observer shouldn't slow down the observed: Prior online baseline SWIFT spends 76.6% of its adaptation-window time just running controller updates (cloning KV-caches and running surrogate forward passes). Because SPIRIT piggybacks on native runtime counters over multi-step windows, its controller overhead is just 8.2%.
  • Free lunches with low-bit self-drafting: Using 4-bit (NF4) quantized views of the model's own MLP weights for drafting—while keeping full precision for verification—dramatically accelerates the draft path while remaining 100% lossless in output distribution.

Key Results

Across LLaMA-2 (13B, 70B), CodeLLaMA (13B, 34B), Qwen2.5/3, and Mixtral-8×7B, SPIRIT consistently beats standard autoregressive (AR) decoding and training-free baselines (Draft & Verify and SWIFT) without changing the target model's output distribution:

  • Stationary Tasks: Achieves up to 1.68× speedup on LLaMA-2-13B and 1.74× on LLaMA-2-70B (using FP16 drafts). On CodeLLaMA-34B (HumanEval), it hits 1.47× vs. SWIFT's 1.24×.
  • Low-Bit Self-Drafts: Pairing SPIRIT with NF4 self-drafts pushes speedups up to 2.14× on LLaMA-2-13B benchmarks (and up to 2.48× overall across tested regimes).
  • Shifting Workloads & Batching: Under the 600-request task-switching stream on LLaMA-2-70B, SPIRIT maintains a 1.60× speedup (vs. SWIFT's 1.36×). On SpecBench, it outperforms SWIFT by 17.2% overall. In batched serving, it sustains speedups of 1.44×, 1.42×, and 1.23× at batch sizes 1, 2, and 4.

Limitations and Future Work

While the main paper does not include a dedicated "Limitations" section (possibly deferred to the appendix), one practical constraint is apparent in the batched serving experiments: as batch size increases from $B=1$ to $B=4$, SPIRIT's speedup over autoregressive decoding tapers off from 1.44× down to 1.23×. As batching naturally saturates GPU compute utilization during standard decoding, the spare hardware headroom that makes speculative verification "cheap" shrinks—highlighting an ongoing systems challenge for scaling self-speculative controllers to high-concurrency batch regimes.

Summary updated

BibTeX
@inproceedings{liu2026spirit,
  author = {Chenghao Liu and Chengbo Zhan and Hui Lu and Jia Rao},
  title = {{SPIRIT: Speed-Driven Online Adaptation for Self-Speculative Decoding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=4y9wxYdbsM},
}
Figure