Navigation menu
LowRAM: Low-Rank Keys and Amortised Values for Composable KV Cache Compression at Test-Time
LowRAM: Low-Rank Keys and Amortised Values for Composable KV Cache Compression at Test-Time
Teresa Delgado, Hugo Hazard, Martin Benfeghoul, Jun Wang, Zafeirios Fountas
AI-generated from the full paper (deepseek-flash). It may contain mistakes; check the original.
TL;DR
LowRAM is an asymmetric KV cache compression pipeline that predicts values from keys with per-head test-time predictors and residuals while compressing keys with cross-layer low-rank decomposition, reaching near-lossless moderate compression and 26.9× compression at 94.5% of baseline on long contexts.
Problem
Autoregressive decoding relies on a KV cache that grows linearly with context length and caps batch size and throughput. Existing post-training compression methods exploit redundancy across tokens, layers, feature dimensions, or numerical precision, but leave the redundancy between keys and values largely unexplored. Keys and values share an origin but serve different functions, motivating an asymmetric treatment.
Method
LowRAM treats keys and values as structurally distinct objects: keys use xKV cross-layer low-rank compression, while values are reconstructed from keys by a lightweight per-head predictor fitted at test time. The predictor is a two-layer MLP with a learned linear residual branch, fit during prefill by MSE reconstruction from pre-RoPE keys. Tokens are ranked by reconstruction error, and residuals are stored only for the top p fraction, so decoding reconstructs values as fθ(K) plus gated residuals. RoPE is inverted before compression and reapplied at attention time; generated key-values are stored exactly during decoding. Meta-learning can initialise the predictor for fast prefill, and selective reconstruction rebuilds only a query-dependent subset of KV pairs at each decode step.
Results
- At 3× compression Mistral-7B and Llama-3.1-8B retain 97.9–99.4% of baseline; at 4× recovery is 96.0–99.6% except Llama-3.1-8B on RULER at 93.9%. §4.2
- Meta-learning the MLP initialisation reduces per-context adaptation to 2 gradient updates and lowers TTFT overhead to 1.3× baseline, down from 26.3× with 150 updates and 55.5× with 300. §4.3
- At 4× compression LowRAM-SR supports a batch size of 28 at all three context lengths and at 262K tokens reaches roughly 5× the peak throughput of the baseline. §4.3
- Adding quantisation to the 4× LowRAM cache raises Mistral LongBench compression to 6.4× and recovery from 97.9% to 99.4%; for Llama RULER, LowRAM-Q reaches 99.4% versus 93.9% for LowRAM. §4.4
- The full LowRAM-EQ stack achieves 26.9× compression while recovering 94.5% of baseline performance on LongBench contexts longer than 10K tokens. §4.4
- Value-cache amortisation in isolation retains 98.2% of RULER and 99.3% of LongBench performance at 4× compression on Llama-3.1-8B. §4.5
Limitations
- Long generations are not evaluated; the paper states this would require periodically compressing the suffix of newly generated tokens, e.g. every N tokens, rather than relying on a single prefill-time fit. Stated in §6.
- The paper states it is unclear how much of the learned parametrisation persists across contexts and whether hard-to-predict tokens are stable across contexts. Stated in §6.
- The predictor's parameters are a fixed cost amortised only after a few thousand tokens, so LowRAM degrades more on 4K RULER and combines less cleanly with eviction. Stated in §5 and §4.4.
- Meta-initialisation cuts TTFT but costs 1.4–4.4 points on RULER and 2.4 on LongBench relative to 300-update adaptation. Stated in §4.3.
Key points
- LowRAM uses xKV for keys: groups of adjacent layers are flattened and factorised as M≈AB at a rank chosen for a target ratio; RoPE is inverted before compression and reapplied at attention time. §3
- The source-target analysis at fixed 3× compression finds K_L→V_L gives the highest recovered LongBench performance among evaluated configurations; reconstruction error correlates only weakly with downstream performance. §3.1
- Values are modelled per layer and KV head by a two-layer MLP with ReLU and a learned linear residual branch, fitted during prefill by MSE reconstruction. §3.2
- Only the top p fraction of tokens by reconstruction error store residuals, and decoding reconstructs V_tilde=fθ(K)+G⊙ΔV; total memory has a sequence-independent parameter term and a sequence-dependent residual term. §3.2
- Meta-learning uses FOMAML with K=2 inner updates, Adam inner optimiser at 10^-3, AdamW outer at 3×10^-4, and gradient accumulation over 8 sequences. §E
- Selective reconstruction follows ShadowKV landmark guidance and reconstructs only a query-dependent subset of tokens at each decode step instead of the full cache. §F
- LowRAM-EQ combines LowRAM with eviction and quantisation; at maximum evaluated compression retaining at least 90% on Mistral LongBench >10K, it reaches 26.9× and 94.5%. §4.4
- In isolation on Llama-3.1-8B, value-cache amortisation retains 98.2% of RULER and 99.3% of LongBench at 4×; xKV on values is slightly ahead on RULER at higher ratios but amortisation is consistently stronger on LongBench. §4.5
Mind map
Related papers
Intrinsic Distribution Matching
IDM keeps the full internal DMD correction and adds a feature-moment loss on generator EMA features, improving 2-NFE LongText scores on Z-Image-Turbo and Qwen-Image.
Jeveration: System One Models Now Generate
Jeveration turns a frozen VLM into a single-forward-pass image generator and dense predictor by making parallel typed decisions conditioned on a shared random state.
Wave Forcing: Towards Speed-of-Light Streaming Video Generation
Wave Forcing co-designs causal wavefront generation, three-stage training, and Wave Runtime to stream video at one chunk per concurrent forward round after pipeline fill while retaining all denoising updates.
VFlash: Fast, Accurate Visual Planning via Flash Primitive Decoding
VFlash replaces sequential coordinate generation for visual primitives with a lightweight diffusion drafter that predicts a complete primitive in one pass and accepts structurally valid drafts without target-token agreement.
💬 Related discussions
Sign In
Choose a method to continue
By signing in, you agree to our Terms and Privacy Policy

