TL;DR
SEED (Self-Speculative Encoder-Decoder) accelerates LLM inference by reinterpreting standard decoder-only transformers as implicit encoder-decoders. By reusing deep contextual representations from the verification step to power a lightweight, two-layer drafting phase, it achieves up to a 2.7× speedup on 4B-scale models while maintaining or even improving generation quality.
What Problem Does This Paper Address?
Large Language Model (LLM) inference is notoriously memory-bound: generating one token at a time requires a full pass through the entire model, leaving the GPU's massive parallel compute capacity largely idle. Speculative decoding tackles this by using a "cheap" drafter to propose multiple tokens, which the "expensive" target model then verifies in a single parallel pass.
However, existing self-speculative methods (where the model drafts from itself) face a brutal tradeoff:
- Early-exit methods (like LayerSkip) are fast because they stop after a few layers, but they produce low-quality drafts because they rely on shallow, "low-level" representations.
- Multi-token prediction (MTP) methods produce high-quality drafts from deep representations but are slow because they require a full forward pass for every single draft token.
The authors ask: Can we get drafts as deep as the full model, but as cheap as just a few layers?
Methods
SEED's core innovation is re-partitioning the transformer architecture. A standard 28-layer model is treated as an implicit encoder-decoder: the first 26 layers act as an "encoder" that builds deep context, and the final 2 layers act as a "decoder" that emits tokens.
Key technical components include:
- Amortized Encoding: The verification step (a full forward pass) naturally produces deep contextual representations for the prefix. SEED caches these in the KV cache.
- Lightweight Drafting: Between verifications, the model only runs the "decoder" (the last 2 layers). It takes raw embeddings of new draft tokens and performs what the authors call "cross-attention" to the deep representations already sitting in the cache. This makes drafting extremely fast.
- Joint Training: The model is fine-tuned with a dual objective: a standard next-token prediction loss ($\mathcal{L}_{CE}$) to maintain quality, and a speculative drafting loss ($\mathcal{L}_{spec}$) that trains the decoder to predict future tokens from raw embeddings and cached deep features.
- Adaptive Tree-Based Verification: Instead of a fixed draft length, SEED uses a confidence-based stopping rule and expands drafts into a tree of multiple candidate paths (top-p branching), which are then verified in parallel.
Datasets
The authors evaluated SEED by fine-tuning Qwen3-1.7B-Base and Qwen3-4B-Base on four diverse benchmarks:
- GSM8K: Mathematical reasoning.
- KodCode: Python code generation.
- ScienceQA: General science knowledge.
- CNN/Daily Mail: Abstractive text summarization.
Key Insights and Ideas
- Verification is "Free" Encoding: The most expensive part of drafting is building deep context. SEED realizes that the verification pass has already done this work. By caching those deep features, the drafter only needs to process the new, shallow draft tokens.
- Planning Ahead: Training with the speculative objective forces the "encoder" layers to compress more future-predictive information into their hidden states. Linear probe experiments (Figure 4/6) confirmed that SEED's representations are significantly more accurate at predicting distant future tokens than standard models.
- Parameter Sharing is Vital: Unlike methods that use a separate drafter (like EAGLE), SEED's drafter is the target model's last few layers. This ensures the drafter and verifier are perfectly aligned, which the authors proved is critical for high acceptance rates.
Key Results
- Speed: SEED achieved an average 2.7× speedup on 4B models, outperforming both early-exit and MTP baselines. It ran 28% faster than the state-of-the-art EAGLE-3.
- Quality: Unlike many acceleration methods that degrade accuracy, SEED matched or improved performance. For example, on GSM8K, the 4B SEED model improved accuracy from 75.1% to 76.0%.
- Efficiency: Drafting in SEED is 4.2× cheaper than a full forward pass and 1.7× cheaper than LayerSkip's early-exit pass, despite using deeper features.
Limitations and Future Work
- Scaling: The study focused on 1.7B and 4B models. Validating SEED on 70B+ scale models is a necessary next step, as the efficiency-quality tradeoff may shift with depth.
- Task-Specific Tuning: Currently, SEED requires task-specific fine-tuning. The authors suggest integrating the speculative objective into general instruction-tuning or pre-training to make models "SEED-ready" out of the box.
- Hardware Optimization: Realizing the full potential of SEED in production will require custom kernels optimized for the specific "decoder-only" drafting phase and tree-structured attention.
Summary updated