P-EAGLE: A Technical Deep Dive into Parallel Speculative Decoding
Executive Summary
P-EAGLE is a parallelized speculative decoding framework that generates multiple draft tokens in a single forward pass, eliminating the linear latency bottleneck inherent in autoregressive drafters. By shifting from sequential to parallel draft generation, P-EAGLE achieves between 1.05Γ and 1.69Γ speedups over the state-of-the-art EAGLE-3 baseline on NVIDIA B200 GPUs.
- Key Capability: Parallel generation of $K$ draft tokens in a single forward pass.
- Infrastructure: Integrated into vLLM starting from v0.16.0 (PR#32887).
- Performance: Demonstrates significant efficiency gains on high-memory-bandwidth hardware (B200) across reasoning and coding benchmarks.
- Availability: Pre-trained heads released for GPT-OSS (120B, 20B) and Qwen3-Coder (30B).
Technical Architecture: From Sequential to Parallel
Speculative decoding traditionally relies on a "draft-then-verify" cycle. While EAGLE-3 established itself as a state-of-the-art method by using hidden states from the target model to guide the drafter, it remained fundamentally limited by its autoregressive nature. To produce $K$ speculative tokens, EAGLE required $K$ sequential forward passes. As speculation depth increases to handle complex reasoning or long-form generation, these sequential passes create a "drafting ceiling" where the overhead of the drafter offsets the gains from reduced target model calls.
P-EAGLE (Parallel-EAGLE) restructures this process into two distinct stages:
1. Prefill and Hidden State Capture
This stage remains identical to the standard EAGLE implementation. The target model processes the input prompt and generates the initial token. During this pass, P-EAGLE captures:
- $h_{prompt}$: Internal hidden states for every prompt position.
- $h_{context}$: The hidden state associated with the newly generated token.
These states represent the target modelβs high-dimensional "knowledge" at specific sequence indices, which is used to ground the drafter's predictions in the target model's feature space.
2. The P-EAGLE Parallel Drafter
The core innovation lies in how the drafter processes inputs for positions 1 through $K$ simultaneously. Instead of waiting for token $i$ to predict token $i+1$, P-EAGLE constructs a parallel input batch:
- Next-Token-Prediction (NTP) Position: The first position uses the embedding of the newly generated token ($emb(new)$) and the $h_{context}$ from the target model.
- Multi-Token-Prediction (MTP) Positions: For all subsequent speculative positions ($2$ to $K$), the required tokens and hidden states do not yet exist. P-EAGLE solves this by using two learnable parameters:
- $emb(mask)$: A shared mask token embedding.
- $h_{shared}$: A shared hidden state vector.
These placeholders are learned during training to serve as neutral inputs that allow the transformer layers to attend to previous context without requiring the actual autoregressive output of the preceding draft step. The entire block of $K$ positions passes through $N$ transformer layers and a language model head in a single execution.
Performance Analysis
P-EAGLE was evaluated on NVIDIA B200 hardware, focusing on the throughput improvements over vanilla EAGLE-3. The results indicate that the removal of the sequential bottleneck is most impactful when the speculation depth is high and the hardware has sufficient compute to handle the slightly wider parallel pass.
Speedup Benchmarks (NVIDIA B200)
| Model | Benchmark | Speedup vs. EAGLE-3 |
|---|---|---|
| GPT-OSS 20B | MT-Bench | 1.05x - 1.69x |
| GPT-OSS 20B | HumanEval | 1.05x - 1.69x |
| GPT-OSS 20B | SpeedBench | 1.05x - 1.69x |
| Qwen3-Coder 30B | SpeedBench | Reported Significant Gain |
Inference Configuration Impact
The speedup is highly correlated with the number of speculative tokens ($K$). In vanilla EAGLE, increasing $K$ from 4 to 8 would nearly double the drafter's latency. In P-EAGLE, the latency remains relatively flat because the work is parallelized, allowing for deeper speculation without the proportional time penalty.
Technical Implications
Memory and Training Complexity
The transition to parallel drafting introduces a "memory amplification" challenge during the training phase. If a sequence length is $N$ and the speculation depth is $K$, training requires processing $N \times K$ positions.
- The Scaling Problem: For a sequence of 8,192 tokens and $K=8$, the attention matrix grows to 65,536 positions. A full attention matrix for this sequence would consume approximately 8GB in BF16, leading to OOM (Out of Memory) errors on many GPUs.
- Sequence Partition Algorithm: P-EAGLE addresses this via a custom intra-sequence splitting algorithm. It divides the $N \times K$ sequence into contiguous chunks while maintaining correct attention dependencies across those chunks, allowing for gradient accumulation within a single sequence.
Integration with vLLM
P-EAGLE is integrated into the vLLM ecosystem through the vllm-speculators repository and is accessible via the SpeculativeConfig. This allows users to swap between standard EAGLE and P-EAGLE with a single flag.
Example vLLM Deployment:
vllm serve amazon/gpt-oss-20b \
--speculative-config '{
"method": "eagle3",
"model": "amazon/gpt-oss-20b-p-eagle",
"num_speculative_tokens": 5,
"parallel_drafting": true
}'
Limitations and Trade-offs
- Hardware Sensitivity: The 1.69x speedup is cited specifically for the NVIDIA B200. On older architectures (e.g., A100 or L40) with lower memory bandwidth or smaller caches, the overhead of the parallel forward pass (even if it's a single pass) might yield lower relative gains compared to the sequential method, which uses smaller KV caches per step.
- Learnable Parameters: P-EAGLE requires specifically trained "parallel-capable" drafter heads. Standard EAGLE-3 checkpoints cannot be used with
parallel_drafting: truewithout additional fine-tuning of the $emb(mask)$ and $h_{shared}$ parameters. - Draft Accuracy: While P-EAGLE reduces latency, the "parallel" prediction of tokens $2 \dots K$ using mask tokens is inherently more difficult than autoregressive prediction where the model sees its previous guesses. This may lead to a lower acceptance rate of speculative tokens in some high-entropy scenarios.
Expert Perspective
P-EAGLE represents a critical shift in speculative decoding research. For the past two years, the focus has been on improving the accuracy of the drafter (the "acceptance rate"). P-EAGLE acknowledges that even a perfect drafter is useless if the act of drafting takes longer than the time saved.
By utilizing learnable placeholders for future tokens, Amazon has effectively turned a sequential dependency into a feature extraction problem. This is particularly significant for reasoning models (like GPT-OSS 120B) that generate long, structured sequences where deep speculation is necessary to achieve high throughput. The introduction of the sequence partition algorithm is a necessary technical contribution, as it enables the training of these models on the long contexts (10k+ tokens) required for modern LLM applications.
Technical FAQ
How does this compare to Medusa on parallel token prediction?
While both involve parallel prediction, P-EAGLE utilizes the hidden states ($h_{prompt}$, $h_{context}$) from the target model to guide the drafter. This "guidance" is what made EAGLE-3 superior to Medusa, and P-EAGLE retains this advantage while adopting a parallelized execution similar to the multi-head approach.
Is it backwards-compatible with existing EAGLE v1/v2/v3 checkpoints?
No. To use P-EAGLE, you must use a model specifically trained with the parallel head and mask tokens. Amazon has released specific "p-eagle" versions of GPT-OSS and Qwen3-Coder for this purpose.
What is the primary bottleneck for P-EAGLE?
The primary bottleneck is now the acceptance rate rather than the drafting latency. Since P-EAGLE makes the draft generation time almost independent of the speculation depth $K$ (within reason), the optimal $K$ is now determined solely by how many tokens the target model can verify in parallel before the accuracy of the $K$-th token drops too low.
How does the sequence partition algorithm differ from standard gradient accumulation?
Standard gradient accumulation splits across different batches or different examples. P-EAGLE's sequence partition algorithm splits a single long sequence (amplified by $K$ parallel positions) into chunks that fit into GPU memory, while ensuring the attention mechanism still respects the causal dependencies of the combined sequence.
References
Sources
All technical specifications, pricing, and benchmark data in this article are sourced directly from official announcements. Competitor comparisons use publicly available data at time of publication. We update our coverage as new information becomes available.

