Windowed-MTP: Removing the Full-Context Draft-KV Tax at Million-Token Context
Summary
Windowed-MTP is a novel, training-free technique designed to eliminate the performance bottleneck of Multi-Token-Prediction (MTP) draft heads in speculative decoding at million-token contexts. Traditional MTP drafts incur a significant "KV tax" by performing full attention over the entire KV cache, leading to linearly increasing costs that can negate speculative decoding benefits, especially with deep drafts or hybrid attention targets. Windowed-MTP addresses this by applying a StreamingLLM-style sliding window and attention sink exclusively to the draft's attention mechanism, while preserving full-attention verification. This approach bounds the draft's KV working set to a constant, reducing KV entries by approximately 99% at 1M context. Benchmarks on Qwen GDN-MoE 35B/122B and Mamba2-hybrid NoPE 120B models show a +28% to +44% reduction in per-decode-step cost, improving end-to-end latency without compromising output quality.
Key takeaway
For machine learning engineers optimizing large language model inference at million-token contexts, implementing Windowed-MTP offers a significant performance uplift. You can achieve a +28% to +44% reduction in per-decode-step cost and improve end-to-end latency without retraining or sacrificing output quality. Consider integrating this training-free, drop-in solution to manage KV cache growth and reclaim memory, especially when deploying models like Qwen GDN-MoE or Mamba2-hybrid architectures.
Key insights
Speculative decoding's KV tax at million-token contexts can be eliminated by windowing only the draft attention.
Principles
- Draft attention can be windowed without affecting target verification.
- Constant KV working sets improve large context inference efficiency.
- Reclaiming unread KV reduces memory footprint.
Method
Apply a StreamingLLM-style sliding window and attention sink to the speculative decoding draft's attention mechanism, leaving the full-attention target verification intact.
In practice
- Integrate Windowed-MTP as a drop-in, training-free optimization.
- Reduce GPU memory usage by reclaiming unread draft KV.
- Improve LLM inference latency at 1M+ token contexts.
Topics
- Speculative Decoding
- Multi-Token Prediction
- KV Cache Optimization
- Large Language Models
- Context Windowing
- LLM Inference Performance
Best for: Research Scientist, AI Engineer, AI Scientist, Machine Learning Engineer, NLP Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning.