Harness Hub
All papers

LoomKV: Lossless KV Cache Compression from GPU Memory to SSD for LLM Serving

Wentao Zhu, Ziao Sheng, Peng Deng, Huiqi Hu, Xuan Zhou, Xing Wei, Zhuang Wang

Verdict: Useful

The systems engineering is careful. The kernels are verified byte for byte, the code comes within about 0.03-0.04 of the order-0 bound, and capacity equivalence is checked with enlarged raw controls. However, the abstract's multipliers come from cliff windows, the FP8 baseline beats BF16 tier mode on goodput, the admission proxy hides queueing, and the repeat count is thin. Relevance to harness builders is limited to teams self-hosting serving stacks.

  • Novelty

    3 out of 5
  • Rigor

    3 out of 5
  • Reproducibility

    2 out of 5
  • Relevance to harnesses

    2 out of 5

TL;DR

LoomKV is a lossless fixed-width code for the BF16 high byte. It stores KV at about 0.71 of raw size in LMCache's DRAM/SSD tiers (tier mode) and in vLLM's GPU pool (pool mode). The large goodput multipliers come from SSD sizes inside the LRU capacity cliff, measured on replayed Claude Code traces. Outside that window the gains fall to 1.2-1.4x or to parity. A lossy FP8-KV baseline posts higher goodput than BF16 tier mode.

Adversarial review by Harness Hub · Nov 27, 2026 · read full text (truncated) · Suggest a correction

Original abstract (authors’ text, select to expand)

Large language model (LLM) serving engines offload the key/value (KV) cache from GPU memory to host DRAM and SSD so multi-turn and agent requests can reuse prompt prefixes. Capacity then limits service at two levels: external tiers govern prefix reuse before eviction, while the GPU KV pool bounds concurrent long requests, and lossy compression alters KV values and outputs. LoomKV brings lossless KV compression to both external tiers (tier mode) and the GPU pool (pool mode) on an unmodified engine. Using a calibrated per-head two-level 3-bit code over BF16 high bytes (sign and upper seven exponent bits), LoomKV stores BF16 KV at 0.71 of its raw size across nine models and FP8 KV at 0.85-0.87. In tier mode, TileStream writes exact-length records with length readback off the load path, leaving tier storage, eviction, and prefetch unchanged, and decompresses fetched records straight into scattered GPU pages. In pool mode, FragPack packs variable-length records into smaller shared-budget GPU pages read in place by a fused decode-attention kernel faster than FlashAttention-3 on BF16. Built with LMCache and vLLM, LoomKV makes compressed tiers act as 1.4x larger raw tiers on AgentX: across LMCache's LRU cliff, tier mode delivers 2.7-3.6x raw's goodput and 1.9-3.1x lower mean time-to-first-token (TTFT), shifts the cliff identically under other simulated replacement policies, and cuts repeated-prompt TTFT up to 1.7x via SSD-to-DRAM promotion. When tiers hold the working set, pool mode fits 1.31-1.34x as many GPU tokens, admitting 12 long requests with roughly raw's queue and goodput at 8. On an AI IDE trace where both tiers and the GPU pool are constrained, tier and pool modes raise goodput by 1.24x and 1.59x. Where raw capacity suffices, compression costs at most 2.2% throughput; tier mode is bit-exact with raw tiers, and pool mode matches FlashAttention-3's numerical accuracy.

Authors’ note

16 pages, 12 figures, 5 tables

Filed undermemoryagentsllm

Summary

The paper targets self-hosted LLM serving. Agent requests re-send long transcripts, so engines spill KV cache to host DRAM and SSD for prefix reuse. **The code.** A per-head, calibrated, two-level 3-bit code replaces the BF16 high byte (sign plus upper seven exponent bits). The low byte is stored verbatim. **Tier mode.** Compressed records become exact-length LMCache objects. A warp-per-tile GPU kernel (TileStream) decompresses them straight into vLLM's scattered pages. Length readback is moved to a background store worker. **Pool mode.** The GPU pool holds compressed records (FragPack) packed into smaller shared-budget pages. A fused decompress-plus-decode-attention kernel reads them in place. **Evaluation setup.** - One server: 2x H800, 1 TB DRAM, 15 TB SSD. - Software: vLLM with FA3 as the stock backend, and LMCache 0.5.6 with write-through LRU. - Models: Qwen3-30B-A3B and GLM-4-9B end to end. - Workload: AgentX replaying 393 Claude Code sessions. - Admission: capped at S=8 by a FIFO proxy. - Baselines: unmodified raw BF16 and FP8 KV. - Kernel microbenchmarks: SplitZip, ExANS, nvCOMP, FlashInfer and FA3. - Each experiment is run three times and the median is reported.

