Windowed-MTP: Removing the Full-Context Draft-KV Tax at Million-Token Context

· Source: Machine Learning · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, quick

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

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

Topics

Best for: Research Scientist, AI Engineer, AI Scientist, Machine Learning Engineer, NLP Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning.