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

AdaEAGLE: Optimizing Speculative Decoding via Explicit Modeling of Adaptive Draft Structures

Situo Zhang, Hankun Wang, Da Ma, Zichen Zhu, Lu Chen, Kunyao Lan, Kai YuarXiv 2024

Abstract

Speculative Decoding (SD) is a popular lossless technique for accelerating the inference of Large Language Models (LLMs). We show that the decoding speed of SD frameworks with static draft structures can be significantly improved by incorporating context-aware adaptive draft structures. However, current studies on adaptive draft structures are limited by their performance, modeling approaches, and applicability. In this paper, we introduce AdaEAGLE, the first SD framework that explicitly models adaptive draft structures. AdaEAGLE leverages the Lightweight Draft Length Predictor (LDLP) module to explicitly predict the optimal number of draft tokens during inference to guide the draft model. It achieves comparable speedup results without manual thresholds and allows for deeper, more specialized optimizations. Moreover, together with threshold-based strategies, AdaEAGLE achieves a $1.62\times$ speedup over the vanilla AR decoding and outperforms fixed-length SotA baseline while maintaining output quality.

Introduction

The inference speed of Large Language Models (LLMs) remains a primary bottleneck for their deployment in real-time applications. This latency stems from the auto-regressive nature of decoding, where tokens are generated sequentially. Speculative Decoding (SD) addresses this by using a smaller, more efficient "draft" model to propose a sequence of tokens, which are then verified in parallel by the "target" model.

However, most current SD implementations rely on static draft structures, typically generating a fixed number of tokens per iteration. This approach is inherently suboptimal as it fails to account for varying context complexity. Over-drafting leads to wasted computation on tokens likely to be rejected, while under-drafting misses opportunities for parallel verification. While implicit methods like probability-based thresholds exist, they often require tedious manual tuning. AdaEAGLE proposes a shift toward explicit modeling of these adaptive structures to maximize inference efficiency.

Methodology

AdaEAGLE builds upon the high-performing EAGLE framework, introducing a dedicated module for draft length optimization.

Lightweight Draft Length Predictor (LDLP)

The core of AdaEAGLE is the Lightweight Draft Length Predictor (LDLP). Unlike heuristic-based methods, the LDLP is a three-layer Multi-Layer Perceptron (MLP) that explicitly predicts the optimal number of tokens to draft. It takes the embedding and the final hidden state of the most recently validated token as input, leveraging the latent "plan" within the LLM's hidden states to sense upcoming text complexity.

The AdaEAGLE architecture (a) integrates the LDLP (b) to dynamically determine draft lengths, utilizing a specialized training data collection pipeline (c).

Asymmetric Training and Hybrid Strategies

To train the LDLP, we utilize a Penalized L1 Loss function. This asymmetric loss accounts for the fact that a target model pass is approximately 20 times more computationally expensive than a draft step. Consequently, the model is penalized more heavily for under-predicting the draft length (which misses parallelization opportunities) than for slight over-prediction.

AdaEAGLE also supports a hybrid strategy, AdaEAGLE-DDD, which combines explicit prediction with threshold-based methods like Dynamic Depth Decoding. In this configuration, drafting stops when either the LDLP's predicted length is reached or the token probability falls below a set threshold.

Experimental Results

We evaluated AdaEAGLE using the ShareGPT dataset for training and a suite of six benchmarks for testing: MT-Bench, Alpaca, HumanEval, GSM8K, CNN/Daily Mail, and Natural Questions.

A comparison of AdaEAGLE with other speculative decoding methods demonstrates its unique explicit modeling approach and the elimination of manual threshold requirements.

Performance Gains

AdaEAGLE achieved a 1.62× speedup over standard auto-regressive decoding. In terms of throughput, AdaEAGLE-DDD reached 65.20 tokens per second, outperforming both the best fixed-length EAGLE baseline (63.72 tok/s) and standard DDD (64.43 tok/s). The framework also demonstrated superior efficiency by significantly reducing "wasted" tokens—on the MT-Bench benchmark, wasted tokens were nearly halved compared to a static draft length of 6.

Key Insights

  • Oracle Feasibility: Preliminary "Oracle" experiments showed that perfect draft length prediction could increase throughput by 29% over fixed-length models, confirming the high value of adaptive drafting.
  • Regression vs. Classification: We found that treating draft length prediction as a regression task is more effective than classification. Regression naturally accounts for the ordinal nature of lengths, where a prediction of 4 is "closer" to an optimal 5 than a prediction of 2.

Conclusion

AdaEAGLE represents a significant step forward in speculative decoding by replacing static heuristics with explicit, context-aware modeling. By utilizing the LDLP, the framework achieves state-of-the-art speedups without requiring manual threshold tuning. Future research will explore extending this explicit modeling to tree-based drafting structures and evaluating performance under non-greedy sampling regimes.

Summary updated

BibTeX
@misc{zhang2024adaeagle,
  author = {Situo Zhang and Hankun Wang and Da Ma and Zichen Zhu and Lu Chen and Kunyao Lan and Kai Yu},
  title = {{AdaEAGLE: Optimizing Speculative Decoding via Explicit Modeling of Adaptive Draft Structures}},
  year = {2024},
  eprint = {2412.18910},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.18910},
}
Figure