Key findings

  • Calibrated TileStream stores BF16 KV at 0.705-0.709 of raw across nine models, within 0.033-0.036 of the order-0 bound; FP8 KV at 0.853-0.873 (Table I). These figures come from 4096 tokens per model, with codebooks calibrated on the first 1024.
  • Tier-mode decompression into paged blocks runs at 1182 GB/s, against 1452 GB/s for a raw paged copy, 671 GB/s for SplitZip and 182 GB/s for nvCOMP ANS (Table II).
  • At 640 GB SSD on Qwen3-30B-A3B, tier mode reaches 13.5 req/min goodput and 0.91 hit rate, against 4.6 req/min and 0.55 for raw (Table III).
  • At 2 TB SSD, where raw fits the working set, both reach 15.1 req/min (Table III). Gains are 1.2-1.4x at 800 GB and 1.3x at 400 GB (Section VIII-D).
  • Lossy FP8 KV without LoomKV reaches 20.6 req/min at 640 GB, above BF16 tier mode's 13.5. FP8 plus tier mode is also 20.6 (Table III).
  • The 'fixed slots' ablation, without exact-length objects, reaches 8.4 req/min at 640 GB, against 13.5 with exact-length objects (Table III).
  • Tier mode at 880 GB physical served 9.3-12.5 req/min across repeats. A 1231 GB raw control served 10.7 (Section VIII-D).
  • The fused BF16 decode kernel takes 0.80-0.92x FlashInfer's time at TP 1 at full clock (Section VIII-C).
  • On FP8 at the 700 W power cap the fused kernel is slower: 0.98-1.15x FlashInfer and 1.21-1.30x FA3 above 32K tokens (Section VIII-C).

The paper at a glance

01Calibrate per-headcodebooks offline(1024-token forwardpass)02Encode BF16 highbyte with two-level3-bit code, lowbyte verbatim03Tier mode:TileStream recordsstored asexact-lengthLMCache DRAM/SSD…04Load: ring of 4 GPUbuffers overlapsPCIe copy withwarp-per-tiledecompression into…05Pool mode: FragPackrecords packed intosmallershared-budget GPUpages06Fused kerneldecompresses intoregisters and runsdecode attentionvia tensor-core…
  1. Calibrate per-head codebooks offline (1024-token forward pass)
  2. Encode BF16 high byte with two-level 3-bit code, low byte verbatim
  3. Tier mode: TileStream records stored as exact-length LMCache DRAM/SSD objects; length readback deferred to a store worker
  4. Load: ring of 4 GPU buffers overlaps PCIe copy with warp-per-tile decompression into scattered vLLM pages
  5. Pool mode: FragPack records packed into smaller shared-budget GPU pages
  6. Fused kernel decompresses into registers and runs decode attention via tensor-core MMAs
Fig. 1 — How the paper works, step by step (arXiv:2611.32954).
Raw BF164.6 requests/minTier mode BF16 (this paper)13.5 requests/minTier mode, fixed slots8.4 requests/minFP8 KV, raw20.6 requests/minFP8 KV, tier mode (this paper)20.6 requests/min
Fig. 2 — Goodput at 640 GB SSD, 400 GB DRAM, 64 sessions, Qwen3-30B-A3B, higher is better. Source: Table III, arXiv:2611.32954.
Data table
Goodput at 640 GB SSD, 400 GB DRAM, 64 sessions, Qwen3-30B-A3B
Methodrequests/min
Raw BF164.6 requests/min
Tier mode BF16 (this paper)13.5 requests/min
Tier mode, fixed slots8.4 requests/min
FP8 KV, raw20.6 requests/min
FP8 KV, tier mode (this paper)20.6 requests/min

Why it matters

