SEED: Self-Speculative Decoding via Implicit Encoder-Decoder
Organizations: Department of Computer Science, Purdue University, USA
Abstract
Self-speculative decoding accelerates large language model (LLM) inference by drafting tokens from the target model itself, but faces a sharp tradeoff between the quality and cost of the draft. Early-exit methods produce drafts cheaply by terminating computation at intermediate layers, but forgo the deeper representations that later layers provide and thus suffer in draft quality. Multi-token prediction preserves draft quality by emitting from the model's final hidden states, but pays for a full forward pass to produce those states at every drafting step. We propose self-speculative encoder-decoder (SEED), a self-speculative method that obtains high-quality drafts cheaply by reusing the deep contextual representations already computed during verification. We reinterpret the standard decoder-only transformer as an implicit encoder-decoder: the first layers (encoder) build deep contextual representations, and the last few layers (decoder) emit tokens from them. Encoding and verification are merged into a single step: verification is performed by the full encoder-decoder, and the contextual representations of the verified prefix are cached for reuse during drafting. Drafting is therefore very fast: between verifications, the lightweight decoder drafts multiple tokens autoregressively, each conditioned on the cached representations and on preceding drafts. Experiments across multiple benchmarks show that SEED achieves up to 2.7 average speedup on 4B-scale models, outperforming both early-exit and MTP-style self-speculative baselines and running 28% faster than the state-of-the-art EAGLE-3, while preserving or even improving the generation quality of standard autoregressive fine-tuning. Code is available at https://github.com/lhk2004/SEED.
Figures & tables
| Method | GSM8K | KodCode | ScienceQA | CNN/Daily Mail | Avg. | ||||||
| Acc. | Tput | Acc. | Tput | Acc. | Tput | R-1 | R-2 | R-L | Tput | Speedup | |
| Qwen3-1.7B-Base | |||||||||||
| AR | 56.3 | 37.9 | 66.5 | 36.0 | 93.2 | 36.6 | 38.6 | 17.7 | 28.6 | 34.2 | 1.0 |
| Common Acceleration Methods | |||||||||||
| E2D2 | 26.6 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{29.7}}} | 67.6 | 40.6 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{25.9}}} | 65.1 | 88.7 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{4.5}}} | 68.1 | 32.8 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{5.8}}} | 12.1 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{5.6}}} | 23.3 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{5.3}}} | 56.8 | 1.8 |
| Apple MTP | - | 59.1 | - | 54.6 | - | 56.6 | - | - | - | 37.5 | 1.4 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | No Ext. Module | Lossless | Training Cost | Speedup |
| General MTP | ||||
| Meta MTP [ 14 ] & DeepSeek MTP [ 23 ] | ✗ | ✓ | High | Mid |
| FastMTP [ 6 ] | ✗ | ✓ | Low | Mid |
| Apple MTP [ 33 ] | ✗ | ✓ | Low | High |
| Jacobi Forcing [ 15 ] | ✓ | ✗ | Low | High |
| Diffusion Language Models |
| Decoder Size (# layers) | E2D2 Acc. (%) | E2D2 Tput (tokens/s) | SEED Acc. (%) | SEED Tput (tokens/s) |
| 2 | 23.7 | 75.9 | 57.5 | 74.3 |
| 4 | 26.6 | 67.6 | 57.9 | 66.1 |
| 6 | 32.3 | 63.2 | 59.4 | 60.8 |
| 8 | 32.4 | 57.3 | 58.8 | 56.3 |
| 10 | 36.3 | 51.2 | 57.4 | 53.3 |
| 12 | 41.3 | 46.4 | 57.0 | 48.8 |
| Dataset | Base Model | Batch Size | LR | Steps | Max Length |
| GSM8K | Qwen3-1.7B-Base | ||||
| KodCode | Qwen3-1.7B-Base | ||||
| ScienceQA | Qwen3-1.7B-Base | ||||
| CNN/Daily Mail | Qwen3-1.7B-Base | ||||
| GSM8K | Qwen3-4B-Base | ||||
| KodCode | Qwen3-4B-Base |
| Method | Fixed-Length Drafting ( ) | Fixed-Length Drafting ( ) | Dynamic Drafting ( ) | ||||||
| Tput | Acc. Len | Acc. Rate | Tput | Acc. Len | Acc. Rate | Tput | Acc. Len | Acc. Rate | |
| w/ Tree Attn | 82.3 | 3.16 | 79.80% | 82.5 | 4.65 | 59.10% | 91.8 | 3.97 | 88.57% |
| w/o Tree Attn | 76.9 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{5.4}}} | 2.67 | 69.45% | 75.2 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{7.3}}} | 3.67 | 46.64% | 85.1 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{6.7}}} | 3.28 | 77.59% |
| GSM8K Acc. (%) | Throughput (tokens/s) | Draft Token Acc. Rate (%) | Draft Token Acc. Length | |
| SEED | 57.5 | 74.3 | 73.0 | 2.9 |
| w/o Parameter Sharing | 44.1 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{13.4}}} | 68.8 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{5.5}}} | 68.5 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{4.5}}} | 2.7 {}^{{\color[rgb]{1,0.3,0.3}\downarrow\textbf{0.2}}} |
| Model | Accuracy (%) | Tput (tokens/s) | Acc. Len | Acc. Rate (%) |
| AR (from base) | 56.3 | 37.9 | - | - |
| SEED (continued from AR) | 56.5 {}^{{\color[rgb]{0,0.7,0}\uparrow\textbf{0.2}}} | 90.6 {}^{{\color[rgb]{0,0.7,0}\uparrow\textbf{52.7}}} | 3.91 | 86.82 |
| SEED (from base) | 57.1 | 91.8 | 3.97 | 88.57 |
| Method | Weights Touched per Draft Token | Weights | Cost (units) |
| AR | 28 layers + head | 1721M | 1.000 |
| SEED | 2 decoder layers + head | 411.9M | 0.239 |
| LayerSkip | 8 layers + head | 713.8M | 0.415 |
| Apple MTP | (28 layers + head) per block + sequential sampler head | M | |
| EAGLE-3 | 1 fused draft layer + reduced-vocab head | M |
| Method | (ms) | Predicted (tokens/s) | Measured (tokens/s) | ||||
| SEED | 0.239 | 1.000 | 1.96 | 51.7 | 3.92 | 75.8 | 74.3 |
| LayerSkip | 0.415 | 0.766 | 2.43 | 64.1 | 2.72 | 42.4 | 47.0 |
| Apple MTP | 1.000 | 2.72 | 71.8 | 3.79 | 52.8 | 44.6 |
Speculative Decoding
Speculative decoding accelerates generation by drafting multiple tokens and verifying them in parallel with a larger target model.
See all 293 papers