AdaEDL: Early Draft Stopping for Speculative Decoding of Large Language Models via an Entropy-based Lower Bound on Token Acceptance Probability

Sudhanshu Agrawal, Wonseok Jeon, Mingu Lee

Abstract

Speculative decoding accelerates Large Language Model (LLM) inference by using a small draft model to predict tokens that are subsequently verified by a larger target model. However, fixed draft lengths often lead to suboptimal performance due to varying acceptance rates across different tasks and prompts. We present AdaEDL (Adaptive Entropy-based Draft Length), a training-free method that utilizes the entropy of draft token distributions to dynamically determine the optimal stopping point for the drafting phase. By estimating a lower bound on token acceptance probability, AdaEDL achieves speedups of up to 57% over static methods and demonstrates superior robustness at high sampling temperatures.

Introduction

Large Language Models (LLMs) are typically constrained by the memory-bandwidth bottleneck of autoregressive decoding, where tokens are generated one by one. Speculative decoding addresses this by employing a fast "draft" model to generate a sequence of candidate tokens, which a "target" model then verifies in a single parallel pass.

The efficiency of this process hinges on the draft length. A draft that is too long results in wasted computation when tokens are rejected, while a draft that is too short fails to fully exploit the parallel verification capabilities of the target model. Most existing implementations rely on a fixed draft length or require complex, trained auxiliary models to predict stopping points. AdaEDL addresses these limitations with a simple, theoretically grounded, and training-free adaptive mechanism.

Methodology: Entropy-based Early Stopping

AdaEDL introduces a parameter-free criterion for terminating the drafting phase based on the uncertainty of the draft model.

Entropy as a Signal

While previous adaptive methods often rely on "Max-Confidence" (the probability of the most likely token), AdaEDL considers the entropy ($H_{DM}$) of the entire probability distribution produced by the draft model. High entropy indicates that the model is uncertain, making it more likely that the generated token will deviate from the target model's distribution and be rejected.

Theoretical Lower Bound

The authors derive a lower bound for the probability that the target model will accept a draft token using Pinsker’s inequality. The criterion is defined as: $$1 - \sqrt{\gamma H_{DM}(x)} < \lambda$$ where $H_{DM}(x)$ is the entropy, $\gamma$ is a scaling factor, and $\lambda$ is a dynamic threshold. If the estimated acceptance probability falls below $\lambda$, the drafting process stops immediately.

Comparison of drafting termination criteria for Base-SPD (fixed length), Max-Confidence-SPD (top-1 probability), and AdaEDL (entropy-based).

Dynamic Thresholding

To account for varying task difficulties, the threshold $\lambda$ is updated dynamically during inference. By monitoring actual acceptance rates in previous rounds, the system "self-corrects," allowing it to adapt to different prompts and model pairs without manual tuning.

Experimental Results

The researchers evaluated AdaEDL across diverse tasks, including creative writing (Dolly-15k), summarization (CNN-DM), and translation (WMT-19), using model pairs such as Llama2-7B with a 115M drafter.

Performance and Speedups

AdaEDL consistently outperformed static draft lengths, yielding throughput improvements between 10% and 57%. It also surpassed other training-free adaptive methods like Max-Confidence by up to 10%.

Inference speed comparison (tokens per second) between AdaEDL and baseline methods using a Pythia-410m draft model. AdaEDL provides the highest throughput.

Robustness to Sampling Temperature

A significant challenge in speculative decoding is performance degradation at high sampling temperatures, where increased randomness leads to lower acceptance rates. AdaEDL remains robust in these scenarios, providing an 8% boost over standard autoregressive generation even at a temperature of 1.7—a regime where vanilla speculative decoding often becomes slower than standard inference.

Discussion and Conclusion

AdaEDL offers a "plug-and-play" solution for optimizing LLM inference. By exploiting the Stable Entropy Hypothesis—the observation that LLMs tend to generate text within predictable entropy bands—it prevents drafters from over-committing when uncertain. This capability makes it viable to use larger, more capable draft models that would otherwise be inefficient.

While highly effective, future work may address hyperparameter sensitivity regarding the initial $\lambda$ and $\gamma$ values. Additionally, incorporating hardware-specific latency costs (GPU vs. CPU) into the stopping criterion could further refine the efficiency of the drafting phase.

Summary updated

BibTeX
@inproceedings{agrawal2024adaedl,
  author = {Sudhanshu Agrawal and Wonseok Jeon and Mingu Lee},
  title = {{AdaEDL: Early Draft Stopping for Speculative Decoding of Large Language Models via an Entropy-based Lower Bound on Token Acceptance Probability}},
  booktitle = {ENLSP},
  year = {2024},
}
Figure