Abstract
Speculative decoding is a prominent technique for accelerating Large Language Model (LLM) inference, yet the verification stage often becomes a computational bottleneck, particularly for long-context and Mixture-of-Experts (MoE) models. We present a Sparse Verification framework that introduces sparsity across attention, Feed-Forward Networks (FFN), and MoE layers during verification. By exploiting structural redundancies—specifically the high overlap in retrieved KV blocks across draft tokens—our method reduces computational overhead without requiring model retraining or sacrificing performance.
Introduction
Speculative decoding utilizes a small draft model to generate a sequence of candidate tokens, which are then verified in parallel by a larger target model. While effective, the verification stage's efficiency is challenged by increasing draft lengths and complex architectures. Existing sparsification methods, such as KV cache eviction, are typically optimized for autoregressive decoding and fail to account for the multi-token nature of verification. This work addresses this gap by tailoring sparsity mechanisms specifically for the verification process.
Methodology: The Sparse Verification Framework
The proposed framework applies sparsity across three orthogonal dimensions of the transformer architecture:
- Importance-Based Sparse Attention: The KV cache is partitioned into blocks. Using the query of the first draft token as a proxy, the system identifies and activates only the most relevant blocks for the entire draft sequence.
- Inter-layer Retrieval Reuse: Observing that block selection patterns are highly consistent across adjacent layers, the framework designates "anchor layers" for retrieval, while subsequent layers reuse these results.
- Piecewise Budget Control: To ensure stability, KV eviction is only triggered once the sequence length exceeds a threshold ($L_0$), preserving performance on shorter prompts.
- Sparse FFN & MoE:
- Sparse FFN (SFFN): Prunes low-activation channels during inference based on a magnitude threshold.
- Sparse MoE: Employs an adaptive expert-skipping strategy where experts with routing weights below a threshold are bypassed.
Key Insights: Structural Redundancy and the First-Token Heuristic
A core finding of this research is the "First Token" heuristic. Analysis reveals that tokens within a single speculative draft step retrieve highly similar KV blocks, with an average overlap exceeding 0.8. Consequently, the first token's query serves as a reliable proxy for block selection for the entire batch.
Furthermore, the framework leverages "structured redundancy"—patterns of computation that remain redundant across both layers and the multiple candidate tokens within a draft. This allows for a training-free integration that can be dropped into existing inference pipelines "off-the-shelf."
Experimental Results
The framework was evaluated on models including Llama 3.1-8B, Qwen3-30B-A3B, and DeepSeek-R1 across benchmarks like LongBench, GSM8K, and RepoBench-P.
- Efficiency: On Qwen3-30B-A3B, Sparse FFN achieved a mean sparsity of 0.64, pruning over 60% of activations while maintaining or even slightly improving ROUGE scores on GovReport.
- MoE Performance: For DeepSeek-R1, Sparse MoE maintained competitive accuracy on GSM8K (97.0% vs. 98.0% baseline) while significantly reducing expert computation.
- Stability: The "acceptance length"—the number of draft tokens accepted by the target model—remained stable across all tests, indicating that sparsification does not impair the model's verification accuracy.
Limitations and Future Work
While the framework shows significant promise, tasks requiring fine-grained symbolic reasoning (e.g., CollegeMath) exhibit higher sensitivity to aggressive sparsification. Future research will focus on coordinating sparsity budgets across different modules and optimizing hardware-specific kernels (e.g., Triton, CUDA) to translate theoretical FLOP reductions into maximum wall-clock speedups.
Summary updated