不增大KV缓存实现更深循环:因果编解码器的循环深度
Looping Deeper Without Growing the KV Cache: Recurrent Depth for Causal Encoder-Decoders
AI总结:
该研究提出循环因果编解码器(CED),通过编码器循环实现零轮次KV增长,在与非循环CED内存相当的情况下,以1/6全局KV恢复循环Transformer 86%-93%增益,在5520亿参数模型上实现36.8倍KV压缩与3.6倍吞吐量提升。
摘要:
循环语言模型可在不增加参数的情况下加深计算,但跨层和跨轮次缓存全上下文键值(KV)状态会严重限制服务批次大小。我们设计了一种循环因果编解码器(CED),实现了零轮次KV增长的循环深度,解决了非对称栈的循环位置与方式问题,其中仅稀疏编码器层生成全局KV。研究发现,循环必须置于编码器中以迭代优化全局KV表示,而非重读静态解码器投影,这既提升了语言建模效果,又保留了长上下文缩放能力。此外,在随机循环深度下训练编码器循环会诱导出定点均衡,每一轮都能无损共享上一轮的KV缓存。结合跨层与跨轮次KV共享,所得循环CED与非循环CED的最小内存占用相当,且以1/6的全局KV恢复了循环Transformer 86%-93%的增益。为测试生产规模服务,我们在一个4×GB200节点上对5520亿参数的DeepSeek-V4.1-Flash进行8轮循环:按每层和每轮KV计算,循环无法容纳单个12.8万token的请求,而循环CED每token的KV减少了36.8倍,可容纳38个此类请求(与非循环模型数量相同),且在8千token提示下服务吞吐量提升了3.6倍。
英文摘要:
Looped language models deepen computation without adding parameters, yet caching full-context key-value (KV) states across layers and rounds severely bounds serving batch size. We design a looped causal encoder-decoder (CED) that achieves recurrent depth with zero round-wise KV growth, addressing where and how to loop an asymmetric stack in which only sparse encoder layers generate global KV. We find that recurrence must be placed in the encoder to iteratively refine global KV representations rather than re-reading static decoder projections, which both drives language-modeling gains and preserves long-context scaling. Furthermore, training the encoder loop under stochastic recurrence depth induces a fixed-point equilibrium where every round losslessly shares the last round's KV cache. Compounding cross-layer and cross-round KV sharing, the resulting Looped CED matches an unlooped CED's minimal memory footprint and recovers 86-93% of a looped Transformer's gain with 1/6 of its global KV. To test serving at production scale, we loop the 552B-parameter DeepSeek-V4.1-Flash for 8 rounds on one 4xGB200 node: with per-layer and per-round KV the loop cannot fit a single 128K-token request, whereas Looped CED holds 36.8x less KV per token, fits 38 such requests (as many as the unlooped model), and serves 3.6x higher throughput on 8K-token prompts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。