要点速览
- EAGLE 的起草是自回归的:生成 K 个 draft token 需要 K 次串行前向,延迟随推测深度线性增长,深推测收益被开销蚕食。
- P-EAGLE 单次前向并行预测全部 draft token,在 B200 上较 EAGLE-3 提速 1.05×–1.69×。
- 位置 2–K 的 MTP 输入不存在,用训练学到的共享 mask embedding 与共享 hidden state 作占位符。
- vLLM 自 v0.16.0 集成,设 parallel_drafting: true 即启用,预训练 head 已覆盖主流模型。
- P-EAGLE 在 K=7 达到吞吐峰值且 AL 更高(HumanEval 3.94 vs 3.03),EAGLE-3 峰值停在 K=3。
解决什么问题
EAGLE 是当前最先进的推测解码方法,但其 drafter 以自回归方式逐个生成 draft token:要产出 K 个 token 就需要 K 次串行前向传播,起草延迟随推测深度线性增长。随着 drafter 模型擅长起草更长的输出,这一隐藏瓶颈会逐渐蚕食加速收益,限制了可以多激进地进行推测。
核心思路
P-EAGLE 将 EAGLE 从自回归起草改造为并行起草:目标模型在 prefill 时捕获每个位置的 hidden state(h_prompt 与 h_context),drafter 再把 K 个位置的输入(token embedding 拼接 hidden state)一次性送入 N 层 transformer,单次前向同时预测全部 draft token。对尚不存在的 MTP 位置,使用训练中学到的共享 mask token embedding 和共享 hidden state 作为中性占位符。针对并行起草放大的训练显存问题,提出 sequence partition 算法在同一序列内分块并跨块累积梯度。在 vLLM 侧,用融合 Triton kernel 在 GPU 上一次完成 batch 重建、mask 填充与元数据生成,并单独处理 hidden state 广播与 KV cache slot 映射。
关键要点
- 两步架构:Prefill 捕获 + 并行 Drafter — Step 1 中目标模型处理 prompt 并生成新 token,同时捕获两类内部表示:每个 prompt 位置的 h_prompt 和新生成 token 的 h_context,它们编码了目标模型在各位置"已知"的信息。Step 2 中 drafter 并行构造每个位置的输入,即 token embedding 与 hidden state 的拼接;prompt 位置沿用 EAGLE 惯例右移一位,位置 i 接收位置 i-1 的 token 与 hidden state 来预测位置 i 的 token。
- MTP 位置的可学习占位符 — 位置 1 是标准 NTP(Next-Token-Prediction),输入为新 token embedding 与 h_context,行为与自回归 EAGLE 完全一致。位置 2 到 K 是 MTP(Multi-Token-Prediction),所需输入尚不存在,P-EAGLE 用两个训练中学习的固定向量填充:共享 mask token embedding emb(mask) 和共享 hidden state h_shared。所有位置一起通过 N 层 transformer 和 LM head,单次前向预测出 t1、t2、t3、t4 等 draft token。
- 长序列训练的显存挑战与 sequence partition 算法 — 现代推理模型输出很长:GPT-OSS 120B 在 UltraChat 上生成的序列(含 prompt)中位长度 3,891 tokens、P90 达 10,800 tokens,drafter 必须在匹配的上下文长度上训练。在长度 N 的序列上训练 K 个并行组会产生 N×K 个位置:N=8,192、K=8 时单样本含 65,536 个位置,attention 矩阵超过 40 亿元素、bf16 下占 8GB。position sampling 随机跳位置会损害 draft 质量,梯度累积又只能跨样本切分;P-EAGLE 的 sequence partition 算法把 N×K 位置序列切成连续块,维护跨块 attention 依赖并在同一序列内累积梯度。
- vLLM 集成:batch 重建与融合 Triton kernel — 许多推测解码设置中起草与验证共享同一 per-request token 布局,但并行起草为预测 K 个 token 需追加 MASK 占位(如 [token, MASK, MASK, …]),导致 draft batch 形状不再匹配 verification batch,必须重建 batch 元数据:扩展 input token IDs、hidden states 与 positions,逐 request 递增位置,再重算 slot mapping 和 per-request 起始索引。为抵消开销,实现了一个融合 Triton kernel,在 GPU 上一次完成拷贝扩展、插入 target 采样的 bonus token、填充 MASK token ID,并生成 rejected-token mask、masked-token mask、采样索引和 hidden-state 映射等轻量元数据——这些逻辑原本需要 copy/scatter + insert + fill + mask + remap 等多次 GPU 操作。
- Hidden state 管理与 KV cache / CUDA graph 适配 — hidden states 远大于输入 batch 的其他部分,因此工作被拆分:Triton kernel 只输出映射,由专用 copy kernel 把学习到的 hidden state 占位符(parallel_drafting_hidden_state_tensor,来自模型 mask_hidden buffer)广播到 mask token 槽位。KV cache slot mapping 方面,有效 token 正常分配 slot,rejected token 映射到 PADDING_SLOT_ID(-1) 以避免伪写入;CUDA graph 的捕获范围则扩展 K × max_num_seqs 以容纳并行起草引入的更大 draft batch。
- 深推测优势:K=7 峰值与更高接受长度 — 在 K∈{3,5,7}、并发 C∈{1,2,4,8,16,32,64} 的扫描中,P-EAGLE 在所有并发水平下均在 K=7 达到峰值 TPS,而 vanilla EAGLE-3 峰值在 K=3。原因在于并行起草单次前向生成全部 K 个 token,深推测不增加串行开销;自回归 drafter 必须逐步生成,难以扩展到更大 K。接受长度(AL,验证器每轮平均接受的 draft token 数)也一致更高:K=7 时 HumanEval 3.94 vs 3.03、SPEED-Bench 3.38 vs 2.59、MT-Bench 3.70 vs 3.27。
- 上手方式、基准设置与已知补丁 — 启用只需在 SpeculativeConfig 中设置 parallel_drafting: true,并以 eagle3 method 指定 P-EAGLE drafter 模型与 num_speculative_tokens;预训练 head 已在 HuggingFace 提供(GPT-OSS 120B、GPT-OSS 20B、Qwen3-Coder 30B)。基准在单卡 NVIDIA B200 上运行, drafter 为 4 层轻量模型、最多并行预测 10 个 token,对比公开的 vanilla EAGLE-3 checkpoint。注意:目前用 EAGLE drafter serve GPT-OSS-20B 需要先打一行补丁(PR#36684)。
关键数据
| 指标 | 数值 | 条件 |
|---|---|---|
| 相对 EAGLE-3 的最大加速比 | 1.69× | 真实负载,单卡 NVIDIA B200,GPT-OSS-20B |
| 加速比范围 | 1.05×–1.69× | B200 GPU,GPT-OSS-20B,MT-Bench / HumanEval / SPEED-Bench 三项基准 |
| 低并发吞吐提升 | 55–69% | GPT-OSS-20B,c=1,三项基准,对比公开 vanilla EAGLE-3 checkpoint,单卡 B200 |
| 高并发吞吐提升 | 5–25% | GPT-OSS-20B,c=64,三项基准,对比公开 vanilla EAGLE-3 checkpoint,单卡 B200 |
| SPEED-Bench 各并发加速比 | 1.69x(c=1)、1.61x(c=2)、1.54x(c=4)、1.45x(c=8)、1.40x(c=16)、1.22x(c=32)、1.25x(c=64) | GPT-OSS-20B,SPEED-Bench 吞吐(TPS),单卡 B200 |
| K=7 时接受长度(AL)对比 | HumanEval 3.94 vs 3.03(高 30%);SPEED-Bench 3.38 vs 2.59(高 31%);MT-Bench 3.70 vs 3.27(高 13%) | GPT-OSS-20B,K=7,P-EAGLE vs EAGLE-3,单卡 B200 |
| AL 随推测深度的增幅(K=3→K=7) | P-EAGLE +0.92(3.02→3.94),EAGLE-3 仅 +0.38(2.65→3.03) | GPT-OSS-20B,HumanEval,单卡 B200 |
| 并行训练的显存规模 | 单样本 65,536 个位置;attention 超 40 亿元素;bf16 下占 8GB | N=8,192、K=8 的单个训练样本 |
| 推理模型序列长度分布 | 中位数 3,891 tokens;P90 为 10,800 tokens | GPT-OSS 120B,UltraChat 数据集,Reasoning level: Medium |
| drafter 规模与并行预测能力 | 4 层;最多并行预测 10 个 token | GPT-OSS-20B 配套的 P-EAGLE drafter |
| EAGLE 相对标准自回归解码的加速(背景) | 2–3× | EAGLE 方法总体,已部署于 vLLM、SGLang、TensorRT-LLM 等框架 |
“**P-EAGLE** removes this ceiling by generating all K draft tokens in a single forward pass, delivering up to 1.69x speedup over vanilla EAGLE-3 on real workloads on NVIDIA B200.”
“On B200 GPUs, P-EAGLE achieves 1.05×–1.69× speedup over vanilla EAGLE-3 on GPT-OSS 20B over MT-Bench, HumanEval, and SpeedBench.”
“P-EAGLE delivers 55–69% higher throughput at low concurrency (c=1), with gains of 5–25% sustained at high concurrency (c=64), compared to the publicly available [vanilla EAGLE-3 checkpoint](https://huggingface.co/RedHatAI/gpt-oss-20b-speculator.eagle3).”
前置知识
推测解码(speculative decoding)的基本流程:轻量 drafter 起草、目标模型验证 · EAGLE / EAGLE-3 的自回归起草机制与 hidden state 复用方式 · LLM 推理中 prefill 与 decode 阶段、KV cache 的工作原理 · vLLM 的 SpeculativeConfig 与 vllm serve 启动参数 · 训练显存优化的常见手段:梯度累积、attention 的 O(n²) 复杂度 · CUDA graph 与 Triton kernel 的基本概念
术语表
P-EAGLE: Parallel-EAGLE,EAGLE 的并行版本,在单次前向传播中同时生成全部 K 个 draft token,消除自回归起草的串行瓶颈。EAGLE-3: 当前最先进的自回归推测解码方法,生成 K 个 draft token 需要 K 次前向传播,广泛部署于生产推理框架。Draft token: 由轻量 drafter 模型生成的候选 token,交由目标模型验证,被接受的 token 直接转为输出。Acceptance Length (AL): 接受长度,每轮推测中验证器平均接受的 draft token 数量;AL 越高,起草工作转化为真实输出的比例越大。NTP / MTP: Next-Token-Prediction / Multi-Token-Prediction,即单 token 预测与多 token 并行预测任务;P-EAGLE 中位置 1 为 NTP、位置 2–K 为 MTP。Hidden state: 目标模型内部各位置的中间表示(h_prompt / h_context),编码模型在该位置"已知"的信息,用于指导 drafter 预测。Sequence partition: P-EAGLE 提出的序列内切分算法,把 N×K 位置序列分成连续块、维护跨块 attention 依赖并跨块累积梯度,解决单序列超显存的问题。Triton kernel: 用 Triton 编写的 GPU kernel;本文将 batch 构建的多个操作融合为一个 kernel,以减少 kernel 启动开销与额外显存流量。CUDA graph: NVIDIA 的 GPU 计算图捕获机制,可降低 kernel 启动开销;并行起草需把捕获范围扩大 K × max_num_seqs。PADDING_SLOT_ID: 值为 -1 的特殊 KV cache 槽位,rejected token 被映射到该槽位以避免产生伪 cache 写入。
P-EAGLE: Faster LLM inference with Parallel Speculative Decoding in vLLM
EAGLE is the state-of-the-art method for speculative decoding in large language model (LLM) inference, but its autoregressive drafting creates a hidden bottleneck: the more tokens that you speculate, the more sequential forward passes the drafter needs. Eventually those overhead eats into your gains. P-EAGLE removes this ceiling by generating all K draft tokens in a single forward pass, delivering up to 1.69x speedup over vanilla EAGLE-3 on real workloads on NVIDIA B200.
You can unlock this performance gain by downloading (or training) a parallel-capable drafter head, and adding "parallel_drafting": true on you vLLM serving pipeline. Pre-trained P-EAGLE heads are already available on HuggingFace for GPT-OSS 120B, GPT-OSS 20B, and Qwen3-Coder 30B, so you can start today!
In this post, we explain how P-EAGLE works, how we integrated it into vLLM starting from v0.16.0 (PR#32887), and how to serve it with our pre-trained checkpoints. Here is the list of artifacts used:
- ArXiv Paper
- HuggingFace Models (GPT-OSS 120B, GPT-OSS 20B, Qwen3-Coder-30B-A3B-Instruct)
- vLLM Integration Unified Parallel Drafting
- vLLM-Speculators (RFC, PR)
Figure 1: P-EAGLE over other methods on SPEED-BENCH with Concurrency of 1 on one NVIDIA B200 card.
Quick start P-EAGLE
You can enable parallel drafting with a single configuration change in the SpeculativeConfig class:
# vllm/config/speculative.py
parallel_drafting: bool = True
Here's an example command in vLLM to enable parallel drafting with P-EAGLE as drafter:
vllm serve openai/gpt-oss-20b \
--speculative-config '{"method": "eagle3", "model": "amazon/gpt-oss-20b-p-eagle", "num_speculative_tokens": 5, "parallel_drafting": true}'
EAGLE's Drafting Bottleneck
EAGLE achieves 2–3× speedups over standard autoregressive decoding and is widely deployed in production inference frameworks including vLLM, SGLang, and TensorRT-LLM. EAGLE drafts tokens autoregressively. To produce K draft tokens, it requires K forward passes through the draft model. As drafter models get better at drafting long outputs, this drafting overhead becomes significant—the drafter's latency scales linearly with speculation depth, constraining how aggressively we can speculate.
Our Approach: Parallel-EAGLE (P-EAGLE)
We present P-EAGLE, which transforms EAGLE from autoregressive to parallel draft generation. On B200 GPUs, P-EAGLE achieves 1.05×–1.69× speedup over vanilla EAGLE-3 on GPT-OSS 20B over MT-Bench, HumanEval, and SpeedBench. It is now integrated into vLLM to unlock parallel speculative decoding, and ready to accelerate real-world deployments.
P-EAGLE generates the K draft tokens in a single forward pass. Figure 2 shows the architecture, which consists of two steps.
Step 1: Prefilling. The target model processes the prompt and generates a new token, as it would during normal inference. Along the way, P-EAGLE captures the model's internal hidden states: h_prompt for each prompt position, and h_context for the newly generated token. These hidden states encode what the target model "knows" at each position and will guide the drafter's predictions. This step is identical to autoregressive EAGLE.
Step 2: P-EAGLE Drafter. The drafter constructs inputs for each position in parallel. Each input consists of a token embedding concatenated with a hidden state.
For prompt positions, the input pairs each prompt token embedding emb(p) with its corresponding h_prompt from the target model. Following the same convention as autoregressive EAGLE, positions are shifted by one. Position i receives the token and hidden state from position i-1, enabling it to predict the token at position i.
For position 1, Next-Token-Prediction (NTP), the input pairs the newly generated token embedding emb(new) with h_context. This position operates identically to the standard autoregressive EAGLE. For positions 2 through K, Multi-Token-Prediction (MTP), the required inputs—the token embedding and hidden state—do not yet exist. P-EAGLE fills these with two learnable parameters: a shared mask token embedding emb(mask) and a shared hidden state h_shared. These are fixed vectors learned during training that serve as neutral placeholders.
Positions pass together through N transformer layers, then through the language model head to predict draft tokens t1, t2, t3, and t4 in a single forward pass.
Figure 2: P-EAGLE architecture overview.
Training P-EAGLE on Long Sequences
Modern reasoning models produce long outputs. As shown in Figure 3, GPT-OSS 120B generates sequences (including prompts) with a median length of 3,891 tokens and P90 of 10,800 tokens on the UltraChat dataset. Draft models must be trained on matching context lengths to be effective at inference.
Figure 3: Sequence length (prompt + generation) distribution on UltraChat dataset with GPT-OSS 120B. Reasoning level: Medium.
A key challenge is that parallel drafting amplifies memory requirements during training. Training K parallel groups on a sequence of length N creates N × K total positions. With N = 8,192 and K = 8, a single training example contains 65,536 positions. Attention requires each position to attend to every valid position—65K × 65K means over 4 billion elements, consuming 8GB in bf16.
Position sampling [An et al., 2025] reduces memory by randomly skipping positions, but skipping too aggressively degrades draft quality. Gradient accumulation is the standard solution for memory-constrained training, but it splits across different training examples. When a single sequence exceeds memory, there's nothing to split.
P-EAGLE introduces a sequence partition algorithm for intra-sequence splitting. The algorithm divides the N × K position sequence into contiguous chunks, maintains correct attention dependencies across chunk boundaries, and accumulates gradients across chunks of the same sequence. For details, see the P-EAGLE paper.
Implementation in vLLM
Parallel drafting challenges
In many speculative decoding setups, drafting and verification share the same per-request token layout. That's mostly true for EAGLE: the drafter consumes a window that already matches what the verifier will check; K drafted tokens and one additional sampled token.
Parallel drafting breaks that consistency. To predict K tokens in one drafter forward pass, we append MASK placeholders (for example, [token, MASK, MASK, …]). Those extra positions exist only for drafting, so the draft batch shape no longer matches the verification batch shape. Because we can't reuse verification metadata, we must rebuild the batch metadata. We expand the input token IDs, hidden states, and positions to insert slots for mask tokens/embeddings, increment positions per request, then recompute the slot mapping and per-request start indices from the updated positions.
The Triton Kernel
To offset the overhead of rebuilding the batch metadata, we implement a fused Triton kernel that populates the drafter's input batch on-GPU by copying and expanding the target-model batch. In one pass, the kernel copies the previous token IDs and positions from the target batch into new destination slots and inserts the per-request bonus token sampled by the target model. It then fills the extra parallel-drafting slots with a special MASK token ID. Finally, it generates lightweight metadata: a rejected-token mask, a masked-token mask for parallel drafting slots, new-token indices for sampling draft tokens, and a hidden-state mapping.
This logic would otherwise be many GPU ops (copy/scatter + insert + fill + mask + remap). Fusing it into one kernel reduces launch overhead and extra memory traffic, keeping the drafting setup cheap.
Hidden State Management
For EAGLE-based methods that pass hidden states to the draft model, parallel drafting handles populating these fields separately. Since hidden states are significantly larger than the rest of the input batch, we split the work: the Triton kernel outputs a mapping, and a dedicated copy kernel broadcasts the learned hidden state placeholder into the mask token slots.
# Copy target hidden states to their new positions
self.hidden_states[out_hidden_state_mapping] = target_hidden_states
# Fill masked positions with the learned Parallel Drafting hidden state
mask = self.is_masked_token_mask[:total_num_output_tokens]
torch.where(
mask.unsqueeze(1),
self.parallel_drafting_hidden_state_tensor,
self.hidden_states[:total_num_output_tokens],
out=self.hidden_states[:total_num_output_tokens],
)
The parallel_drafting_hidden_state_tensor is loaded from the model's mask_hidden buffer, a learned representation that tells the model these positions should predict future tokens.
For KV cache slot mapping, valid tokens receive normal slot assignment while rejected tokens are mapped to PADDING_SLOT_ID (-1) to prevent spurious cache writes. For CUDA graphs, we extend the capture range by K × max_num_seqs to accommodate the larger draft batch introduced by parallel drafting.
vLLM Benchmarking on P-EAGLE
We train P-EAGLE on GPT-OSS-20B and evaluate across three benchmarks: MT-Bench for multi-turn instruction following, SPEED-Bench Code for long-term code generation, and HumanEval for function-level code synthesis. P-EAGLE delivers 55–69% higher throughput at low concurrency (c=1), with gains of 5–25% sustained at high concurrency (c=64), compared to the publicly available vanilla EAGLE-3 checkpoint. Results are shown in Figure 4-6.
The P-EAGLE drafter is a lightweight 4-layer model trained to predict up to 10 tokens in parallel. To evaluate performance, we sweep speculation depths K ∈ {3,5,7} across concurrency levels C ∈ {1,2,4,8,16,32,64}. Our goal is to identify the right deployment configuration for both P-EAGLE and vanilla EAGLE-3. Linear drafting is used for both P-EAGLE and vanilla EAGLE-3. In this context, "best P-EAGLE" and "best EAGLE-3" refer to the configurations that achieve peak throughput. These are measured in tokens per second (TPS), for a given speculation depth K. For each method, we select K that maximizes TPS under the given serving conditions.
A consistent pattern emerges. P-EAGLE achieves peak TPS at K=7 across all concurrency levels. In contrast, vanilla EAGLE-3 reaches its highest TPS at K=3, with its improved depth occasionally shifting toward higher values depending on concurrency. This behavior reflects a fundamental advantage of parallel drafting. P-EAGLE generates all K draft tokens in a single forward pass, allowing it to benefit from deeper speculation without incurring additional sequential overhead. Autoregressive drafters, by contrast, must generate speculative tokens step-by-step, which limits their ability to efficiently scale to larger K.
All experiments are conducted on one NVIDIA B200 (Blackwell) GPU using vLLM with the following serving configuration.
VLLM_USE_FLASHINFER_MOE_MXFP4_MXFP8=1 \
vllm serve openai/gpt-oss-20b \
--speculative-config '{
"method": "eagle3",
"model": "amazon/GPT-OSS-20B-P-EAGLE",
"num_speculative_tokens": 7,
"parallel_drafting": true}' \
--port 8000 \
--max-num-seqs 1024 \
--max-model-len 100000 \
--max-num-batched-tokens 100000 \
--max-cudagraph-capture-size 4096 \
--no-enable-prefix-caching \
--no-enable-chunked-prefill \
--kv-cache-dtype fp8 \
--async-scheduling \
--stream-interval 20
Note. Serving GPT-OSS-20B with EAGLE drafters currently requires a one-line vLLM patch (PR#36684). Apply it before launching. This fix is expected to land in an upcoming vLLM release.
Figure 4: MT-Bench throughput (TPS) for P-EAGLE vs EAGLE-3 on GPT-OSS-20B across concurrency levels. The P/E speedup ratios are: 1.55x (c=1), 1.29x (c=2), 1.35x (c=4), 1.28x (c=8), 1.27x (c=16), 1.09x (c=32), and 1.05x (c=64).
Figure 5: HumanEval throughput (TPS) for P-EAGLE vs EAGLE-3 on GPT-OSS-20B across concurrency levels. The P/E speedup ratios are: 1.55x (c=1), 1.53x (c=2), 1.45x (c=4), 1.35x (c=8), 1.31x (c=16), 1.37x (c=32), and 1.23x (c=64).
Figure 6: Speed-bench throughput (TPS) for P-EAGLE vs EAGLE-3 on GPT-OSS-20B across concurrency levels. The P/E speedup ratios are: 1.69x (c=1), 1.61x (c=2), 1.54x (c=4), 1.45x (c=8), 1.40x (c=16), 1.22x (c=32), and 1.25x (c=64).
In addition to reducing drafting overhead, P-EAGLE's throughput gains are also driven by better acceptance length (AL), the average number of draft tokens accepted by the verifier per speculation round. Higher AL means more of the draft work turns into real output, which directly boosts effective OTPS/TPS.
The following tables compare AL for P-EAGLE and vanilla EAGLE-3 on GPT-OSS-20B across our three benchmarks:
P-EAGLE (AL):
| Config | HumanEval | SPEED-Bench | MT-Bench |
|---|---|---|---|
| K=3 | 3.02 | 2.87 | 2.87 |
| K=7 | 3.94 | 3.38 | 3.70 |
EAGLE-3 (AL):
| Config | HumanEval | SPEED-Bench | MT-Bench |
|---|---|---|---|
| K=3 | 2.65 | 2.24 | 2.70 |
| K=7 | 3.03 | 2.59 | 3.27 |
P-EAGLE consistently achieves higher AL than EAGLE-3 at the same speculation depth K. At K=7, P-EAGLE outperforms EAGLE-3 by 30% on HumanEval (3.94 vs 3.03), 31% on SPEED-Bench (3.38 vs 2.59), and 13% on MT-Bench (3.70 vs 3.27). Notably, P-EAGLE benefits more from deeper speculation. From K=3 to K=7, P-EAGLE's AL increases by 0.92 on HumanEval (3.02 to 3.94), while EAGLE-3 gains only 0.38 (2.65 to 3.03). This widening gap at higher K is consistent with P-EAGLE's single-pass parallel drafting, which incurs no additional cost from deeper speculation.
Reproducing the Results
After launching the server, run benchmarks with vllm bench serve:
#MT-Bench
export MODEL="openai/gpt-oss-20b"
export BASE_URL="http://localhost:8000"
vllm bench serve \
--dataset-name hf \
--dataset-path philschmid/mt-bench \
--num-prompts 80 \
--max-concurrency 1 \
--model $MODEL \
--base-url $BASE_URL \
--temperature 0.0 \
--hf-output-len 2048
#HumanEval command:
#Download HumanEval dataset openai/openai_humaneval
vllm bench serve \
--dataset-name custom \
--dataset-path <dataset path> \
--num-prompts 164 \
--max-concurrency 1 \
--model $MODEL \
--base-url $BASE_URL \
--temperature 0.0 \
--custom-output-len 2048
Conclusion
P-EAGLE removes the sequential bottleneck from speculative decoding, delivering up to 1.69× speedup over vanilla EAGLE-3 on real workloads. By decoupling draft count from forward pass count, we can now explore larger drafting architectures, which can even enable increased acceptance rates compared to single-layer baselines. This implementation carefully handles the complexities of input preparation, attention metadata management, and KV cache slot mapping through hand-written fused kernels. While it requires specially trained models, the performance benefits make it a valuable addition to vLLM's speculative decoding capabilities.
As more parallel-trained models become available, we expect this approach to become the preferred choice for production LLM deployments. The combination of P-EAGLE's architectural efficiency and vLLM's robust infrastructure provides a clear path for those seeking maximum inference performance and reduced latency.
Try it today: download a pre-trained P-EAGLE head from HuggingFace, set "parallel_drafting": true in your vLLM config for any of the supported models, and see the speedup for yourself.
Acknowledgement
AWS: Xin Huang, Florian Saupe, Jaime Campos Salas, Ashish Khetan, George Karypis
NVIDIA: Benjamin Chislett, Max Xu, Zeyuan (Faradawn) Yang, Kaihang Jiang, Xin Li, Omri Almog
We are also especially grateful to the maintainers and vLLM community for providing reviews, guidance and an amazing infrastructure to build this feature on.
Also published on AWS Blogs.