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

· Source: cs.CL updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, extended

Summary

Windowed-MTP is a novel, training-free technique designed to eliminate the "long-context draft tax" in speculative decoding for large language models. This method applies a StreamingLLM-style sliding window and attention sink exclusively to the draft's attention mechanism, leaving the full-attention target verification intact. Benchmarked on Qwen GDN-MoE 35B/122B and Mamba2-hybrid NoPE 120B models at 1M context on a single GPU, Windowed-MTP reduces the per-decode-step cost by +28% to +44%. It also reclaims 7.7-11% of the total KV cache memory, improving throughput and latency. The approach is lossless, preserving the target's output distribution, and its benefits scale with context length, making deep speculation viable.

Key takeaway

For Machine Learning Engineers optimizing LLM inference at million-token contexts, the "long-context draft tax" on speculative decoding's MTP heads is a critical bottleneck. You should implement Windowed-MTP to cut per-decode-step costs by 28-44% and reclaim significant KV cache memory. This training-free, lossless technique ensures your long-context LLM deployments achieve higher throughput and lower latency without compromising output quality.

Key insights

Windowing the speculative decoding draft's attention at long contexts significantly reduces cost without sacrificing output quality.

Principles

Method

Implement a sliding window and attention sink on the draft's KV-index construction, reducing its working set. This is achieved by limiting the block table to sink and recent tokens.

In practice

Topics

Code references

Best for: MLOps Engineer, AI Engineer, NLP Engineer, AI Scientist, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.