Native Compressed Attention:训练式非均匀 KV 压缩,4 倍压缩吞吐最高提升 3.5 倍
Native Compressed Attention: Trainable Attention with Non-Uniform KV Compression
做长上下文推理服务的人可以看看这篇:不换模型,微调 2000 步就能让 Qwen3、Nemotron-Nano 这类 4B 模型扛住 4-8 倍 KV 压缩,吞吐最高到 3.5 倍。和 DeepSeek 的 CSA 不同,它给了已有全注意力模型一条低成本改造路径,跑 agent 长会话的团队尤其受用。
论文提出 Native Compressed Attention(NCA),一种可训练的注意力机制,通过少量微调让现有模型在 prefill 和 decode 阶段直接对分块压缩的 KV cache 进行注意力计算,对应 arXiv 编号 2612.00550。区别于训练即用的 DeepSeek Compressed Sparse Attention 和无需训练的 KV 压缩方案,NCA 走“短微调后适配压缩”的路线。
技术上,NCA 依据“少数 KV token 和注意力头承载了大部分重要性”的观察做了两处非均匀压缩:在 token 维度上,学习型打分器为每个 chunk 保留重要 token 作为锚点,其余合并为块摘要;在注意力头维度上,按各头对压缩的敏感度分配各自的锚点预算。实验覆盖三个 4B 模型——Qwen3-4B-Instruct-2507(全注意力)、Qwen3.5-4B(Gated DeltaNet 混合架构)和 Nemotron-3-Nano-4B(Mamba2 混合架构),每个模型仅增加 0.2-1.4% 参数、训练 2,000 步。
在长上下文和长推理基准的平均成绩上,NCA 在三种模型、4-8 倍压缩率下与未压缩模型相当,并在多数设置中明显优于现有 KV 压缩方法。以 Qwen3.5-4B 的 4 倍压缩为例,实测 prefill 和 decode 时间折算出静态批处理下最高 3.5 倍的吞吐提升,来源是更快的注意力加上显存中能容纳更大 batch。
Native Compressed Attention: Trainable Attention with Non-Uniform KV Compression
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.
本条情报归属 AITOP「论文」核心栏目,重点聚焦北美前沿实验室与硅谷科技巨头。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:NCA、KV压缩、Qwen3、DeepSeek,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始信息发布自一手权威信源「arXiv: DeepSeek」(Tier-1 一手发布),具备高确定性参考价值。