跳到正文
arXiv (AI + Vision + Imaging)· Lucia Licakova, Niklas Schmidinger, Lukas Hauzenberger, Sebastian B\"ock, Sepp Hochreiter·· 8 天前AI 评分36

深度循环语言模型的架构与KV重放:降低自回归解码显存开销

Architectures and KV Replay for Depth-Recurrent Language Models

AI 导读

研究在统一深度循环框架下通过架构与缓存共享降低KV状态显存开销。循环混合架构需足够频繁的注意力锚点,性能强依赖循环混合器;循环KV重放让多次循环迭代复用同一KV状态,性能接近为每次迭代单独缓存KV的完整循环Transformer。

正文 · 原文

arXiv:2611.19446v1 Announce Type: new Abstract: Depth recurrence increases effective model depth by repeatedly applying a fixed computation block. However, sharing attention parameters does not share the key-value (KV) states generated at different recurrence iterations, which causes memory growth with recurrence depth during autoregressive decoding. We study how to reduce this memory cost through architectural and cache-sharing approaches within a common depth-recurrent framework. We first study a looped hybrid that repeats a stack of Transformer layers, with recurrent mLSTM or Gated DeltaNet blocks replacing most attention layers and periodic Transformer attention anchors retained. We then restrict recurrence to a dedicated recurrent workspace in a Parcae-style architecture and test its stabilising adapter as a wrapper for the looped hybrid. Finally, we train a looped Transformer with recurrent KV replay, where only selected recurrence iterations write KV states that later iterations reuse. This trains the model to operate with the same shared KV topology used during inference. We find that looped hybrids require sufficiently frequent attention anchors, with performance depending strongly on the recurrent mixer. For cross-iteration KV sharing, recurrent KV replay allows multiple recurrence iterations to reuse the same KV states while retaining performance close to the full looped Transformer with separate KV caches for each iteration.

来源:arXiv (AI + Vision + Imaging) · arxiv.org