Back to AI News
arxiv

PickPack: Training-Free Context Extension to Millions of Tokens via Sparse Attention

PickPack is a training-free method for extending LLM context windows to millions of tokens. It combines two operators in a single FlashAttention pass: Pack remaps query-key pairs to relative positions inside the trained window, and Pick uses pre-softmax logits to skip key blocks dynamically. The authors report that at 50% sparsity PickPack outperforms Pack alone on seven of eight Qwen3 model sizes and is up to 1.2x faster. Compared with recipes used for Qwen2.5, Qwen3.5 and Qwen3.8, it reports 1.0-11.0 points higher accuracy and up to 1.2x speedup from 128K to one million tokens, plus 11.6 points higher accuracy at four million tokens for Qwen3.5-9B.

AI Brief

It offers a concrete, training-free approach to long-context inference that could help teams run agentic workloads beyond their models' trained window without retraining.

arXiv:2612.01902v1 Announce Type: cross Abstract: Due to a growing range of applications, long-context processing and long-form generation with AI are becoming increasingly common, particularly with the transition to agentic workloads. Agents are long-lived, continuously produce and consume streams of tokens, and base their subsequent responses on their entire interaction history; multi-agent systems can further amplify this token volume. Models capable of processing long contexts are therefore increasingly necessary, but training with larger context windows is expensive, so most models are trained with windows of 32K to 256K tokens. Application demands can extend to millions of tokens, which creates a need for training-free context extension. Training-free context extension presents two key challenges: (1) out-of-distribution context embeddings, where unseen context lengths can shift attention distributions away from those seen during training, and (2) computational complexity, since attention's quadratic cost makes processing millions of tokens expensive. We propose PickPack, which addresses both challenges with two composable operators in a single FlashAttention pass: Pack maps every query-key pair to a relative position inside the trained window, and Pick uses the pre-softmax logits to dynamically decide which key blocks to skip. At 50% sparsity, PickPack is more accurate than Pack alone on seven of eight Qwen3 model sizes and context lengths, and up to 1.2x faster. Against the recipes that released Qwen2.5, Qwen3.5, and Qwen3.8 models ship with, it is 1.0-11.0 points more accurate and up to 1.2x faster from 128K to one million tokens, and 11.6 points more accurate at four million tokens, 16x the trained window of Qwen3.5-9B.
Be the first to rate this article.

Comments & Questions (0)

Captcha
Please be respectful — let's keep the conversation friendly.

No comments yet

Be the first to comment!