Manuscript Offprint

arXiv:2609.04263

Quality Recovery for Quantized KV Caches via Low-Rank Attention Adaptation

Seifeldin Abdellatif

Abstract

Low-bit key-value (KV) caches reduce the memory required for autoregressive decoding, but the resulting quality loss depends on the model and quantizer. We keep the quantizer fixed and distill the floating-cache model's behavior into low-rank Q/K/V projection updates while the student executes a physically packed incremental cache. Across three seeds, 4-bit affine-cache adapters recover 54.24%±2.47% of the held-out perplexity gap on TinyLlama-1.1B and 75.96%±4.04% on Gemma-4-12B. On the same frozen NF4 Llama-3.1-8B base, one validation-selected run per quantizer recovers 60.42% under KIVI K2V2 and 37.61% under KVarN K4V2, while preserving 180-case associative retrieval. Gemma's score on an official 4K/8K RULER subset rises from 42.80 with the unadapted 4-bit cache to 48.33 after adaptation (46.15 floating), with substantial task heterogeneity. Finally, a 2-bit rank-token sweep reduces TinyLlama's 2-bit PPL from 576.10 to 11.4000 ± 0.0059 across three seeds, versus 10.3988 floating, but restores only 11–12 of 180 retrieval cases. These results show that low-rank projection adaptation can recover held-out quality across fixed cache formats, while perplexity recovery need not restore long-context retrieval.

1 Introduction

Autoregressive inference stores keys and values for later attention, so its KV cache grows with sequence length and batch size. Low-bit representations reduce this memory and bandwidth cost, but axes, outliers, residual precision, and kernels all affect the remaining quality gap (Liu et al., 2024; Hooper et al., 2024). We ask whether a small post-training update can recover loss after engineering constraints fix the format. Low-rank updates alter the queries reading the cache and keys and values written to it. We distill the floating-cache model into a student executing the deployed packing and reconstruction path.

The base weights and quantizer remain fixed, calibration uses unlabeled text, and only attention adapters are optimized. Dense-base updates use the standard LoRA merge; the reported NF4 runs retain explicit adapters, while quantization-aware LoRA provides a route to a single merged low-bit model (Hu et al., 2022; Xu et al., 2024). We separate cache storage from adapter quality: the cache representation determines storage, whereas held-out evaluation measures adapter recovery. We therefore report absolute perplexity, normalized gap recovery, and long-context behavior.

We evaluate three model scales, 2/4-bit affine and symmetric caches, and two established quantizers: KIVI and KVarN. Primary affine comparisons use three training seeds; placement and established-quantizer studies use one. A 2-bit rank-token grid probes capacity, while NIAH and RULER test whether perplexity recovery transfers to long-context behavior. Across the tested formats, projection adaptation improves held-out quality, although attainable gains and calibration requirements vary by operating point.