LLM Architecture

Sharing KV Cache Across Depth and Loops: SWA, YOCO, PLT, and FlashLoop

Contents
  1. 1. Bounded-State Mixers, SWA's Four Costs, and the Hybrid Crossover
  2. 2. YOCO: One Global KV Cache and the Source of Its $30.3\times$ Prefill Speedup
  3. 3. Loop-Specific KV and Bandwidth Designs: LSE Merge, G-SWA, PLT, and FlashLoop
  4. 3.1 Exact Two-Line LSE Merging and Global + SWA Traces
  5. 3.2 G-SWA and Four Limits of Global + SWA Sharing
  6. 3.3 PLT: Cross-Pass Pipelined Batching Against the HBM Bandwidth Wall
  7. 3.4 FlashLoop, Recurrent Linear Cores, and Late-2026 Production Schemes
  8. 4. Production Takeaways for Untied and 100B+ Serving Stacks
  9. References

Rewriting a 32-layer Transformer as 8 physical layers × 4 loops shrinks checkpoint weights to 0.25×, yet naive execution still materializes all 32 full-length KV Cache tables and re-streams 100% of core weights over HBM on every batch-1 decoded token. Separating weight compression from memory and bandwidth efficiency turns on three mechanisms: bounded-state mixers, cross-layer cache sharing, and cross-loop scheduling.


1. Bounded-State Mixers, SWA's Four Costs, and the Hybrid Crossover#

Every KV compression mechanism trades state memory and compute complexity against long-range exact retrieval fidelity (assuming fixed model width $d$, per-head dimension $d_h$, and Chunked WY block size $C$ for linear recurrences):

DimensionFull SoftmaxSliding Window · SWALinear / State-Space · RetNet / GDN / KDA
State ScalingLinear in length, $O(Nd)$Ring buffer $O(Wd)$ · $O(1)$ in $N$Fixed $d_k \times d_v$ matrix · $O(1)$ in $N$
Prefill / Decode$O(N^2 d)$ / $O(Nd)$$O(NWd)$ / $O(Wd)$Chunked WY $O(N d d_h)$ / $O(d d_h)$
Recall FidelityArbitrary exact recallTrailing $W$ tokens onlyBounded by orthogonal slots $d_k$
Note

The linear-attention Prefill term omits the intra-chunk quadratic cost $O(NC^2 n_h)$, which is subdominant to $O(N d d_h)$ projections and state updates when $C \ll d_h$.

In practice, Sliding Window Attention (SWA) collapses state memory to $O(Wd)$, yet incurs four hard systems and modeling costs:

  1. Hard blind spots and the multi-layer "telephone game" vs. the small-window trade-off: Consider a 6-token sequence $[t_1, t_2, t_3, t_4, t_5, t_6]$ under $W = 3$. When $t_4, t_5, t_6$ arrive, the ring buffer holds only $[t_4, t_5, t_6]$ and physically evicts $t_1, t_2, t_3$, creating a hard blind spot past distance $W$ inside a single layer. Reaching across $L \cdot W$ tokens requires multi-hop relay across $L$ layers—a "telephone game" that degrades verbatim lookup. Counter-intuitively, production hybrids like MiMo-V2-Flash (5:1 SWA/Full ratio with W = 128) and Qwen3.8-Flash find that shrinking SWA down to 128 tokens can outperform larger windows: narrow windows force SWA layers to specialize strictly on local syntax while routing long-range recall reliably through periodic Full Attention layers.
Original figure (Jiang et al., 2023, Fig. 1): Sliding Window Attention mask matrix vs. Vanilla Attention alongside multi-layer effective context length growth across stacked layers (arXiv:2310.06825).
Figure 1: Sliding Window Attention mask matrix vs. Vanilla Attention alongside multi-layer effective context length growth across stacked layers (arXiv:2310.06825). (Source: Jiang et al., 2023, Fig. 1)

In the middle panel above, $W=3$ restricts attention to a three-token diagonal band and zeros out earlier keys, while the right-hand pyramid illustrates how stacking $L$ layers extends effective receptive field linearly to $L \times W$.

  1. <BOS> sink eviction collapse and two fixes: Because Softmax probabilities sum to $1$, queries with no matching key dump excess mass onto token $0$ (<BOS>), the Attention Sink. Once a sliding ring buffer evicts <BOS>, Softmax loses its normalization anchor and activations/perplexity destabilize. StreamingLLM prevents this by pinning initial sink tokens in cache alongside the sliding window, whereas OpenAI GPT-OSS adds a learnable softmax sink bias in the attention denominator so heads absorb idle probability mass without storing physical <BOS> KV entries.
  2. Dual KV cache pools: Hybrid SWA + Full models force serving engines to manage two heterogeneous allocators—fixed-capacity overwriting ring buffers alongside append-only PagedAttention blocks.
  3. SWA KV must never be shared across layers: Unlike global contextual caches, each SWA layer extracts sharp, depth-specific local positional interactions; sharing SWA KV buffers across layers degrades accuracy sharply.

Checking exact byte counts also clarifies why frontier long-context systems favor mixed linear-full ratios rather than purely linear replacements. With $n_h = 32$ heads and head dimension $d_k = d_v = 128$ in FP32, one linear recurrence layer maintains a constant matrix state of $32 \times 128 \times 128 \times 4\text{ B} = \mathbf{2\text{ MiB/layer}}$. By comparison, one BF16 GQA-8 attention layer ($n_{\text{kv}} = 8, d_{\text{head}} = 128$) consumes $2 \times 8 \times 128 \times 2\text{ B} = \mathbf{4\text{ KiB/token}}$, putting the state breakeven at $2\text{ MiB} / 4\text{ KiB} = \mathbf{512\text{ tokens}}$.

When the baseline instead uses FP8 MLA as sized in Memory Arithmetic for LLM Serving: TP/EP, KV Crossover, and Looped Decode ($d_c + d_R = 576$ dimensions at $1\text{ B/element}$, i.e., 576 B/token), that breakeven shifts roughly $7\times$ higher to $2{,}097{,}152\text{ B} / 576\text{ B} \approx \mathbf{3{,}640\text{ tokens}}$. Linear state only beats full KV memory past those thresholds; pairing three constant-state layers with one full attention layer—such as 3 GDN + 1 Full Attention in Qwen3-Next and 3 KDA + 1 NoPE MLA in Kimi Linear—balances throughput with verbatim recall.


2. YOCO: One Global KV Cache and the Source of Its $30.3\times$ Prefill Speedup#

Rather than changing the internal operator of every layer, YOCO (You Only Cache Once) (Sun et al., 2024) eliminates cross-layer cache replication across depth. An $L$-layer stack splits evenly into two halves: the lower Self-Decoder (layers $1 \dots L/2$) executes an $O(N)$ attention variant (such as RetNet or SWA) and exports a single shared global key-value pair $(K^{(L/2)}, V^{(L/2)})$ at its midpoint; the upper Cross-Decoder (layers $L/2+1 \dots L$) replaces self-attention entirely with cross-attention reading that single shared cache. Total KV memory immediately drops from $L$ full tables to one (plus negligible $O(1)$ sliding-window or linear state in the lower half).

Original figure (Sun et al., 2024, Fig. 2): YOCO Decoder–Decoder architecture where the lower L/2-layer Self-Decoder exports a single global KV cache shared by the upper L/2-layer Cross-Decoder (arXiv:2405.05254).
Figure 2: YOCO Decoder–Decoder architecture where the lower L/2-layer Self-Decoder exports a single global KV cache shared by the upper L/2-layer Cross-Decoder (arXiv:2405.05254). (Source: Sun et al., 2024, Fig. 2)

The headline Prefill metric is TTFT (Time To First Token)—the latency from receiving a prompt to emitting the first output token. Trace a 5-token dependency chain ["Author", "of", "Dream", "of", "Red", "Chamber"] -> "Cao" through a 32-layer model: a standard 32-layer Transformer must propagate all prefix tokens through every upper-half Attention and FFN block solely to populate upper-layer KV caches.

