A JoLT for the KV Cache: Near-Lossless KV Cache Compression via Joint Tucker and JL-Residual Allocation for LLMs

· Source: cs.CL updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, extended

Summary

JoLT and FlashJoLT introduce a novel KV-cache compression method for large language models, addressing the memory bottleneck in transformer inference. JoLT treats the cache as a third-order tensor, applying a partial Tucker decomposition to compress only the token and feature axes, which carry most redundancy. It then restores discarded energy using a Johnson-Lindenstrauss (JL) rotated low-bit residual. A single Lagrangian dual jointly allocates Tucker ranks and residual bit-widths per layer group and separately for keys and values, under a byte budget. This achieves near-lossless 2–3× compression, maintaining perplexity, GSM8K accuracy, and RULER retrieval within statistical noise on Mistral-7B-v0.3 (GQA) and LLaMA-2-13B (MHA). At 2×, JoLT reconstructs the cache with relative Frobenius errors of 0.009 (K) and 0.006 (V). FlashJoLT, a randomized-SVD variant, further accelerates compression time by 5–13× at matched quality.

Key takeaway

For MLOps Engineers optimizing LLM inference costs, you should implement JoLT or FlashJoLT to achieve 2–3× KV cache compression. This significantly reduces memory footprint for long contexts without impacting model quality on perplexity or downstream tasks. Be aware that Multi-Head Attention models like LLaMA-2-13B degrade sharply beyond 4× compression, so stick to the 2–3× "free zone" for robust performance. Consider fused kernels for decode-time efficiency.

Key insights

KV cache compression is near-lossless at 2–3× by treating it as a tensor and jointly allocating ranks and residual bits.

Principles

Method

JoLT uses partial Tucker decomposition on token/feature axes, then a JL-rotated low-bit residual, with a Lagrangian dual for joint rank/bit allocation.

In practice

Topics

Best for: AI Engineer, NLP Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, MLOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.