EAGLE-2 accelerates lossless large language model decoding by 3.05x to 4.26x across evaluated models and benchmarks, running 20% to 40% faster than EAGLE-1 without training a new model or altering the target output distribution. In their June 2024 paper, Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang (Peking University, Microsoft Research, University of Waterloo, and Vector Institute) show that static speculative draft trees waste verification budget on low-probability branches whenever context makes the next token obvious or uncertain.
Standard tree-based speculative decoding methods such as Sequoia, Medusa, and EAGLE-1 fix a single tree shape for every decoding step, implicitly assuming acceptance depends only on tree position. Profiling Vicuna-7B on Alpaca reveals that acceptance rates also vary sharply by context at the exact same tree position, and that EAGLE’s feature-level draft model is well calibrated enough to guide tree construction dynamically at runtime.
- 3.05x to 4.26x lossless speedup: On MT-bench at
temp=0, EAGLE-2 reaches 4.26x on Vicuna-13B (vs. 3.07x for EAGLE-1 and 1.93x for standard speculative sampling) and 4.21x on LLaMA2-Chat 13B; attemp=1, it reaches 3.92x on LLaMA2-Chat 13B and 3.80x on Vicuna-13B. - 4.0 to 5.5 tokens accepted per cycle: Average acceptance length reaches 4.83 on Vicuna-13B MT-bench (
temp=0) and peaks at 5.52 on LLaMA2-Chat 13B HumanEval (5.00x speedup). - Near-calibrated draft confidence: Draft tokens with confidence under 0.05 achieve roughly 0.04 acceptance, while tokens above 0.95 achieve roughly 0.98 acceptance (Vicuna-7B on Alpaca).
- Zero extra training: EAGLE-2 reuses unmodified EAGLE-1 draft weights and standard rejection verification, keeping output distributions provably identical to the target LLM.
How It Works
EAGLE-1 predicts feature vectors from the target model’s second-to-top layer rather than raw tokens, feeding both features and sampled tokens back into a lightweight autoregressive draft head. While EAGLE-1 already led Spec-Bench, it filled the same static tree template on every forward pass: for an obvious prompt like "10+2=", a static tree still verified an unlikely "3" branch alongside "1", whereas on an ambiguous prefix like "10+2" it could not reallocate extra branches to competing symbols.
EAGLE-2 replaces that fixed template with a two-phase tree builder driven by global path values. Because rejecting any ancestor token invalidates every descendant in speculative sampling, a candidate node t_i’s joint acceptance probability is the product of acceptance probabilities along the path from the root. Using the draft model’s calibrated confidence c_j as a zero-overhead proxy for acceptance rate, EAGLE-2 scores every node by V_i = prod c_j over Path(root, t_i).
During expansion, EAGLE-2 evaluates only the top-k highest-value nodes from the current layer (k = 10 across a maximum depth of 6 in the paper’s setup) in a single tree-attention pass of the draft model, avoiding exponential blowup. Because multiplying probabilities shrinks values at deeper levels, an unexpanded shallow sibling can still outrank a newly expanded deep node. During reranking, EAGLE-2 sorts all accumulated draft nodes globally by V_i (breaking ties toward shallower depths to keep the tree connected), keeps the top-m tokens (60 for 7B/8B models, 50 for 13B, 48 for 70B), flattens them to 1D with an ancestor-only attention mask, and sends them to the target LLM for exact rejection sampling.
Key Findings
The authors evaluated EAGLE-2 across three model series (Vicuna 7B/13B, LLaMA2-Chat 7B/13B/70B, and LLaMA3-Instruct 8B/70B) and six Spec-Bench tasks: MT-bench, HumanEval, GSM8K, Alpaca, CNN/Daily Mail, and Natural Questions. EAGLE-2 outperformed every lossless baseline tested (standard speculative sampling, PLD, Medusa, Lookahead, Hydra, and EAGLE-1) across all models and tasks.
Across the six benchmarks at temp=0, Vicuna-13B averaged 4.04x speedup (4.65 tokens/cycle) versus 2.95x for EAGLE-1 and 1.88x for Vicuna-68M speculative sampling. Code generation saw the highest ceiling (5.00x on LLaMA2-Chat 13B HumanEval) due to repetitive syntax templates. At temp=1, where standard rejection sampling accepts fewer branches, EAGLE-2 maintained 3.65x mean speedup on Vicuna-13B (versus 2.39x for EAGLE-1) and 3.88x on LLaMA2-Chat 13B (versus 2.64x for EAGLE-1). Larger models also benefited cleanly: on MT-bench (temp=0), LLaMA2-Chat 70B reached 3.51x (vs. 3.01x) and LLaMA3-Instruct 70B reached 3.29x (vs. 2.83x).
Ablations on Vicuna-7B confirm that both components of the dynamic tree carry weight. Replacing path-product values with local token confidence (w/o value) drops GSM8K speedup from 3.63x to 2.93x, because high-confidence tokens sitting under low-confidence parents still get rejected during verification. Skipping global reranking (w/o reranking) trims MT-bench speedup from 3.62x to 3.48x.
Caveats and Builder Takeaway
- Training data mismatch hurts world-knowledge tasks: EAGLE draft heads train on SFT datasets (ShareGPT) rather than pretraining corpora, so acceptance length drops on factual QA (Natural Questions: 3.13x vs. 4.96x on HumanEval for Vicuna-13B) and summarization (CNN/DM: 3.40x). Even so, EAGLE-2 still beats standard speculative sampling (1.66x / 1.93x) on those tasks.
- Batch-size-1 evaluation against HuggingFace: All benchmarks compare single-sequence decoding against PyTorch HuggingFace with pre-allocated KV cache. Under heavy production batching, verifying 48 to 60 draft tokens per request pushes target linear layers toward compute saturation and compresses net speedup.
- Requires an existing EAGLE draft head: EAGLE-2 adds zero training cost only if a calibrated feature-level draft head already exists for your target checkpoint.
Builder takeaway: If your serving stack already runs EAGLE-1 or targets low-batch, latency-sensitive inference (interactive coding assistants, local workstations, or agent loops), adopting EAGLE-2’s path-value expansion and global reranking is a drop-in, lossless upgrade worth 20% to 40% more tokens per second with zero retraining.


