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

Hierarchical Speculative Decoding with Dynamic Window

Shensian Syu, Hung-yi LeeNAACL 2025

Abstract

Large Language Model (LLM) inference is primarily limited by memory bandwidth due to the sequential nature of autoregressive decoding. Speculative Decoding (SD) mitigates this by using a smaller draft model to propose sequences that a larger target model verifies in parallel. However, standard SD faces a "Goldilocks" problem: a fixed draft window size ($K$) is often suboptimal, leading to wasted computations when the draft model is inaccurate. We present Hierarchical Speculative Decoding with Dynamic Window (HSDDW), a training-free framework that introduces an entropy-based "self-verify" mechanism for dynamic window adjustment and a hierarchical drafting structure. HSDDW achieves up to 3.13x speedup over standard autoregressive decoding across various benchmarks.

The Challenge of Speculative Decoding

In traditional Speculative Decoding, a tiny draft model predicts $K$ tokens. If $K$ is too large, the draft model's accuracy drops, causing the target model to reject many tokens and wasting cycles. Conversely, a small $K$ fails to leverage the target model's parallel processing capabilities.

Figure 1: Distribution of accepted tokens per iteration for different draft model sizes. Tiny models like Llama-68M often result in zero accepted tokens, demonstrating the efficiency gap that HSDDW seeks to bridge.

As shown in Figure 1, while smaller models are faster, their lower accuracy often leads to frequent rejections. The authors observed that a 68M model, despite its speed, can actually slow down inference compared to a 7B model because it fails to provide useful drafts for the 70B target model.

Methodology

HSDDW introduces two key innovations to address these inefficiencies without requiring additional model training.

1. Self-verify (Dynamic Window)

Instead of using a fixed window size $K$, the draft model monitors its own confidence. By calculating the entropy of the probability distribution for each generated token, the model can detect when it is likely to make a mistake. If the entropy exceeds a dynamic threshold ($\tau$), the drafting process stops immediately. This threshold is updated in real-time based on the average entropy of tokens previously rejected by the target model, ensuring the window size stays optimal for the current context.

2. Hierarchical Structure

To bridge the gap between tiny draft models and massive target models, HSDDW employs a three-tier hierarchy:

  • Stage 1 (Draft + Self-verify): A very fast, tiny model ($M_1$) generates tokens until its confidence wanes.
  • Stage 2 (Pre-verify + Self-verify): A medium-sized draft model ($M_2$) verifies the work of $M_1$. If $M_2$ is confident, it can extend the draft further.
  • Stage 3 (Verify): The massive target model ($M_p$) performs the final parallel verification of the filtered draft.
Figure 4: The HSDDW framework. It utilizes a multi-stage process where a tiny model drafts, a medium model pre-verifies and potentially extends the draft, and the target model performs final verification.

Experimental Results

The framework was evaluated using the Llama-2-Chat family (70B target; 7B and 68M drafts) across benchmarks including MT-Bench, Alpaca, HumanEval, and GSM8K.

Key findings include:

  • Significant Speedups: HSDDW achieved a 2.91x to 3.13x speedup on MT-Bench and a 2.99x speedup on Alpaca.
  • Superior Baselines: It consistently outperformed state-of-the-art methods like EAGLE, SpecDec++, and PEARL without the need for specialized training.
  • Robustness: The self-verify mechanism makes the system less sensitive to initial hyperparameter choices, as it automatically "trims" the draft window to the most efficient length.

Limitations and Future Work

While highly effective for general conversation and instruction-following, HSDDW showed more modest gains in math-heavy tasks (GSM8K and HumanEval). This is largely attributed to the poor performance of the tiny 68M draft model on specialized domains. Future work will explore domain-specific training for these tiny models to further enhance the hierarchical framework's utility in technical fields.

Summary updated

BibTeX
@inproceedings{syu2025hierarchical,
  author = {Shensian Syu and Hung-yi Lee},
  title = {{Hierarchical Speculative Decoding with Dynamic Window}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.findings-naacl.462},
}
Figure