This is a serving-infrastructure paper, not a harness paper. It matters only to teams that self-host open-weight models behind their agents and run vLLM with an LMCache-style DRAM/SSD prefix cache. For those teams the takeaway is narrow but concrete. If long agent transcripts are evicted just before reuse, a lossless capacity gain of about 1.4x can recover prefix hits without changing tier-mode outputs, which the paper reports as bit-exact. Teams that call hosted APIs, or whose cache already holds the working set, get nothing from it. Table III also shows FP8 KV delivering more goodput than BF16 tier mode. The accuracy cost of FP8 is not quantified in the visible text, so the lossless-versus-lossy tradeoff remains the reader's call. The most harness-relevant content is the characterization of real Claude Code traces: 393 sessions, prompts up to 254K tokens, median 89K. It shows how large and how reuse-heavy agent prefixes are.

Issues (8)

  • High severity

    The headline multipliers are cliff-selected. - The abstract reports '2.7-3.6x raw's goodput' and '1.9-3.1x lower mean TTFT'. Both hold only in the SSD-size window between raw's LRU cliff and the compressed cliff. - Outside that window the paper reports 1.2-1.4x at 800 GB, 1.3x at 400 GB, and parity at 2 TB (15.1 vs 15.1). - The 'up to 7.6x' on GLM-4-9B DRAM-only (1.9 vs 14.4 req/min) is also a cliff point. - The abstract does not say how narrow this operating window is.

  • High severity

    The lossy baseline beats the proposed method, and its accuracy cost is not shown in the visible text. - At 640 GB, FP8 KV raw reaches 20.6 req/min and 1.06 s mean TTFT. BF16 tier mode reaches 13.5 req/min and 2.31 s. - The paper's case for lossless compression rests on lossy methods 'changing outputs'. Yet no accuracy numbers for FP8 KV on these models or traces appear in the visible text. - FP8 plus tier mode equals FP8 raw at this size (20.6 vs 20.6). This is likely because FP8 already holds the working set, so the stacking claim is untested in the cliff regime here.

  • Medium severity

    The metric and admission setup favor the cache comparison over end-to-end experience. - A FIFO proxy caps admission at S=8, chosen so that the raw GPU pool has no internal queueing. - Goodput's TTFT target uses engine TTFT, defined as harness TTFT minus proxy wait. Queueing delay outside the engine is therefore excluded from the SLO. - The pool-mode claim of admitting 12 requests 'with roughly raw's queue and goodput at 8' depends on this artificial admission control. - Real deployments using vLLM's native scheduling are not evaluated in the visible text.

  • Medium severity

    Run-to-run variance near the cliff is large relative to the claimed equivalence. - Tier mode at 880 GB physical served '9.3-12.5 req/min across repeats'. That range is used to claim a match with a 1231 GB raw control at 10.7 req/min. - Each table row is the median-goodput run of only three repeats, in a regime the authors themselves describe as a cliff.

  • Medium severity

    Generality is narrow. - Only one cache server is used: LMCache 0.5.6 with write-through LRU. Other replacement policies are only simulated ('shifts the cliff identically under other simulated replacement policies'). - Only one hardware configuration is tested (2x H800). - End-to-end runs use two models. - AgentX sessions share no prefix, so cross-session reuse is not exercised.

  • Medium severity

    The fused-kernel speed claim covers BF16 only and weakens under the power limits the paper itself observes. - The abstract says the kernel is 'faster than FlashAttention-3 on BF16'. - The GPUs sit at the 700 W cap in over 99% of busy serving samples. - At the cap, FP8 decode takes 0.98-1.15x FlashInfer's time and 1.21-1.30x FA3's above 32K tokens. - The TP 2 1x32K shape takes 1.23x FlashInfer's time at full clock and 1.35x at the cap.

  • Low severity

    Several abstract claims rest on sections not in the visible text, so they cannot be checked. - The 'production-derived AI IDE trace' with 1.24x and 1.59x goodput (Q5). - The pool-mode admission results (Q4). - 'Pool mode matches FlashAttention-3's numerical accuracy' (VIII-G). Pool mode is not bit-exact: it uses a different summation order. - The 'up to 1.7x' repeated-prompt TTFT gain comes from a controlled 48-prompt trace at a selected 220 GB DRAM size, not from AgentX.

  • Low severity

    No code or artifact URL is printed, and the system involves custom CUDA kernels, LMCache server changes and an out-of-tree vLLM attention backend. Independent reproduction would require substantial reimplementation. Tier mode also costs about 2.5 GB of GPU memory per GPU, which the paper mentions only in passing.

