Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

KV-Distill: Nearly Lossless Learnable Context Compression for LLMs

About

Sequence-to-sequence tasks often benefit from long contexts, but the quadratic complexity of self-attention in standard Transformers renders this non-trivial. During generation, temporary representations -stored in the so-called KV cache-account for a large portion of GPU memory usage and scale linearly with context length. We introduce KV-Distill, a Transformer compression framework that distills long context KV caches into significantly shorter representations in a question-independent fashion. KV-Distill can be trained as a parameter-efficient adaptor for pretrained models, and enables the compression of arbitrary spans of a context while preserving pre-trained model capabilities. We treat a compressed-uncompressed cache as a student-teacher pairing and apply a KL-type divergence to match the generated outputs. KV-Distill outperforms other compression techniques in worst-case extractive tasks and approaches uncompressed performance in long context question answering and summarization, and it can be fine-tuned on domain-specific contexts to reduce lengths by up to 99% while preserving downstream performance. We demonstrate the generalizability of KV-Distill across various model sizes and architectures.

Vivek Chari, Guanghui Qin, Benjamin Van Durme• 2025

Related benchmarks

TaskDatasetResultRank
Multiple-Choice QuestionsFour-domain MCQ (test)
Accuracy65.3
43
Free-form summarizationHELMET multi_lexsum
Utilization85.5
15
Long-context evaluationRULER 128k Zero-shot transfer
Accuracy (RULER 128k Zero-shot)22
12
Long-context evaluationRULER 128k (matched-train holdout)
Accuracy20.3
12
Long-context evaluationRULER 32k Zero-shot transfer
Accuracy24.1
12
Long-context evaluationRULER 64k Zero-shot transfer
Accuracy21.8
12
Long-context evaluationRULER 32k (matched-train holdout)
Accuracy26.5
12
Long-context evaluationRULER 64k (matched-train holdout)
Accuracy21.9
12
Free-form summarizationLongBench V1
Overall Score53.4
2
Long-context evaluationLongBench context-dependent transfer v2
Score (32k Context)26
2
Showing 10 of 13 rows

Other info

Follow for update