Giving AI a Smarter Memory to Think Faster and Longer
Original paper: Native Compressed Attention: Trainable Attention with Non-Uniform KV Compression
"Imagine an intelligent archival filing system that sorts a mountain of paperwork into neat, manageable stacks. Instead of reading every single piece of scrap paper, it keeps the most critical documents fully intact as anchor references while collapsing the rest into concise, neatly labeled summaries. This allows the system to instantly recall exact details without drowning in an ocean of redundant text."
As AI agents handle increasingly complex, multi-turn tasks, their memory usage balloons, slowing down servers and limiting how much context they can remember. By compressing memory by up to 16 times while maintaining high accuracy, this breakthrough makes running massive AI models significantly cheaper, faster, and capable of handling much larger workloads.
- Native Compressed Attention trains models to handle compressed memory natively.
- It uses non-uniform compression across tokens and attention heads.
- Achieves up to 3.5x throughput gains while maintaining high benchmark accuracy.
📑 Original arXiv Technical Abstract
As agentic workloads demand ever longer contexts, the KV cache has become a major bottleneck in serving, since its memory limits how many requests a GPU can serve and how many earlier prompts stay cached for reuse. Training-free KV compression shrinks the KV cache of an existing model without adapting the model to it, while DeepSeek's Compressed Sparse Attention was introduced in models pretrained with compressed attention. We introduce Native Compressed Attention (NCA), a trainable attention mechanism that enables existing models, through short fine-tuning, to attend over a chunkwise-compressed KV cache in both prefill and decode. Based on the observation that a small subset of KV tokens and attention heads carries most of the measured importance, NCA adopts non-uniform compression in two ways. Across tokens, a learned scorer retains the important tokens of each chunk individually as anchors and merges the remainder into block summaries. Across attention heads, each head receives its own anchor budget according to its measured sensitivity to compression. We apply NCA to three 4B models, Qwen3-4B-Instruct-2507 (full attention), Qwen3.5-4B (hybrid with Gated DeltaNet) and Nemotron-3-Nano-4B (hybrid with Mamba2), with 2,000 training steps and 0.2-1.4% extra parameters each. On average across long-context and long-reasoning benchmarks, NCA achieves scores comparable to the uncompressed model at 4-8x compression on all three models, while substantially outperforming existing KV compression methods in most settings. On Qwen3.5-4B with 4x compression, measured prefill and decode timings yield an estimated throughput gain of up to 3.5x under static batching, combining faster attention with a larger batch in memory.
✍️ Are you an author of this paper? Add code/demo links or a note
Help readers explore your work — share your official GitHub repo, Hugging Face weights, affiliation, or a clarification note for our editorial review queue.