AdaSPEC: Selective Knowledge Distillation for Efficient Speculative Decoders

Yuezhou Hu, Jiaxin Guo, Xinyu Feng, Tuo Zhao

TL;DR

AdaSPEC improves Speculative Decoding by introducing a selective distillation process that filters out "hard-to-learn" tokens during training. By allowing tiny draft models to focus their limited capacity only on tokens they can realistically master, AdaSPEC achieves up to a 15% higher token acceptance rate and significant wall-clock speedups compared to state-of-the-art methods.

What Problem Does This Paper Address?

Large Language Models (LLMs) are powerful but notoriously slow due to their "autoregressive" nature—they generate text one token at a time, and each token requires a full pass through a massive neural network. Speculative Decoding (SD) is a popular fix: a tiny "draft" model quickly guesses several future tokens, and the large "target" model verifies them all in a single parallel pass.

The bottleneck in SD is the acceptance rate: if the tiny model guesses poorly, the big model rejects the work, and no speed is gained. To improve these guesses, researchers use Knowledge Distillation (KD), training the tiny model to mimic the big one. However, tiny models (e.g., 31M parameters) simply don't have the "brainpower" to mimic a giant model (e.g., 70B parameters) on every single token. Standard KD forces the tiny model to try anyway, wasting its limited capacity on complex tokens it will never get right. This often degrades its performance on the "easy" tokens it could have mastered.

Methods

The authors propose AdaSPEC, a two-phase distillation framework that implements "selective learning."

  1. Reference Model Training: They first train a "reference" version of the draft model using standard distillation. This model serves as a benchmark for what a small model can typically achieve.
  2. Token Filtering: They compare the performance of the draft model against the target model token-by-token. They calculate a "learnability" score based on the difference in KL divergence (a measure of how much probability distributions differ).
  3. Selective Distillation: Instead of training on the whole dataset, AdaSPEC identifies the "hard" tokens (where the small model is hopeless) and filters them out. The final draft model is distilled using only the "easy" or "highly learnable" tokens (typically the top 40%).
AdaSPEC token filtering process

By ignoring the "PhD-level" tokens, the "middle-school" draft model becomes much more reliable at the "elementary" tokens, which is exactly what's needed to keep the speculative decoding chain moving.

Datasets

The researchers evaluated AdaSPEC across five diverse benchmarks to ensure robustness:

  • GSM8K: Multi-step arithmetic reasoning.
  • Alpaca: General instruction-following.
  • MBPP: Python programming and code generation.
  • CNN/Daily Mail: Long-form news summarization.
  • XSUM: Extreme (one-sentence) summarization.

They also tested integration with the ShareGPT dataset and MT-Bench for more advanced speculative decoding architectures.

Key Insights and Ideas

  • Capacity Matters: A 31M parameter model is roughly 1/45th the size of a 1.4B model. Expecting it to perfectly replicate the larger model's logic is a recipe for failure. AdaSPEC treats the draft model as a specialized assistant rather than a mini-clone.
  • The "Hard Token" Trap: In math tasks (GSM8K), the model found that specific operators and digits are the most "learnable" and critical for alignment. Wasting capacity on complex linguistic nuances in a math problem actually hurts the model's ability to guess the next number correctly.
  • Alignment Over Fidelity: For Speculative Decoding, we don't need the draft model to be "smart" in a general sense; we just need it to be a "yes-man" that predicts exactly what the big model wants to see.
  • Orthogonality: AdaSPEC isn't just for "vanilla" speculative decoding. The authors showed it could be plugged into EAGLE, a more complex SD method that uses tree-based expansion, and still provided a performance boost.

Key Results

  • Higher Acceptance Rates: AdaSPEC consistently outperformed the previous state-of-the-art, DistillSpec. In some configurations (like the 31M to 1.4B Pythia models on GSM8K), the acceptance rate jumped by over 5%.
Acceptance rate comparison across tasks
  • Wall-Clock Speedup: When tested in a real-world inference engine (vLLM) on an NVIDIA A100 GPU, AdaSPEC delivered a 10–20% speedup over existing distillation methods.
  • Scalability: The method worked across different model families (Pythia, Phi-2, CodeGen) and scales, including a massive jump from a 0.5B Qwen model to a 32B Qwen model, where it achieved an 86.21% acceptance rate.
  • Error Reduction: Qualitative analysis showed that AdaSPEC's errors are almost always a subset of the baseline's errors. It essentially "cleaned up" the draft model's output.

Limitations and Future Work

  • Two-Phase Overhead: The current method requires training a reference model first, which adds to the initial training time (though not to the final inference time).
  • Simple Filtering: The authors used a relatively simple loss-based filter. They suggest that future work could explore more "adaptive" filtering strategies that change during the training process.
  • Verification Frameworks: While they tested with EAGLE, more work is needed to see how selective distillation interacts with "multi-step" verification or look-ahead architectures.

Summary updated

BibTeX
@inproceedings{hu2025adaspec,
  author = {Yuezhou Hu and Jiaxin Guo and Xinyu Feng and Tuo Zhao},
  title = {{AdaSPEC: Selective Knowledge Distillation for Efficient Speculative Decoders}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=zNLlglSOwD},
}
Figure