Questions for the authors

  • What is the measured task-accuracy change from FP8 KV on these models and agent traces, given that FP8 raw delivers 20.6 req/min against 13.5 for BF16 tier mode at 640 GB?
  • Does FP8 plus tier mode give gains at tier sizes where FP8 raw is itself inside its cliff?
  • How often does a real deployment operate inside the cliff window where the 2.7-3.6x gain applies, rather than at sizes where gains are 1.2-1.4x or nil?
  • How do goodput and TTFT change without the S=8 FIFO proxy, and with proxy wait counted against the TTFT target?
  • Do the cliff shifts hold under a real, not simulated, non-LRU policy implemented in LMCache?
  • Will the kernels and LMCache changes be released, and under what license?
  • How do the gains change on workloads where sessions share prefixes?

Related in the directory

Open-source projects

The main AgentX workload replays 393 Claude Code sessions (cc-traces) to model agent prefix reuse.

LLM agents alternate between inference and tool execution, repeatedly reusing their growing context across calls. Under high concurrency, their combined key-value (KV) cache working set can reach hundreds of GiB, far exceeding GPU memory capacity. As idle KV cache blocks are evicted to slower storage tiers, returning agents incur expensive retrievals that stall inference. To address this problem, we present \emph{TripleKV}, a three-tier KV cache management system that hides the delays of these retrievals. %exploits tool execution to hide these delays. In agentic workloads, the KV blocks needed by the next inference request are known in advance; only the time of their reuse is uncertain. TripleKV uses a tool-aware latency predictor to estimate when each tool call will complete and prefetches the required KV blocks from SSD into host DRAM ahead of time. Unlike GPU prefetching, this avoids reserving scarce GPU memory and interfering with concurrent inference requests. To further improve DRAM utilization, TripleKV eliminates duplication of GPU-resident blocks in DRAM, and introduces a victim-cache mechanism that refills blocks from SSD upon their eviction from GPU memory. Across data, web, and coding agents, TripleKV reduces the fraction of requests requiring critical-path SSD reads from 45--76\% to under 10\%. It also reduces P95 time to first token (TTFT) by up to 49\% compared with vLLM extended with DRAM and SSD KV-cache tiers, and achieves 1.5-7$\times$ lower P95 TTFT than recent agent-aware systems.

Shashwat Jaiswal, Chloe Alverti +6

GPU developers use profiling to understand computation and data movement, but access to target hardware can delay optimization. We investigate whether off-the-shelf large language models (LLMs) can estimate Roofline arithmetic intensity (the ratio of floating-point operations (FLOPs) to device-memory bytes) without executing the target GPU workload. We evaluate three models (deepseek-v4-flash, gemini-3.7-flash, and gpt-5.6-sol) across 179 combinations of five kernel families, four NVIDIA and AMD GPUs, four parallel runtimes (CUDA, HIP, OpenMP, and OpenCL), and modified code variants, comparing source-only queries, queries with compiler artifacts, and sandboxed agentic analysis. Compiler artifacts raise the share of arithmetic-intensity estimates within a factor of 1.20 of profiled values from 8-14% to 26-32%, while the resulting bandwidth-bound or compute-bound classifications are correct in 78-92% of runs. With compiler artifacts, FLOP estimates meet the 1.20x tolerance in 59-88% of runs, compared with 36-40% for device-memory traffic. Agentic analysis increases the share of arithmetic-intensity estimates within the 1.20x tolerance by 6.5 percentage points for gpt-5.6-sol, at 3.6x the median cost and 2.5x the median latency of compiler-assisted queries; the other models incur higher costs without a statistically clear improvement. These findings suggest LLM estimates could help prioritize optimization when GPU access is constrained, while identifying cache-dependent device-memory traffic as the main obstacle to precise arithmetic-intensity prediction.

Gregory Bolet, Giorgis Georgakoudis +5

Updating an LLM adapter should not require replaying the full interaction history of every active session. Yet reusing key-value (KV) cache entries computed under an earlier version mixes model versions, while full-history re-prefill becomes increasingly costly as histories and session fleets grow. We introduce LiveLora, a model-runtime co-design for exact final-block KV cache migration. Frozen lower decoder blocks and fixed K/V adapter down-projections preserve each token's base projections and low-rank coordinates across adapter versions. The runtime reconstructs candidate K/V, reevaluates the latest token through the final block, and commits the adapter, cache, and next-token logits together. We prove continuation equivalence to full-history re-prefill in exact arithmetic under the stated model assumptions. On Qwen2.5-3B-Instruct, median paired publication speedups over full-history re-prefill average $68.98\times$ across five runs for 32 active sessions with 8K tokens each. Serving benchmarks show approximately 4.8% decoding overhead relative to native cached decoding. Compared with retained-boundary replay, compact retention gives a $3.42\times$ reduction in additional session storage at 8K, with similar measured publication-plus-decoding cost. LiveLora allows persistent LLM agents to adopt new adapter versions without replaying their full interaction histories.

Tianyi Huang, Samuel Xu +3

Memory demands from data analytics and LLM workloads grow rapidly, driving up memory costs in cloud and data centers. Multi-tier memory has emerged as a promising solution to balance performance and cost. However, effectively leveraging it requires a deep understanding of workload memory behaviors. This work introduces a high-resolution memory characterization methodology for analyzing workload-specific opportunities for multi-tier memory usage. In response to the increasing deployment of ARM-based processors in data centers, we implement our methodology using the recent Statistical Profiling Extension (SPE) for ARM. By characterizing eight memory-intensive workloads from CloudSuite and LLM applications, we identify region-specific access patterns, evaluate the effectiveness of cloud-oriented cache hierarchies, and propose new metrics based on memory idle periods and latency profiles to determine suitable data placement for tiered memory.

Jie Ren, Ivy Peng

A language-model decoder carries state between decoding steps, and in hardware a wrong state update can leave the current token correct and corrupt the output several tokens later, so a design can pass output tests and still be wrong. AIChipBench asks what LLM coding agents need to build such hardware correctly. Agents implement quantized Qwen3.5, Gemma 3, Gemma 4, and Llama 3.2 decoders in synthesizable register-transfer-level (RTL) code against an executable integer reference that specifies the outputs and the stored state at every decoding step. They debug against public tests under fixed budgets; their frozen designs are graded on held-out token sequences, resets, memory stalls, and synthesis, and a second track asks them to speed up a correct design at nearly fixed area. Across 9,136 attempts by four coding agents, the difficulty lies in stored state. Feedback that points to the first state mismatch raises acceptance over output-only feedback in all 12 agent--task cells of a matched study, by 25.0 to 46.9 percentage points, and halves the agent-hours per accepted design. Regraded on new sequences and conditions, 45 of 69 accepted designs fail within the 32 steps their tests required. More than a third of attempts to speed up a correct design end without one. An overall score ranks Sol 5.6 and Fable 5.1 above Astra 6 and Opus 5.5, and both halves of the instances give this order in all 200 random splits. Hardware agents therefore need debugging feedback that exposes stored state, and their benchmarks need final tests well beyond the development cases.

Guangyuan Wang, Chengran Li +4

LLM agents run long, multi-turn programs whose contexts grow at every step, and serving them is limited by KV cache capacity. To alleviate this limitation, systems use context compression techniques, which typically wait until the KV cache crosses a large threshold and then summarize large spans of history at once, either in the background while the agent progresses or on the critical path. These summarizations can be done using the same model running on the same engine, or using the same or a different model running on extra hardware. When running on the same engine, summarization competes with the requests being served for both compute and memory capacity. To maximize the cost-effectiveness of summarization, this paper presents a new serving system called {\em Aggron}. Aggron summarizes agentic requests at every turn and selectively summarizes only certain parts of the KV cache. As a result, Aggron retains accuracy and keeps summarization requests lightweight. Moreover, Aggron launches summarization requests from a separate {\em Summarization Queue} while the corresponding agentic request whose KV cache we want to compress is stalled in the main request queue due to head-of-line stalls. The Summarization queue utilizes compute and memory capacity left over by the head-of-line stalls in the main queue. Further, to maximize efficiency, the server issues summarizations only when it predicts that they can complete before the corresponding agentic request will finally execute. In our evaluation, we compare Aggron to state-of-the-art asynchronous summarization. At high load, Aggron reduces P99 program latency by $27$--$31\%$, and raises throughput by $1.34$--$1.40\times$.

Rishabh Ravi, Tony Hong +6

The Harness Hub newsletter

New harness companies, projects, releases and the monthly State of Harness report, in your inbox.