arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.31633

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

Hayden Prairie, Jacob M. Ryan, Taylor Berg-Kirkpatrick, Daniel Y. Fu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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%.

1 Introduction

As inference deployments move to the edge [43, 45] and take up a large portion of compute [67], looped architectures create a new, predictable avenue to scale quality while keeping parameter count fixed [20, 41, 50]. Unfortunately, while looped architectures keep the memory overhead of parameters capped, they still create KV-caches at each recurrence [19, 50, 80], causing memory overhead to still grow linearly with recurrence count at inference time. One potential direction to reduce inference-memory overhead is KV-sharing (i.e., sharing KV-caches across recurrences). Specifically, some recent looped models have been shown to support reuse of the final recurrence's KV-cache for all prior recurrences with minimal impact to quality [20, 21], a property we term KV-shareability (Figure 1 [right]).

Unfortunately, the mechanisms underlying KV-shareability remain poorly understood, with more recent work reporting significant quality degradation with KV-cache reuse [19, 80]. Moreover, even

∗^{*}Equal contribution. Order decided by Blokus.

Pre-Training: Stochastic Depth

Post-Training: BeNice!

Inference: KV-Shareability

Figure

Figure 1: Stochastic Depth, BENICE!, and KV-Shareability. (Left) During pretraining, stochastic depth induces contractive residual dynamics. (Middle) BENICE! post-trains by injecting the final recurrence KV-caches into the first recurrence. Together, they enable KV-shareability in looped models, retaining only the final recurrence's KV-cache without degrading quality (Right).

models trained under identical setups can differ in whether they exhibit KV-shareability (see Table 1). In this paper, we hypothesize that contractive recurrent dynamics drive residual states toward fixed points, whose agreement under shared and unshared KV-caches enables KV-shareability.

To encourage contractive residual dynamics, we train with stochastic depth, randomly sampling depth throughout training (Figure 1 [left]). By requiring low-loss predictions across multiple depths, stochastic depth discourages residual drift and promotes convergence across recurrences. Contractive residual dynamics are what allow KV-shareability, which we formally analyze and empirically validate by showing that replacing intermediate caches with the final cache perturbs the attention output by a term bounded by the difference between their input residuals (see Section 3.1).

Unfortunately, even though stochastic depth creates contractive residual dynamics, it does not guarantee that residual states converge to the same fixed point with and without KV-sharing. Instead, KV-sharing sometimes introduces token-independent residual errors in the first recurrence, shifting the model's fixed point and harming downstream quality (see Section 3.2).

To enable KV-shareability, we pair stochastic depth pretraining with a targeted correction of the residual errors introduced by KV-sharing. We propose a two-stage method: first, stochastic depth pretraining to induce contractive residual dynamics; second, BENICE! to correct first recurrence residual errors created from KV-sharing. Specifically, BENICE! jointly optimizes both the first recurrence with KV-cache reuse and the final recurrence without reuse (Figure 1 [middle]), balancing KV-shareability and base-model quality. To further study KV-sharing with other KV-compression techniques, we extended BENICE! to memory-efficient sequence mixers, including multi-latent attention (MLA) [13] and Kimi delta attention (KDA) [65], by reusing the final recurrence's latent or state, respectively. Overall, BENICE! unlocks near-lossless KV-cache reuse across recurrences, facilitating predictable quality scaling using extended looping [50] while keeping parameter count and KV-cache memory constant as depth grows.

We evaluate KV-shareability and BENICE! on end-to-end quality, compatibility with other KV compression methods, and how it accelerates inference workloads:

• End-to-End Quality. BENICE! improves shared quality by up to 8.35 and 4.56 points for Core and Core-extended [38], respectively. Compared with standard finetuning, BENICE! improves validation perplexity by 9.75 points when sharing, while matching quality in the unshared case.

• Complementary to other KV Compression Methods. To evaluate KV-sharing with other KV-compression methods, we study its composition with memory-efficient sequence mixers and KV-quantization. We find that KV-sharing composes with both MLA and KDA sequence mixers and low-precision KV-quantization (e.g., fp8, mxfp4, nvfp4).

• Accelerating Inference Workloads. Under simulated long-context inference traffic, we observe that memory reductions in KV-sharing improve cache-hit rates by up to 31.4% (8.1 points), increasing throughput by up to 23.6%, and reducing p90 TTFT by up to 83.6%.

References (74)