基础设施 4.0 · 优秀 2026-10-22 · 论文

BeNice! Closing Looping's Inference-Memory Gap via KV-Sharing

循环架构反复把激活过同一层块,推理时每次递归各自生成 KV 缓存,内存随深度线性增长;此前的跨深度共享(KV-sharing)发现最后一次递归的缓存可以借给前面的递归而不掉点(KV-shareability),但机制不明同构训练的模型也不稳定出现论文用两阶段方案把它做成可控:预训练加 stochastic depth,诱导收缩残差动力学让各次递归表示趋同;后训练阶段的 BeNice! 把最后一次递归的 KV 缓存广播进第一次递归并训练出兼容残差,验证困惑度与标准微调持平KV-sharing 可与 MLAKimi delta attention 及 fp8/mxfp8/nvfp4 低精度 KV 量化叠加;低内存长上下文模拟中缓存命中率最高 +31.4%吞吐 +23.6%p90 TTFT 最高降 83.6%

打开原文回到归档

BeNice! Closing Looping's Inference-Memory Gap via KV-Sharing

  • ID: ea0459ce
  • 原文链接: https://arxiv.org/abs/2610.31633
  • PDF: https://arxiv.org/pdf/2610.31633
  • 作者: Hayden Prairie, Jacob M. Ryan, Taylor Berg-Kirkpatrick, Daniel Y. Fu
  • 日期: 2026-10-22
  • 更新: 2026-10-22
  • 分类: infra
  • 来源类型: paper
  • 标签: kv-cache, inference-memory, looped-models, long-context
  • 质量评分: 4/5
  • 抓取时间: 2026-10-24 04:22 UTC

中文导读

循环架构反复把激活过同一层块,推理时每次递归各自生成 KV 缓存,内存随深度线性增长;此前的跨深度共享(KV-sharing)发现最后一次递归的缓存可以借给前面的递归而不掉点(KV-shareability),但机制不明同构训练的模型也不稳定出现论文用两阶段方案把它做成可控:预训练加 stochastic depth,诱导收缩残差动力学让各次递归表示趋同;后训练阶段的 BeNice! 把最后一次递归的 KV 缓存广播进第一次递归并训练出兼容残差,验证困惑度与标准微调持平KV-sharing 可与 MLAKimi delta attention 及 fp8/mxfp8/nvfp4 低精度 KV 量化叠加;低内存长上下文模拟中缓存命中率最高 +31.4%吞吐 +23.6%p90 TTFT 最高降 83.6%

为什么值得关注

循环模型推理内存线性增长的解法:随机深度预训练 + KV 缓存跨深度共享,命中率 +31%p90 TTFT 降 84% Relevance for field notes: a concrete inference-memory fix for looped models - stochastic-depth pretraining plus a post-training KV-cache broadcast makes cross-depth sharing reliable, and it composes with MLA/Kimi delta attention and fp8/nvfp4 KV quantization (cache hit rate +31.4%, p90 TTFT -83.6% in low-memory long-context runs).

关键信息

  • 论文标题: BeNice! Closing Looping's Inference-Memory Gap via KV-Sharing
  • 作者: Hayden Prairie, Jacob M. Ryan, Taylor Berg-Kirkpatrick, Daniel Y. Fu
  • arXiv: https://arxiv.org/abs/2610.31633
  • 发布时间: 2026-10-22
  • arXiv 分类: cs.LG
  • 关联标签: kv-cache, inference-memory, looped-models, long-context

English Abstract

Looped architectures scale quality while keeping parameter count fixed by repeatedly passing activations through the same block of layers. During inference, each recurrence generates independent KV-caches, causing memory to grow linearly. To address this challenge, prior work has proposed KV-sharing (i.e., sharing KV-caches across depth), finding that, in some cases, the KV-cache of the final recurrence can be shared with the earlier recurrences without quality loss, a property we denote as KV-shareability. However, the mechanisms underlying KV-shareability remain poorly understood, with even identically trained looped architectures not consistently exhibiting it. In this paper, we study how KV-shareability can be enabled in looped models. We propose a two-stage method: in the first stage, we use stochastic depth during pretraining, which induces contractive residual dynamics that drive representations toward a common limit across recurrences. In the second stage, we propose BeNice!, a post-training method that broadcasts the final recurrence's KV-cache into the first recurrence, training it to produce compatible residuals while preserving the original model's quality. As a result, BeNice! enables KV-shareability while matching standard finetuning's unshared validation perplexity. Using BeNice!, we show that KV-sharing is complementary to alternative KV-compression methods, composing with memory-efficient sequence mixers (e.g., multi-latent attention, Kimi delta attention) and low-precision KV-cache quantization (e.g., fp8, mxfp8, nvfp4). Finally, in simulated low-memory, long-context inference, KV-sharing improves cache hit rates by up to 31.4%, increases throughput by up to 23.6%, and reduces p90 time-to-first-token by up to 83.6%.

English Summary

Looped architectures pass activations through the same block repeatedly, but at inference each recurrence builds its own KV-cache, so memory grows linearly with depth. Prior work found the final recurrence's cache can sometimes be shared with earlier ones without quality loss (KV-shareability), but identically trained models do not consistently show it. Two stages enable it: stochastic depth in pretraining induces contractive residual dynamics that pull representations toward a common limit across recurrences; then BeNice!, a post-training method, broadcasts the final recurrence's KV-cache into the first and trains compatible residuals at matched perplexity. KV-sharing composes with multi-latent attention, Kimi delta attention, and fp8/nvfp4 KV quantization; in low-memory long-context inference it lifts cache hit rates up to 31.4%, throughput up to 23.6%, and cuts p90 TTFT by 83.6%.

Obsidian Notes

  • Fetched 2026-10-24 04:22 UTC via opencli arxiv paper 2610.31633 -f json; page grounded in arXiv title/authors/abstract/dates/categories only.
  • Chinese body anchors on the entry's summary_zh; no experimental details beyond the abstract were added.