AI Pulse
📄 论文解读

让AI自己说“我该看哪”,省一半算力

大模型读长对话时,明明只关心其中几句话,却要把整段历史都翻一遍才能回答。这篇论文让模型在思考过程中自己“声明”接下来要看哪块:全局、某个区域、还是只看最近几句,推理引擎像解析工具调用一样照做,跳过大部分缓存。在现成模型上,生成时实际关注的token减少了52%,准确率只掉1.27个百分点,而且模型越大掉得越少。它不是你明天能用上的功能,但指向一个更省的方向:与其让外部机制猜模型需要什么,不如让模型自己说。

📄 原文摘要(英文)

Language models spend most of their attention on a small fraction of context, yet they read the entire KV cache to find the few tokens that matter. If the user asks about a previous detail in a 1M-token conversation, global attention layers must scan the full context to generate each token of the reply. A prominent approach mitigates this cost by pre-selecting relevant tokens via lightweight proxy scores, but this extrinsic scoring still incurs O(N) per step. We take an intrinsic approach motivated by the simple question: wouldn't the model already know which parts of the context are relevant? To this end, we introduce Declarative Attention (DA), a protocol that elicits the model to declare where it needs to attend within its chain-of-thought, partitioning generation into three modes: <global> (full context), <focus> (a specific region), and <local> (recent output only). The inference engine parses these declarations like tool calls and skips most of the KV cache read. Under zero-shot evaluation across 15 long-context tasks, DA on off-the-shelf models (Gemma-4-31B, Qwen-3.6-27B) significantly reduces total attended tokens during decoding (52.0%, 31.1%) with modest accuracy drops (1.27pp, 2.75pp) that shrink with model scale. DA unlocks a new axis of sparse attention, with further potential under training-based methods that future work can explore.

arXiv 原文

订阅 AI Pulse

每天 08:00 · 12:30 · 18:30 · 23:50 更新