要点速览
- 传统 EAGLE-3 自回归起草每生成一个 token 需一次前向,起草成本随推测长度线性增长,迫使 draft 模型保持极小、推测长度 K 也难以调优。
- 并行起草把起草阶段压平为单次前向,同时预测整个候选块,起草延迟与 token 数解耦,可用更大、更具表达力的 draft 架构获得更高接受率。
- P-EAGLE 并行映射多位置,DFlash 投影进 KV-cache,DSpark 加修正与置信头,均用 verifier hidden states。
- DSpark 的 confidence head 在验证前给 draft token 打分,只转发可能被接受的 token,减少浪费的验证算力,提升端到端吞吐。
- vLLM 经 --speculative-config 即可启用;rejection sampling 精确保留 verifier 输出分布,加速无损。
解决什么问题
传统 speculative decoding(如 EAGLE-3)采用自回归起草:提议一个候选 token 就要单独执行一次前向,起草成本随推测长度线性增长。这迫使 speculator 模型保持极小极轻量,否则会耗尽验证阶段省下的时间;同时最优推测长度 K 成为必须随使用场景与实时负载不断调整的敏感变量。本文介绍 Speculators 与 vLLM 全面开源支持的三种并行起草算法(P-EAGLE、DFlash、DSpark),把顺序执行从起草阶段彻底移除。
核心思路
并行起草把整个起草阶段压平为单次前向,并发预测一整块候选 token,使提议延迟与推测 token 数解耦。P-EAGLE 直接沿用 EAGLE 的 hidden-state 输入,把 verifier hidden states 映射到多个未来位置,单步并行输出整段候选序列,训练时用 draft block sparsification(沿 lookahead 维度 K 按衰减率丢弃 token)。DFlash 不把 hidden states 当普通输入,而是投影后直接注入 speculator 的 KV-cache,使注意力紧贴 verifier 精确状态,经 block diffusion 生成高精度候选块,训练时用 sequence length sparsification(只在随机锚点计算 block 损失)。DSpark 在 DFlash 骨干上叠加轻量自回归修正头与置信头,后者在验证前预筛 draft token 以削减验证开销。三者均通过 Speculators 生态与 vLLM --speculative-config 集成,并用三个模型对照 EAGLE-3 做了基准对比。
关键要点
- 自回归起草的两大生产代价 — EAGLE/MTP 开创性地让 speculator 直接利用 verifier 的内部 hidden states,大幅提升 token 接受率,但 EAGLE-3 仍受自回归起草约束:提议一段候选 token 必须逐个生成,每个 token 单独一次前向。由此带来两个权衡:模型大小受限——起草成本线性伸缩,speculator 必须极小极轻以免吃掉验证节省的时间;运维调参复杂——线性伸缩实际限制了可起草的 token 数,K 成为需按场景与实时负载持续调整的敏感变量。
- 并行起草的两重收益:表达力与免调参 — 并行起草完全移除起草阶段的顺序执行,一次并发预测整个候选块,把起草延迟与推测 token 数解耦。其一,表达力容量:speculator 每块只跑一次,可以采用更大、更深、更具表达力的 draft 架构,捕获更复杂上下文、获得更高接受率,而不引入串行延迟惩罚;其二,简化调参:起草成本与块长度解耦,免去了按波动负载超调推测参数的运维负担。并行起草并非全新概念,Medusa 与 PARD 是早期探索;三种新算法在其基础上叠加了让 EAGLE 成功的深层 verifier-state conditioning。
- P-EAGLE:多位置并行映射 + draft block sparsification — P-EAGLE 直接建立在 EAGLE 用 verifier hidden states 作为输入特征的基础上,但不按序消费这些特征,而是把它们同时映射到多个未来位置,单次并行步骤输出一整段候选 token 序列。为使训练可行,P-EAGLE 实现 draft block sparsification:沿 lookahead 维度 K 以衰减率丢弃 token,把优化集中在最关键的邻近 token 上,同时把较远的未来位置从损失计算中剪除。
- DFlash:hidden states 注入 KV-cache + 序列长度稀疏化 — DFlash 换了一条路由:不把 verifier 特征作为标准输入,而是将其投影后直接注入 speculator 模型的 KV-cache,在不扩展输入序列长度的前提下让 speculator 的 attention 机制紧贴 verifier 的精确状态,经 block diffusion 生成高精度候选 token 块。训练上采用 sequence length sparsification:不在长度 N 序列的每个位置计算 block 损失,而是沿时间线选取随机锚点、仅在锚点处计算 block 预测,既保存 GPU 显存又维持代表性覆盖。
- DSpark:自回归修正头 + 置信头 — DSpark 取 DFlash 的并行骨干并叠加两项创新。其一是轻量自回归修正头,让未来 token 能更强地以过去 token 为条件,把并行生成的吞吐收益与自回归精炼的序列一致性结合起来。其二是针对下游验证瓶颈的置信头:并行起草可廉价地产出大量 draft token,但 verifier 仍须全部处理;confidence head 在 draft token 到达 verifier 前打分,选择性转发大概率被接受的 token,减少浪费的验证算力并提升端到端吞吐。
- 共同训练挑战:全位置 next-K 预测的成本爆炸 — 任何并行 speculator 都必须在训练序列的每个位置做 next-K 预测:对长度 N 的序列与 lookahead 窗口 K,朴素地跨完整矩阵计算损失会使显存与计算成本膨胀到不可行。三种算法各自以稀疏化应对:P-EAGLE 按 K 维衰减剪枝远端位置,DFlash 沿序列维度只取随机锚点,DSpark 继承 DFlash 骨干的训练方案。这是理解三篇论文训练章节的关键背景。
- vLLM/Speculators 集成与无损保证 — Speculators 仓库提供统一生态来训练与评估这些新一代模型,并与 vLLM 完全集成;启动并行起草引擎只需在初始化时传入配置,例如 vllm serve 加 --speculative-config 指定 dflash 方法、draft 模型与 num_speculative_tokens。speculative decoding 通过 rejection sampling 精确保留 verifier 模型的输出分布,因此质量与标准解码在数学上完全一致,加速是无损的;预训练 speculator 模型发布在 RedHatAI 的 HuggingFace Speculators Collection。
- 基准设置与数据勘误 — Figure 1 用三个组合对比并行起草与 EAGLE-3:Qwen3-8B + P-EAGLE(GSM8k 数学推理,1xA100)、Qwen3-30B-A3B + DFlash(HumanEval 编码,2xA100)、gemma-4-31B-it + DSpark(HumanEval 编码,2xA100),所有情况下并行起草均显著优于 EAGLE-3。注意正文未给出具体加速数字,且 Figure 1 的图于 7/29/26 因环境配置错误更新过——原数据与所述基准条件不一致,但模型间的相对行为一致、结论不变;官方也建议社区在自己的负载上自测。
关键数据
| 指标 | 数值 | 条件 |
|---|---|---|
| 推测长度(num_speculative_tokens) | 7 | vLLM serve 示例:Qwen3-30B-A3B 目标模型 + RedHatAI DFlash draft,tensor-parallel-size=2 |
| P-EAGLE 基准硬件 | 1x A100 | Qwen3-8B + P-EAGLE draft,GSM8k 数学推理任务 |
| DFlash 基准硬件 | 2x A100 | Qwen3-30B-A3B + DFlash draft,HumanEval 编码任务 |
| DSpark 基准硬件 | 2x A100 | gemma-4-31B-it + DSpark draft,HumanEval 编码任务 |
| 基准数据勘误时间 | 7/29/26 更新 | Figure 1 性能对比图;原图数据因错误的基准环境配置与所述条件不一致,但相对结论不变 |
“"num_speculative_tokens": 7,”
“| Qwen3-8B | [P-EAGLE](https://huggingface.co/RedHatAI/Qwen3-8B-speculator.peagle) | Math reasoning (GSM8k) | 1xA100 |”
“| Qwen3-30B-A3B | [DFlash](https://huggingface.co/RedHatAI/Qwen3-30B-A3B-speculator.dflash) | Coding (HumanEval) | 2xA100 |”
前置知识
speculative decoding 基本原理:draft 模型提议候选 token,目标模型单次前向验证多个 token,rejection sampling 采样保证无损 · EAGLE 家族脉络:EAGLE 首创以 verifier hidden states 作为 draft 输入,EAGLE-3 进一步利用多层特征提升接受率 · Transformer 推理基础:前向传播、attention、KV-cache 与访存带宽瓶颈 · vLLM serving 基础:vllm serve 启动参数、--speculative-config、tensor parallelism · 训练损失计算基础:理解在长度 N 序列每个位置做 next-K 预测为何导致显存/计算成本爆炸 · block diffusion 生成范式(有助于理解 DFlash 的块级生成方式)
术语表
Speculative Decoding: 推测解码:draft 模型一次提议多个候选 token,目标模型(验证器)单次前向验证,经 rejection sampling 保持输出分布不变,是一种无损加速技术。Auto-regressive Drafting: 自回归起草:逐个生成候选 token,每个 token 需要一次独立的 speculator 前向,起草成本随推测长度线性增长。Parallel Drafting: 并行起草:单次前向并发预测一整块候选 token,起草延迟与推测 token 数解耦。P-EAGLE: EAGLE 的并行起草扩展(后续版本),把 verifier hidden states 同时映射到多个未来位置,单步输出整段候选序列,训练用 draft block sparsification。DFlash: 并行起草算法:把 verifier hidden states 投影后直接注入 speculator 的 KV-cache,经 block diffusion 生成高精度候选块,训练用 sequence length sparsification。DSpark: 在 DFlash 并行骨干上叠加轻量自回归修正头与置信头的并行起草算法,置信头预筛 draft token 以降低验证开销。Speculators: vLLM 项目下的开源仓库,提供训练与评估 speculator 模型的统一生态,预训练模型发布于 RedHatAI 的 HuggingFace Speculators Collection。KV-cache: 注意力机制中的 key/value 缓存;DFlash 通过把 verifier 特征注入 KV-cache,在不扩展输入长度的条件下紧致条件化 speculator 注意力。Speculation Length (K): 推测长度,即一次起草的 token 数;自回归起草下成本随 K 线性增长,并行起草下单次前向成本与之解耦。Block Diffusion: 块级扩散生成:一次性产出一整块 token 而非逐 token 生成,DFlash 以此产出候选 token 块。Acceptance Rate: 接受率:draft token 被验证器接受的概率,接受率越高,每次验证产出的 token 越多、加速越大。Medusa: 早期并行起草方法,通过多个附加头一次性预测多个未来 token,本文三种算法的共同先驱之一。PARD: 早期并行起草研究工作;P-EAGLE、DFlash、DSpark 在其基础上结合深层 verifier-state conditioning。Rejection Sampling: 拒绝采样:保证 speculative decoding 无损的机制,使输出分布与 verifier 模型的分布精确一致。
Parallel All the Way Down: Beyond Single-Token Generation with Speculative Decoding
1. Introduction
Speculative decoding has emerged as a core optimization technique for mitigating memory-bandwidth bottlenecks in Large Language Model (LLM) serving. By validating multiple candidate tokens in a single verifier-model forward pass, it allows production systems to achieve substantial inference speedups.
However, as serving infrastructure evolves, traditional speculative frameworks face a structural ceiling rooted in the way draft tokens are generated. Today, we are excited to showcase how Speculators and vLLM are moving beyond these limitations by providing full open-source support for three state-of-the-art parallel drafting algorithms: P-EAGLE, DFlash and DSpark.
Figure 1. Parallel drafting algorithms, such as P-EAGLE, DFlash and DSpark, provide significant performance gains when compared to autoregressive drafting algorithms such as EAGLE-3. Speculator models mentioned above can be found in the [Speculators Collection](https://huggingface.co/collections/RedHatAI/speculator-models) at the RedHatAI HuggingFace Hub.
2. The Limits of Recursive Drafting
The introduction of frameworks like EAGLE and MTP marked a major paradigm shift in speculative decoding. Instead of forcing the speculator model to guess blindly from surface-level text, EAGLE demonstrated that a speculator architecture could tap directly into the verifier model’s rich internal hidden states, dramatically increasing token acceptance rates.
Despite this breakthrough, advanced iterations like EAGLE-3 still operate under a fundamental constraint: auto-regressive drafting. To propose a sequence of candidate tokens, the speculator architecture must generate them sequentially, executing a separate forward pass for every single token.
This auto-regressive design introduces two major trade-offs in production:
- Constraints on Model Size: Because the drafting cost scales linearly with the speculation length, speculator models are forced to remain extremely small and lightweight to avoid consuming the execution time saved during verifier-model verification.
- Complex Operational Tuning: Linear scaling heavily limits the number of drafted tokens in practice. Choosing the optimal speculation length (K) becomes a sensitive variable that engineering teams must constantly adjust depending on the specific use case and real-time server loading.
Figure 2. Parallel drafting generates multiple draft tokens in a single step, whereas auto-regressive drafting generates one draft token per step.
3. The Shift to Parallel Drafting
Parallel drafting fundamentally re-engineers this trade-off by eliminating sequential execution from the drafting phase entirely. Rather than looping through single-token generation steps, parallel drafting algorithms predict an entire candidate block of tokens concurrently.
By flattening the drafting phase into a single forward pass, the latency of generating proposals is decoupled from the number of tokens speculated. This architectural shift simplifies production serving in two distinct ways:
-
Capacity for Expressiveness: Because the speculator model only runs once per block, developers can utilize larger, more robust, and more expressive draft architectures. These deeper speculator models capture more complex context and yield higher acceptance rates without introducing a sequential latency penalty.
-
Simplified Parameter Tuning: Decoupling drafting cost from block length removes the operational burden of hyper-tuning speculation parameters based on fluctuating server loads.
Parallel drafting as a concept has been explored before — Medusa and PARD are notable earlier examples. P-EAGLE, DFlash, and DSpark build on this foundation by combining parallel execution with deep verifier-state conditioning, the insight that made EAGLE so successful.
4. Under the Hood: Inference & Training Architecture
P-EAGLE, DFlash, and DSpark all build upon the verifier model's hidden states to generate draft tokens in parallel, but each takes a different path to get there. Figure 3 illustrates their architectures side-by-side.
Figure 3. Comparison between P-EAGLE, DFlash and DSpark. P-EAGLE ingests hidden states from the verifier as part of the speculator model inputs. DFlash projects hidden states into KV-cache. DSpark builds on a DFlash backbone and adds sequential correction and confidence estimator.
A shared challenge across all three is training. Any parallel speculator must perform next-K prediction at every token position along a training sequence. For a sequence of length N and a lookahead window of K, naively computing losses across the full matrix causes memory and compute costs to scale prohibitively. Each algorithm addresses this differently.
P-EAGLE
P-EAGLE builds directly on EAGLE's foundation of using the verifier model's hidden states as input features. Instead of consuming those features to predict tokens sequentially, P-EAGLE maps them across multiple future positions simultaneously, outputting an entire sequence of candidate tokens in a single parallel step.
To keep training tractable, P-EAGLE implements draft block sparsification: it drops tokens along the lookahead dimension (K) according to a decaying rate, concentrating optimization on the most critical immediate tokens while pruning distant future positions from the loss calculation.
DFlash
DFlash routes verifier features differently. Rather than feeding hidden states in as standard inputs, DFlash projects them and injects them directly into the KV-cache of the speculator model. This tightly conditions the speculator's attention mechanism on the verifier's exact state without expanding the input sequence length, enabling it to generate a highly accurate block of candidate tokens via block diffusion.
For training, DFlash implements sequence length sparsification. Instead of calculating block loss at every token position across a sequence of length N, it selects random anchor points along the timeline and computes block predictions exclusively at these intersections — preserving GPU memory while maintaining representative coverage.
DSpark
DSpark takes DFlash's parallel backbone and layers two additional innovations on top. First, it augments the architecture with a lightweight autoregressive correction head, allowing future tokens to be more strongly conditioned on past tokens. This combines the throughput benefits of parallel generation with the sequential coherence of autoregressive refinement.
Second, DSpark addresses a downstream bottleneck: verification cost. Parallel drafting can generate many draft tokens inexpensively, but the verifier must still process all of them. DSpark introduces a confidence head that scores draft tokens before they reach the verifier, selectively forwarding only those likely to be accepted. This reduces wasted verification compute and improves end-to-end throughput.
5. Inference Performance
Figure 1 illustrates the performance gains provided by parallel drafting algorithms when compared to EAGLE-3. Three distinct models and parallel drafting algorithms are displayed:
| Model | Algorithm | Use case | Hardware |
|---|---|---|---|
| Qwen3-8B | P-EAGLE | Math reasoning (GSM8k) | 1xA100 |
| Qwen3-30B-A3B | DFlash | Coding (HumanEval) | 2xA100 |
| gemma-4-31B-it | DSpark | Coding (HumanEval) | 2xA100 |
In all cases, parallel drafting shows significant improvement over EAGLE-3. Performance will vary across models, tasks, and hardware configurations — we encourage the community to benchmark on their own workloads.
6. Production Serving with vLLM and Speculators
Integrating state-of-the-art parallel drafting algorithms into production requires a stable, optimized infrastructure stack. The Speculators repository provides a unified ecosystem to train and evaluate these next-gen models, fully integrated with vLLM.
Launching a parallel-backed speculative engine is as straightforward as passing the appropriate configuration flags at initialization:
vllm serve Qwen/Qwen3-30B-A3B \
--tensor-parallel-size 2 \
--reasoning-parser qwen3 \
--speculative-config '{
"model": "RedHatAI/Qwen3-30B-A3B-speculator.dflash",
"num_speculative_tokens": 7,
"method": "dflash"
}'
By moving from single-token generation to block-level parallel drafting, your inference pipeline becomes parallel all the way down—maximizing hardware utilization and delivering sustained, lossless acceleration. (Speculative decoding preserves the verifier model's output distribution exactly via rejection sampling, so quality is mathematically identical to standard decoding.)
7. Get Started
Parallel drafting is fully supported, open-source, and production-ready today. We invite the community to explore the repository, utilize our documented training pathways to build your own parallel speculators, and benchmark them natively in vLLM.
- Repository: Speculators
- Pre-trained speculators: Speculators Collection on HuggingFace
- Training guides: Speculator tutorials
Errata
The plots in Figure 1 were updated on 7/29/26. The numbers in the original plots proved to be inconsistent with the reported benchmarking conditions due to an erroneous environment setup. However, the relative behavior between models was consistent and the conclusions in the blog are not changed.