Manuscript Offprint

arXiv:2608.23843

PuzzleKV: Page-Wise Low-Rank Decomposition for KV Cache Compression

Zizhong Wang, Jieying Wang, Zhao Zhang, Jiajia Li

Abstract

Long-context inference in large language models (LLMs) is increasingly limited by the memory required for the key-value (KV) cache. KV cache compression addresses this problem by reducing the storage cost of previous tokens. Among existing approaches, low-rank compression is particularly attractive because it represents every token in reduced dimensions. Previous low-rank methods typically derive fixed projection spaces from model weights, construct fixed spaces from calibration activations, or construct a shared basis over a broad cache region. Such representations may not capture detailed but important information. We partition each per-head KV cache into fixed-length logical pages and observe substantial low-rank structure within individual pages. Based on this observation, we propose PuzzleKV, a training- and calibration-free method that treats each completed page as an independent compression unit. PuzzleKV decomposes pages within each layer and KV head, computes attention directly over dense and factorized pages, and incrementally compresses newly eligible pages during autoregressive decoding. Experiments across models, context lengths, and benchmarks demonstrate the effectiveness of PuzzleKV under matched storage budgets. At approximately 60% of the original KV cache storage, PuzzleKV achieves more than 96% of Full KV performance across both evaluated models and all benchmark settings, with substantial gains over Global SVD on RULER and competitive performance on LongBench. To achieve a more aggressive compression ratio, PuzzleKV can be further combined with quantization while retaining more than 93% of Full KV performance using only 18.7% of the original storage.

1 Introduction

Large language models increasingly rely on few-shot demonstrations, chains of thought, and interleaved reasoning and action to solve complex tasks [16, 18, 23]. As these inputs grow, longer context windows allow LLMs to access more task-relevant information, but they also place substantial memory pressure on inference.

Autoregressive decoders store the attention keys and values of previous tokens in a key-value (KV) cache to avoid recomputing them at every generation step [9, 17]. For a model with L layers, HkvH_{kv} KV heads, head dimension d, and context length T, a single request holds 2LHkvTd2LH_{kv}Td KV elements before batching. Qwen3-32B [22], for example, has 64 layers, 8 KV heads, and head dimension 128, so under BF16 a single 128K-token sequence requires about 32 GiB of KV cache. Because this footprint grows linearly with both context length and serving batch size, KV cache compression is essential for efficient long-context inference.

Existing methods reduce KV cache storage through token eviction, quantization, or low-rank decomposition. Eviction discards selected tokens [27] and quantization stores keys and values at lower precision [12], whereas low-rank methods represent keys and values in lower-dimensional spaces. The latter differ mainly in the source of the compression space: some factorize model projection weights [2, 26], often requiring calibration or per-model offline processing, while others build or update a basis from the KV cache produced at inference [3, 28]. In either case, a single basis is shared across a broad cache region, favoring directions that dominate overall reconstruction and potentially missing sparse but task-critical information.

To capture this local structure at a finer granularity, we take inspiration from the fixed-size blocks used by PagedAttention to manage KV cache memory [9] and reinterpret the logical page as a unit of compression. This choice is well founded: our analysis shows substantial low-rank redundancy within individual key and value pages across models, layers, and KV heads (Figure 2). Using the page as the compression unit lets a single abstraction govern both low-rank representation and incremental cache updates, while the uniform shape and independence of pages allow their decompositions to be processed in batches on GPUs.

Based on this design, we propose PuzzleKV, a training- and calibration-free page-wise low-rank KV cache compression method. PuzzleKV independently decomposes completed pages within each layer and KV head, while keeping a small sink region and recent window in dense form. Its mixed attention kernel directly processes dense and factorized pages without reconstructing the historical KV cache. During autoregressive decoding, newly eligible pages are incrementally converted into factor storage.

Our main contributions are as follows:

• We introduce PuzzleKV, a training- and calibration-free method that independently factorizes completed KV pages within each layer and KV head, preserving every token through page-local low-rank representations.

• We implement PuzzleKV with batched page decomposition, direct attention over dense and factorized pages without reconstruction, and incremental page conversion during decoding.

• We evaluate PuzzleKV on Qwen3-8B and Llama-3.1-8B-Instruct across RULER and LongBench. At approximately 60% of Full KV storage, PuzzleKV achieves more than 96% of Full KV performance across all evaluated settings, establishes substantial gains over Global SVD on RULER, and achieves competitive performance on LongBench. Combined with per-factor INT4 quantization, it uses only 18.7% of the original storage while achieving more than 93% of Full KV performance.

References (28)