In YOCO's Cross-Decoder, by contrast, a token at position $N$ in layer $\ell > L/2$ depends only on $(K^{(L/2)}, V^{(L/2)})$ and its own upper-layer FFN chain, never on intermediate upper-layer states $h_j^{(\ell')}$ of prior positions $j < N$:

$$\frac{\partial h_N^{(\ell)}}{\partial h_j^{(\ell')}} = 0 \qquad (\forall j < N,\; \ell, \ell' > L/2)$$

During Prefill, once the Self-Decoder completes its $O(N)$ pass over the prefix and materializes $(K^{(L/2)}, V^{(L/2)})$ at layer $L/2$, historical prefix tokens exit early—retiring not only upper-half Cross-Attention, but upper-half FFNs as well. The Cross-Decoder runs solely on the final query token $q_N$ against the single global cache in $O(N)$ time. The H100 3B scaling benchmarks reported in the paper reflect this architectural asymmetry:

Context LengthPrefill Speedup (vs. Transformer)VRAM Reduction & Serving Throughput
Short Prompt$\sim 2\times$Retires upper-half prefix Attention and FFN
32K$\sim 2.9\times$Total VRAM compression up to $6.4\times$
512K$30.3\times$ · 180s → <6sTotal VRAM compression up to $9.4\times$; throughput $\sim 9.6\times$
1MScales without OOMStandard baseline hits HBM ceiling or minute-scale stalls

By splitting Prefill from Generation, YOCO skips all upper-half Cross-Decoder computation across the entire prompt prefix—cutting 512K prefill latency from 180s down to under 6s ($30.3\times$)—before activating Cross-Decoder strictly per generated decode token.

Under Prefill-Decode (PD) Disaggregation, YOCO provides an additional systems advantage: because only a single midpoint cache $(K^{(L/2)}, V^{(L/2)})$ persists globally, cross-node RDMA KV transfer from Prefill workers to Decode workers shrinks proportionally.

At the same time, four sharp limitations explain why YOCO remains rare in frontier open-weights checkpoints:

  1. Prompt depth halved: every prefix token stops mixing context at layer $L/2$ before entering the midpoint bottleneck (with Phi-4-mini-flash as one of the few deployed production examples);
  2. The 50/50 vs. 75/25 dilemma: splitting layers 50/50 sacrifices prompt encoding depth, whereas shifting to 75% Self-Decoder / 25% Cross-Decoder shrinks both KV savings and TTFT speedups;
  3. Decode-heavy CoT mismatch: for reasoning workloads where autoregressive output chains vastly outweigh prompt tokens, every generated token still traverses all $L/2$ upper Cross-Attention and FFN weight matrices;
  4. YOCO + UT loses $25\%\text{–}40\%$ naively: community experiments pairing YOCO naively with a Universal Transformer lose $25\%\text{–}40\%$ of parameter-matched gains. Universal YOCO (YOCO-U) (Sun et al., 2026) resolves this by structurally confining weight-shared looping strictly inside the lower Universal Self-Decoder (e.g., $W=512$ SWA), exporting 1 global KV cache at the midpoint to a non-looped Cross-Decoder—cutting 256K KV memory on a 1.3B model to 542 MB ($18.9\times$ below a standard Transformer's 10,240 MB) and achieving 76.3K tok/s prefill ($20.4\times$ faster than full-loop RINS).
Original figure (Sun et al., 2026, Fig. 1): Universal YOCO (YOCO-U) confining T recurrent iterations strictly to the lower Self-Decoder before exporting a single global KV cache to the non-looped Cross-Decoder (arXiv:2604.01220).
Figure 3: Universal YOCO (YOCO-U) confining T recurrent iterations strictly to the lower Self-Decoder before exporting a single global KV cache to the non-looped Cross-Decoder (arXiv:2604.01220). (Source: Sun et al., 2026, Fig. 1)

Comparing standard YOCO above directly against YOCO-U highlights the single structural addition: the red dashed T Iterations feedback loop on the lower left, wrapping exclusively from the Self-Decoder FFN output back into Self-Attention input before exporting the single global K/V cache to the non-looped Cross-Decoder.


3. Loop-Specific KV and Bandwidth Designs: LSE Merge, G-SWA, PLT, and FlashLoop#

Rewriting a 32-layer Transformer as 8 physical layers × 4 loop passes shrinks weights by $75\%$, yet still generates $8 \times 4 = 32$ full-length KV tables unless loops share or compress cache across passes. Four recent techniques tackle loop cache capacity and weight bandwidth directly, alongside late-2026 production variants.

3.1 Exact Two-Line LSE Merging and Global + SWA Traces#

The cleanest capacity reduction separates global long-range anchoring from local pass refinement. Pass $r = 1$ materializes a normal full-length global cache $K_{\text{global}} \in \mathbb{R}^{N \times d_k}$, whereas subsequent passes $r \ge 2$ write keys and values only into short complementary local sliding windows $K_{\text{local}}^{(r)}$ of width $W$. Tracing token #10,001 under $N = 10{,}001,\; R = 3,\; W = 4$: pass 1 appends row 10,001 and attends over all 10,001 global keys; passes 2 and 3 overwrite only their 4-slot ring buffers [9998, 9999, 10000, 10001] while reading the preceding 9,997 global entries alongside the 4 local slots—shrinking per-layer rows from $30{,}003$ down to $10{,}001 + 2\times 4 = \mathbf{10{,}009}$.

Combining distant global memory with a local window requires careful normalization. Consider a 5-token sequence ["Once", "upon", "a", "high", "peak"] with $W=2$: naively concatenating the full global cache with the overlapping local window (Overlap Double-Count) counts ["high", "peak"] twice inside the Softmax denominator, biasing local scores. Partitioning disjoint indices ["Once", "upon", "a"] vs. ["high", "peak"] (Replace-Concat) or running two separate FlashAttention calls returning $(O_1, m_1 = \mathrm{LSE}_1)$ and $(O_2, m_2 = \mathrm{LSE}_2)$ reproduces exact monolithic Softmax attention with zero HBM concatenation:

$$\begin{aligned} w_1 &= \frac{e^{m_1}}{e^{m_1} + e^{m_2}} = \sigma(m_1 - m_2), \qquad w_2 = 1 - w_1, \\ O_{\text{exact}} &= w_1 O_1 + w_2 O_2 \end{aligned}$$

Calculation

Worked Verification: With global branch $(O_1 = 2.0,\; m_1 = 10.0)$ and local window $(O_2 = 6.0,\; m_2 = 8.0)$, $m_1 - m_2 = 2.0$ gives $w_1 = \sigma(2.0) = \frac{1}{1 + e^{-2}} \approx \mathbf{0.8808}$ and $w_2 \approx \mathbf{0.1192}$. Exact merged output evaluates to $O_{\text{exact}} = 0.8808 \times 2.0 + 0.1192 \times 6.0 = \mathbf{2.4768}$ with zero buffer concatenation.

PYTHON
import math

q = [1.2, -0.4]
kg = [[0.5, 0.2], [0.9, -0.3], [0.1, 0.8]]
vg = [1.0, 2.0, 3.0]
kl = [[1.4, -0.6], [1.1, 0.4]]
vl = [5.0, 7.0]

def attn(ks, vs):
    sc = [sum(a * b for a, b in zip(q, k)) / 2**0.5 for k in ks]
    m = max(sc)
    ex = [math.exp(s - m) for s in sc]
    z = sum(ex)
    return sum(e * v for e, v in zip(ex, vs)) / z, m + math.log(z)

o_cat, _ = attn(kg + kl, vg + vl)
o_dbl, _ = attn(kg + kl + kl, vg + vl + vl)
o1, m1 = attn(kg, vg)
o2, m2 = attn(kl, vl)
w1 = 1.0 / (1.0 + math.exp(m2 - m1))
o_lse = w1 * o1 + (1.0 - w1) * o2
print(f"cat={o_cat:.6f} lse={o_lse:.6f} dbl={o_dbl:.6f}")
Loop (r ≥ 2): Symmetric Dual-Branch Attention & Exact LSE / G-SWA Merge q⁽ʳ⁾ FlashAttn₁(K_global [N]) → (O₁, m₁) FlashAttn₂(K_local⁽ʳ⁾ [W]) → (O₂, m₂) Exact LSE: σ(m₁−m₂)O₁ + σ(m₂−m₁)O₂ (or learned G-SWA gate gₜO₁ + (1−gₜ)O₂)
Figure 4: Symmetric dual-branch global + sliding-window LSE / G-SWA merging inside loops.

3.2 G-SWA and Four Limits of Global + SWA Sharing#

Although exact LSE merging is mathematically lossless, Parallel Loop Transformer (Wu et al., 2025) highlights an asymptotic quirk on ultra-long contexts: as context length $N$ expands, the global denominator $m_1 = \log\sum \exp(q^\top k_j / \sqrt{d})$ drifts upward at roughly $\mathcal{O}(\log N)$, progressively shrinking the local window weight $w_2 = \sigma(m_2 - m_1)$ regardless of local token relevance. G-SWA (Gated Sliding Window Attention) replaces $\sigma(m_1 - m_2)$ with a learned hidden-state gate $g_t = \sigma(w_g^\top h_t)$, emitting $O_{\text{G-SWA}} = g_t O_1 + (1 - g_t) O_2$.

All Global + SWA loop schemes share four structural limits:

  1. Cross-round distant blind spot: passes $r \ge 2$ never write updated distant keys, leaving long-range retrieval locked to pass-1 keys;
  2. Zero savings when $N \le W$: short prompts fit entirely inside the local window;
  3. Pass-1 depth floor: if the physical core is too shallow on pass 1, the sole global KV table cannot capture deep long-range entities;
  4. Train-inference consistency constraint: altering window splits or G-SWA gating post-hoc shifts attention entropy unless matched during training or exact LSE calibration.

3.3 PLT: Cross-Pass Pipelined Batching Against the HBM Bandwidth Wall#

As analyzed in Memory Arithmetic for LLM Serving: TP/EP, KV Crossover, and Looped Decode, looping a multi-gigabyte core $R$ times for $B=1$ Decode misses the $50\text{ MB}$ H100 L2 cache on every pass and still transfers $R \times (M_W/R) = M_W$ weight bytes from HBM. PLT (Parallel Loop Transformer) (Wu et al., 2025) restructures the computation graph across consecutive sequence positions (note that Wu et al. denote the per-block loop count as $L = 3$ in Fig. 2, matching our $R = 3$ notation).

Look at Current Step (predicting $t_5$) on the right side of the figure below: inside a single batched Loop Transformer forward pass of size $R = 3$, all 3 parallel slots inject the current token embedding $t_4$, added to cached hidden states carried over from Previous Step: slot 1 computes $(t_4 + 0) \to h_4^1$ (Loop-1), slot 2 computes $(t_4 + h_3^1) \to h_3^2$ (Loop-2), and slot 3 computes $(t_4 + h_2^2) \to h_2^3$ (Loop-3). Crucially, only the final-loop slot $h_2^3$ projects to predict $t_5$ (while $h_4^1$ and $h_3^2$ route forward along the dashed lines into the next step's Loop-2 and Loop-3 slots—the three streams are not pooled together at readout). Because all $R$ passes sit inside one batched GEMM, the GPU streams the compressed core weights $M_W / R$ from HBM only once per generated token, achieving a true $1/R$ cut in single-request weight I/O.

Original figure (Wu et al., 2025, Fig. 2): Parallel Loop Transformer (PLT) staggered cross-loop pipelining for $L=3$, injecting $t_4$ into all three Loop-1/2/3 slots at Current Step and predicting $t_5$ solely from $h_2^3$ (arXiv:2510.24824).
Figure 5: Parallel Loop Transformer (PLT) staggered cross-loop pipelining for $L=3$, injecting $t_4$ into all three Loop-1/2/3 slots at Current Step and predicting $t_5$ solely from $h_2^3$ (arXiv:2510.24824). (Source: Wu et al., 2025, Fig. 2)

Three critical caveats bound PLT in practice:

3.4 FlashLoop, Recurrent Linear Cores, and Late-2026 Production Schemes#

For already-pretrained looped models where graph modifications are undesirable, FlashLoop (Wanqi Yang, Shiwei Liu, 2026) exploits strong similarity between consecutive loop passes—directly analogous to I-frames vs. P-frames in MP4 video compression. Across transitions 1->2, 2->3, and 3->4, hidden-state deltas grow sharply sparser: in the authors' example, while pass-1 keys $K^{(1)} = [12.43, -8.71, 3.15, 0.42]$ span $21.14$, the inter-loop residual $\Delta K = K^{(2)} - K^{(1)} = [+0.01, 0.00, +0.05, -0.01]$ collapses to $0.06$ (over $350\times$ narrower), cutting low-bit quantization reconstruction error from ~6.8%–7.0% down to ~3.6%, ~2.5%, ~2.0%.

Quantizing full-range $K^{(r)}$ directly down to 2-bit destroys recall, whereas storing pass 1 at full precision and quantizing narrow inter-pass residuals $\Delta K, \Delta V$ per group of $G$ elements (adding one FP16 scale and zero-point per group, $32\text{ bits}/G$ overhead) preserves signal fidelity:

$$\begin{aligned} \hat{q} &= \mathrm{round}\!\left(\frac{\Delta K - z}{s}\right), & z &= \min(\Delta K), \\ s &= \frac{\max(\Delta K) - \min(\Delta K)}{2^b - 1}, & b_{\text{eff}} &= b + \frac{32}{G} \end{aligned}$$

With 2-bit residuals and group size $G = 64$, effective bit-width is $b_{\text{eff}} = 2.5\text{ bits}$, compressing a 4-loop cache from $64\text{ bits}$ down to $16 + 3 \times 2.5 = 23.5\text{ bits}$ ($2.72\times$ compression). Pairing residual quantization with Lazy Updates—skipping KV projections on late passes when $|\Delta|$ falls beneath a tolerance threshold—cuts Ouro-2.6B R4 memory in FlashLoop's original Fig. 1 below by $5.8\times$ in KV Cache (dropping total memory from 16.9 GiB—which initially exceeds Llama3.1-8B's 15.9 GiB due to 4× KV replication—down to 6.9 GiB) and cuts 8K prefill FLOPs by $1.8\times$ (214.4 -> 121.8 TFLOPs), while reaching up to $6\times$ KV reduction and $1.64\times$ inference speedup in peak HBM-bound batch-1 decode benchmarks.

Yet this empirical behavior also prompts a skeptical takeaway in linear-attention circles: if late passes alter keys and values so weakly that skipping them preserves accuracy, current looped checkpoints may be under-trained in deep passes and behave close to identity mappings—and aggressive 2-bit residual compression still degrades multi-key recall such as RULER-16K (making 4-bit residuals the safer baseline).

Original figure (Yang & Liu, 2026, Fig. 1): FlashLoop KV cache memory footprint (5.8× smaller KV cache, 16.9→6.9 GiB total, beating Llama3.1-8B's 15.9 GiB) and 8K prefill FLOPs reduction (1.8× smaller) on Ouro-2.6B R4 (arXiv:2609.29812).
Figure 6: FlashLoop KV cache memory footprint (5.8× smaller KV cache, 16.9→6.9 GiB total, beating Llama3.1-8B's 15.9 GiB) and 8K prefill FLOPs reduction (1.8× smaller) on Ouro-2.6B R4 (arXiv:2609.29812). (Source: Yang & Liu, 2026, Fig. 1)

Three complementary directions round out the 2026 loop-cache landscape:

Comparing four equal-32-layer-equivalent architectures side by side clarifies when each layout wins:

32L-Equivalent SetupPhysical WeightsKV Cache CopiesPrefill CostBatch-1 Decode I/OPrimary Target Workload
Standard 32L$1\times$$32$ full tables$32\text{L}$ quadratic$1\times$ weight streamHigh-concurrency general serving & exact recall
Naive Loop (8L×4)$0.25\times$$32$ full tables$32\text{L}$ quadratic$1\times$ weight stream · 4 passesStorage-bound checkpoints only
YOCO (16L+16L)$1\times$$1$ full (+local)Lower $16\text{L}$ linear$1\times$ weight streamLong-prompt Prefill-heavy (ultra-low TTFT)
Loop Global+SWA (8L×4)$0.25\times$$8$ global + $24$ $W$-SWA$32\text{L}$ hybrid$0.25\times$ with PLTTight VRAM edge / moderate-context deep reasoning

4. Production Takeaways for Untied and 100B+ Serving Stacks#

Outside specialized weight-tied loops, production long-context serving organizes general KV management into three practical tiers:

LayerRepresentative MethodsConcrete Savings & Risk
In-Place QuantizationNative FP8 KV (per-token 32-dim scale) · KIVIClean 2× cut (10 → 5 GiB); 2-bit requires per-channel Key + FP16 tail buffer
Lossy Eviction / MergingStreamingLLM · H₂O · MiniCache · PyramidKVShrinks VRAM on long prompts, yet risks silent misses on code & multi-needle lookup
Lossless Paging & TieringPagedAttention · RadixAttention · Mooncake · LMCache<4% slab waste + zero accuracy loss; cold DDR/NVMe fetch must stay inside ITL/TPOT budget

At 100B+ frontier scale, architectural $\kappa$ reduction (FP8 MLA or 3:1/5:1 GDN/KDA + NoPE MLA) combined with lossless prefix caching wins the latency–recall frontier; meanwhile, loop-specific KV tricks (FlashLoop, PLT, BeNice!) earn their keep primarily on tight-VRAM edge and workstation loops until larger-scale checkpoints prove full multi-needle fidelity.


References#

  1. Albert Q. Jiang et al. (2023). Mistral 7B (Sliding Window Attention). arXiv:2310.06825
  2. Yutao Sun et al. (2024). You Only Cache Once: Decoder-Decoder Architectures for Language Models (YOCO). arXiv:2405.05254
  3. Songlin Yang et al. (2024). Gated Delta Networks: Improving Mamba2 with Delta Rule. arXiv:2412.06464
  4. Kimi Team, Yu Zhang, Zongyu Lin et al. (2025). Kimi Linear: An Expressive, Efficient Attention Architecture. arXiv:2510.26692
  5. Bohong Wu et al. (2025). Parallel Loop Transformer for Efficient Test-Time Computation Scaling (PLT & G-SWA). arXiv:2510.24824
  6. Yutao Sun et al. (2026). Universal YOCO for Efficient Depth Scaling. arXiv:2604.01220
  7. Wanqi Yang, Shiwei Liu (2026). FlashLoop: Fast and Memory-Efficient Looped Transformers via Lazy Updates. arXiv:2609.29812
  8. BeNice! Authors (2026). BeNice!: Closing Looping's Inference-Memory Gap via KV-Sharing. arXiv:2610.31633
  9. Zirui Liu et al. (2024). KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cache. arXiv:2402.02750
  10. Woosuk Kwon et al. (2023). Efficient Memory Management for Large Language Model Serving with PagedAttention (vLLM). arXiv:2309.06180
Cite this note
@misc{liu2026kvefficientarchite,
  title  = {{Sharing KV Cache Across Depth and Loops: SWA, YOCO, PLT, and FlashLoop}},
  author = {Feiyang Liu},
  year   = {2026},
  month  = {nov},
  url    = {https://zaychikliu.github.io/blog/2026/kv-efficient-architectures-and-loop-cache/}
}