Speculative Decoding Deep Dive III: EAGLE, DFlash
Created on September 4, 2026
EAGLE
EAGLE stands for Extrapolation Algorithm for Greater Language-model Efficiency. It drafts the next hidden state, then reuses the frozen target LM head to turn that state into a token.

Core idea
Notation:
- = target last hidden state, the direct input to the LM head;
- = next-token distribution from the frozen LM head:
- = normal decoding process.
EAGLE's core ideas:
- Features are smoother than tokens. Consecutive hidden states change a little at a time, so a single extra layer can extrapolate the next one. However, token IDs do not: they jump from one discrete word to another.
- The next feature depends on the sampled token. From the same , the LM head might sample
amoralways, and those two choices produce different . Treat the drafter as a dynamics model: current state plus action gives the next state. That mapping is well-defined. Predicting from alone would mix those branches.
Problem with Medusa:
Extra heads predict later tokens from the current context only, so they never see the token just sampled: .
EAGLE-1 — autoregressive feature drafting
Feeds the sampled token into the next step: .
Train
- Train 1 FC (last feature + shifted token embedding) + 1 decoder layer. Embedding and LM head stay frozen.
- Feature regression + soft-target CE vs (not one-hot). Noise on input features so the head tolerates its own drift.
Inference
- Drafter predicts from and shifted tokens ; frozen LM head → token; feed back.
- Tree draft; one target pass (tree attention + multi-round speculative sampling) — lossless.
EAGLE-2 — context-aware dynamic tree
- Same drafter / training as EAGLE-1; only the tree is dynamic.
- Calibrated scores paths as without the target.
- Expand top-, keep top- by , then verify. – (–), still AR.
EAGLE-3 — free representation + training-time test + feature fusion
Key innovation vs EAGLE / EAGLE-2: free representation.
- EAGLE-1. Simulate the target hidden state:
- EAGLE-3. Guess the next token, not copy . Drop . The -dim output is a free representation — still an intermediate vector, just not regressed onto . Only the frozen LM head must match the target:
Three changes:
- Drop feature regression. Train only so matches the target tokens. First-token accept (-) jumps — capacity is no longer spent copying .
- Training-time test. , so later steps collapse if trained on teacher . Fix: unroll on own outputs at train time (), same as inference. Accept stays flat through -.
- Multi-layer feature fusion. The top feature is only good for the next token. Fuse low/mid/high; verified positions use , later steps use own , plus the shifted token embedding:

EAGLE-1. Stay in last-layer feature space. After the verified prefix, seed with target ; each later step predicts and feeds that back:
EAGLE-3. Two input regimes. Verified positions use fused multi-layer ; later steps recycle a free latent that is not trained to match :
| After verified prefix | Later draft steps | |
|---|---|---|
| EAGLE-1 | target feature | predicted |
| EAGLE-3 | fused feature | free latent |
DFlash

DFlash-1 drafts the whole speculative block in one parallel pass. DFlash-2 keeps that architecture and fixes two quality problems: weak inter-position dependence and naive Top-1 selection.
DFlash-1: parallel block + KV injection
Target on The quick brown produces two things: the next token (anchor) and multi-layer hidden features.
The quick brown ──► Target ──► fox # confirmed anchor
└──► {H^(l)} ──► Fuse ──► H_t
- Anchor block. Seed with the verified token; the rest are masks. Training copies this: sample a clean start, mask the next positions, predict them together.
- Shared embedding / LM head. and the draft logits reuse the frozen target tables. This LM head is draft logits, not verification.
- KV injection (every draft layer). Ordinary attention is from only. DFlash prepends as extra KV memory. EAGLE-3 fuses only at the input; injecting into every layer lets acceptance keep rising with depth (5–8 layers vs 1).
H_t ──► Layer 1 KV, …, Layer N KV # not input-only
MASK… ──► Q ──► draft layers ──► LM head ──► block
- Block-parallel vs AR. AR draft cost grows with . All masks go in one pass. , . A 5-layer DFlash drafting 16 beats a 1-layer EAGLE-3 drafting 8. ~6×, up to 2.5× over EAGLE-3.
- Training. Freeze target, embedding, LM head. Weight early positions (an early reject voids the suffix). Bidirectional attention inside a block, none across blocks.
- Verify. Target checks the draft in one pass; speculative sampling — lossless. Shared LM head verification.
DFlash-2: path selector + local conv
DFlash-1 drafts every mask in one pass, so neighbors are not finalized. DFlash-2 adds two inference steps.
Path selector. After the parallel draft, keep Top- candidates per position. Score every adjacent pair in one shot, then walk to pick one path. The target still verifies that path — lossless.
is the DFlash logit; embed the two tokens; gates by context.
Dynamic conv. Inside each draft layer, a two-tap conv lets position read and (first position reads the last verified token). The outputs do not depend on each other, so the block stays parallel. Attention still sees global / target context; conv only sees the immediate predecessor.
Summary
| Method | Architecture | vs | Speedup |
|---|---|---|---|
| Classic SD | Small AR drafter predicts future tokens sequentially; target verifies the block. | ≈2–3× | |
| Medusa-1 | Parallel future-token heads on the target hidden state; candidates form a tree for verify. | one parallel head pass; no sequential draft steps | ≈2–3× |
| EAGLE-1 | AR drafts future target features, conditioned on the target feature and shifted sampled token, then maps them to tokens. | sequential steps, lightweight drafter | ≈2.7–3.5× |
| EAGLE-2 | EAGLE-1 feature-level AR draft + context-aware dynamic tree (more branches on high-confidence paths). | sequential steps; tree changes allocation, not sequentiality | ≈3.05–4.26× |
| EAGLE-3 | AR predicts draft tokens directly; conditions on fused low/mid/high target features; training matches inference. | sequential steps | up to ≈6.5× |
| DFlash | Fused multi-layer target features KV-injected into every layer of a lightweight block-diffusion drafter; whole masked block in one pass. | ; ≈independent of for moderate blocks | up to ≈6.1× |
| DFlash-2 | DFlash + short dynamic convs for neighbor dependence + Top- path select before verify. | + small parallel select / short walk | ≈2.7–3.4× AR throughput |
References
- Li et al., 2024. EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty. arXiv 2401.15077
- Li et al., 2024. EAGLE-2: Faster Inference of Language Models with Dynamic Draft Trees. arXiv 2406.16858
- Li et al., 2025. EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test. arXiv 2503.01840
- Chen et al., 2026. DFlash: Block Diffusion for Flash Speculative Decoding. arXiv 2602.06036
- Inco AI, 2026. DFlash 2: Keep Drafting Parallel. inco.ai/blog/dflash2
- Ankner et al., 2024. Hydra: Sequentially-Dependent Draft Heads for Medusa Decoding. arXiv 2402.05109