arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.09877cs.LGcs.AIcs.CL
收藏

键值均值:具有可扩展块递归压缩内存的变压器

Key-Value Means: Transformers with Expandable Block-Recurrent Compressed Memory

Featherless AI;Eleuther AI

Daniel Goldstein, Navneel Singhal, Eugene Cheah

AI总结:

KVM提出了一种新的块递归注意力机制,能够处理固定大小或增长状态,通过在强基线变压器中加入KVM注意力层,实现了线性复杂度的RNN,并在长上下文测试中表现出竞争力。

摘要:

我们提出了键值均值(

英文摘要:

Recall presents a difficult choice: transformers have a linearly growing memory that slows each successive token, while linear RNNs typically have fixed costs but limited recall. We present Key-Value Means ("KVM"), a novel block-recurrence for attention that can accommodate either fixed-size or growing state. Equipping a strong transformer baseline with fixed-size KVM attention layers yields a strong $O(N)$ chunked RNN, while adding only an insignificant number of new parameters. We train a transformer with a growable KVM cache and show it performs competitively on long-context tests with only subquadratic prefill time and sublinear state growth. KVM is implementable with standard operations and without custom kernels, and supports chunk-wise parallelizable training and prefill. It provides many of the benefits of both traditional transformers (expandable context memory, chunk-wise parallelizable training and prefill) and RNNs in a single unified package. It can be used on every layer, saving KV-cache memory, and allowing a continuous range of choices of prefill time complexity between $O(N)$ and $O(N^2)$. We release our code at https://github.com/featherless-ai/KVM-paper and trained models at https://huggingface.co/collections/featherless-ai/kvm-paper under the Apache 2.0 license.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