LoopKV: Loop-Aware KV Cache Compression for Serving Looped Transformers

Tianle Zhou, Yang Zhang, Tianyu Wu, Zhuohan Wang, William Nixon, Juncheng YangarXiv 2026

TL;DR

LoopKV is a specialized compression framework for "looped transformers" that reduces KV cache storage by 35% and doubles serving throughput compared to state-of-the-art quantization methods. It achieves this by combining offline sensitivity profiling with a novel online mechanism that dynamically adjusts precision based on real-time attention scores, all while maintaining near-lossless accuracy.

What Problem Does This Paper Address?

Looped transformers (like the Ouro or Huginn models) are a rising architectural trend where a single block of layers is reused multiple times per token. While this makes models parameter-efficient, it creates a massive bottleneck during serving: the Key-Value (KV) cache.

Because these models often maintain a separate KV cache for every loop iteration, the memory footprint explodes—a model like Ouro-1.4B requires four times the KV storage of a standard transformer. This memory bloat limits the batch size, which in turn kills the throughput needed to amortize the cost of reading model weights. Existing quantization methods treat every loop the same, failing to exploit the unique structural redundancies and varying sensitivities inherent in looped architectures.

Methods

LoopKV introduces a two-phase system to optimize these caches at the granularity of a "cell" (a specific layer within a specific loop).

1. Offline Phase: The Planner

The system first performs a one-time profile of the model to measure the "damage" (KL divergence) caused by quantizing each cell.

  • Mixed-Precision Allocation (C1): It identifies which cells are sensitive and need 4-bit precision versus those that can tolerate 2-bit storage.
  • Cross-Loop Sharing (C2): It discovers cells in earlier loops that can simply point to the final loop's KV data instead of storing their own, effectively "freeing" that memory. A knapsack solver then generates an optimal plan that minimizes data reads under specific storage and accuracy budgets.

2. Online Phase: Dynamic Execution

  • Attention-Aware V Precision (C3): Values (V) are stored in two 2-bit planes. During decoding, the kernel reads the first plane (high bits) for everyone, but only fetches the second plane (low bits) for tokens that receive high attention scores in that specific loop.
  • Fused Kernel: To eliminate the massive host overhead of managing hundreds of individual cell types, LoopKV uses a single fused CUDA kernel integrated into vLLM. This reduces host launches per decode step from over 500 down to just 17.
Figure 1. Overview of LoopKV. The offline phase of LoopKV, run once per model, chooses a storage option for every (loop, layer) pair, which we call a cell, from the KL damage measured by profiling each cell independently (C1). A cell may reuse the final loop’s KV through a pointer when its KL damage is low, which we show costs little accuracy (C2). In the online phase, V is stored as a high and a low 2-bit plane, so that the attention scores decide at decode time which tokens also read the low plane (C3). We then combine all three into one fused kernel that runs every cell type in a single launch. With vLLM’s whole-step CUDA graph, this cuts LoopKV-M’s host launches per decode step from 504 to 17.

Datasets

The authors evaluated LoopKV across several looped transformer models:

  • Ouro-1.4B & Ouro-2.6B: The primary testbeds for serving performance.
  • Dory-4B & Huginn-3.5B: Used to demonstrate the generality of the profiling insights.

Evaluation benchmarks included:

  • RULER (16K/32K): For long-context retrieval and variable tracking.
  • LongBench: For comprehensive long-document understanding.
  • MATH500, GSM8K, & AIME: To ensure reasoning capabilities remain intact.

Key Insights and Ideas

  • Sensitivity is Cell-Specific (P1): Quantization damage isn't uniform across layers or loops. A few middle layers in early loops often cause the most damage, while later layers are remarkably robust. Quantization damage varies significantly across different layers and loops.

  • Convergence Enables Sharing (P2): As the model iterates through loops, the KV states often converge. LoopKV exploits this by letting earlier loops "borrow" the KV cache of the final loop, which is often more accurate than a low-bit local copy. Some cells can share the final loop's KV with less damage than storing their own INT2 copy.

  • Errors Compound Across Loops (P3): Unlike standard transformers, looped models are highly sensitive to "skipping" tokens (a common optimization). LoopKV finds that reading a token at very low precision is significantly better for accuracy than dropping it entirely, as errors compound with every loop iteration.

Figure 2. P1: damage depends on the cell. Each point shows the damage when one cell (one layer in one loop) is stored at INT2 while every other cell stays exact. The damage on the y-axis is the share of next-token predictions that change (fp32, 16 documents). The top 19 of the 72 cells hold half of the total difference, and KL ranks the cells alike (Spearman 0.95).
Figure 3. P2: some cells can share with little loss. Each point shows the damage (the y-axis, as in Figure 2) when one cell reads the final loop’s KV instead of storing its own, while every other cell stays exact. Some cells (green) do less damage when sharing than when stored at INT2

Key Results

  • Throughput Boost: LoopKV-M (the memory-optimized plan) achieves 1.7–2.2× the goodput of KIVI-4 (a popular 4-bit quantization baseline) on an NVIDIA RTX PRO 6000.
  • Memory Efficiency: It stores 35% less KV data than uniform 4-bit quantization while maintaining higher accuracy.
  • Near-Lossless Quality: Across six public benchmark suites, LoopKV's average scores did not fall significantly below the original BF16 (16-bit) model performance.
  • Serving Scalability: On Ouro-2.6B, LoopKV-M decoded up to 11× faster than the uncompressed BF16 baseline at 32K context lengths because it could fit significantly more requests in memory.

Limitations and Future Work

  • Model Specificity: LoopKV is specifically designed for looped transformers that maintain per-loop KV caches. Its benefits for standard, non-looped transformers would be limited to the dynamic V-precision component.
  • Hardware Scope: While tested on high-end GPUs (RTX PRO 6000, A100, H100), the authors note that on the H100, the bottleneck shifts from memory bandwidth to instruction latency, meaning the dynamic reading (C3) provides less of a speedup there.
  • Future Directions: The authors suggest that the "loop axis" in the KV grid is a rich area for further optimization, potentially combining these post-hoc techniques with loop-aware training.

Summary updated

BibTeX
@misc{zhou2026loopkv,
  author = {Tianle Zhou and Yang Zhang and Tianyu Wu and Zhuohan Wang and William Nixon and Juncheng Yang},
  title = {{LoopKV: Loop-Aware KV Cache Compression for Serving Looped Transformers}},
  year = {2026},
  eprint = {2611.04137},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.04137},
}
Figure