KV-Distill: Nearly Lossless Context Compression for Transformers
distillation;long context;efficiency;LLM;compression
Yes
No ethics review needed.
Please check the weaknesses section.
Introducing the distillation method into KV cache compression can improve effectiveness.
This paper introduces KV-Distill, a framework for nearly lossless compression of key-value (KV) caches in Transformer models, aimed at reducing GPU memory usage when handling long contexts. KV-Distill selectively retains essential tokens in the KV cache and applies a KL divergence-based loss between compressed and uncompressed representations, preserving model performance even at high compression rates (up to 1000x). The framework leverages LoRA adapters for efficient parameterization and maintains minimal performance degradation across various tasks, including long-context question answering and summarization.
1.	No comparison with SnapKV[1].

2.	Most of the compared methods are training-free, which is not entirely fair.

3.	Instruction-following ability is mentioned in the abstract, but there are no related experiments in the results section.

4.	There is no comparison on the complete LongBench[2] benchmark.

5.	Needle-In-A-Haystack is not included in the comparisons.

6.	No information is provided about the training cost for distillation.

7.	Lines 071-076 mention certain limitations of previous work, such as requiring extra training or using BLEU for evaluation, but it’s not clear how your work addresses these issues.

8.	Table 2 should include values similar to the zero-shot column in Table 3 to better highlight the advantages brought by distillation.

> Reference  
> [1] Li, Yuhong, et al. "Snapkv: Llm knows what you are looking for before generation." arXiv preprint arXiv:2404.14469 (2024).  
> [2] Bai, Yushi, et al. "Longbench: A bilingual, multitask benchmark for long context understanding." arXiv preprint arXiv:2308.14508 (2023).
Yes
No ethics review needed.
Things that WILL affect my overall rating towards this article:

1. For weakness 1: The authors should give a thorough comparison between the proposes KV-Distill and [1,2], and demonstrate the differences between the methods. Since [2] is an inference-time method, advantages of KV-Distill over [2] should be elaborated. Experiment comparisons with [1,2] are not necessary considering their publishing dates.
2. For weakness 2: The authors should include algorithmic pipelines or pseudo-code for training or inference with KV-Distill. 
3. For weakness 3: Please consider including results/details mentioned in Weakness 3.

Things that WILL NOT affect my overall rating towards this article:

1. KV-Distill actually adopts the Top-p routing methods which resembles that in Mixture-of-Experts (MoE). What are other methods beside routing with an FFN (Line 178-179 states that FFN is "one possibility")? Additionally, the authors can consider comparing different routing/pruning strategies. 

[1] Keep the Cost Down: A Review on Methods to Optimize LLM' s KV-Cache Consumption

[2] NACL: A General and Effective KV Cache Eviction Framework for LLMs at Inference Time
1. Originality: KV-Distill firstly distills the KV-Cache in LLMs across general-purpose tasks and under flexible compression rates. 
2. Strong experiment results: While maintaining outstanding versatility, KV-Distill performs on-par with or slightly above the previous state-of-the-art methods (H$_2$O, ICAE, etc.). Moreover, KV-Distill performs consistently well on a series of downstream tasks.
This article proposes a KV-Distill method to conduct general-purpose KV-Cache distillation on Large Language Models (LLMs). Specifically, KV-Distill trains a token "importance" scorer (a FFN module) with parameter-efficient LoRA modules during a pre-training phase and choose the Top-k scored tokens during inference for KV-Cache retention. Experiment results on multiple extractive and summarization tasks demonstrate that KV-Distill acquires general-purpose instruction-following KV-Cache distillers and outperforms the previous competing methods.
1. Novelty: KV-Distill proposes to conduct KV-Cache eviction through unimportant token pruning, and proposes to insert a router-like structure (an FFN module) to conduct token selection. Currently, the idea of token eviction in the field of KV-Cache compression has motivated a number of methods [1,2]. Both methods [1,2] and KV-Distill propose to get rid of "unimportant tokens" through different importance measuring metrics. 
2. Writing: This article lacks some essential details for better reproducibility. The authors should give a detailed description on how to train/deploy KV-Distill for an off-the-shelf model.
3. Applicability: The cost (i.e., GPU Memory cost, GPU time cost, total training parameters) for pre-training with the KV-Distill method is missing from the article. Additionally, as a compression method, the inference time speedup (such as tokens per second, or any other metric that reflects the throughput of LLMs) should be reported and compared to other methods. 

[1] Keep the Cost Down: A Review on Methods to Optimize LLM' s KV-Cache Consumption

[2] NACL: A General and Effective KV Cache Eviction Framework for LLMs at Inference Time
Yes
No ethics review needed.
* During training, why do discarded tokens need to be routed differently?  Isn't the scoring function meant to gate them anyway?
* Why do models other than llama3 (in particular llama2) degrade a lot more?
* It's a bit dubious that performance varies so wildly with the alpha parameter (the KL divergence objective).  Can other works/baselines be made to work better with similar optimizations?
* Can you report other ablations that you've tried? (e.g. you refer to one on line 225)
* How did you pick layer 6 for the scoring function?  Is it easy to allow different tokens for different layers?  Does it improve performance?
* Is it meaningful to compare to GIST tokens in their setting?
* Good coverage of related work
* Great that the authors tried the method across multiple model families
* The method is demonstrated to work favorably to baselines in most cases
The paper introduces a new context compression method.  The method works by training a scoring function, which picks which token embeddings are to be retained, as well as a LoRA adapted LLM, which compresses information into the remaining embeddings.  The newly added parameters are trained with a distillation objective with respect to the next token distribution of the uncompressed LM.  The method is evaluated on SQuAD as well as 3 long context tasks, and perform favorably to the baselines (mostly H20) in most cases.
* Context compression by distillation is not a new idea as far as I know, and is the basis of earlier prompt compression and GIST token works.
* The presentation is not all that clear (see questions below).  The method could be better described, as well as why certain choices were made.  
* While the relevant works section is good, I think the comparison with those approaches are not detailed enough.  Especially for H2O, I would have liked to see more detail, since this is the main baseline.
* It's also worth discussing the different settings for context compression.  For instance in one setting, we may assume a fixed context which is going to be reused, and the goal is to compress only this context.  Some settings might allow training, other might not.  Some use cases might allow the LM to be trained etc. etc.  The description of the use case, problem setting and motivation is not as crisp as it could be.
* Gains are not entirely consistent.  For instance on GovReport, H2O outperforms the proposed approach.  (Why is this?)
We can apply distillation objective to LLM KV caches to achieve high compression ratios with minimal performance loss
@inproceedings{
anonymous2024kvdistill,
title={{KV}-Distill: Nearly Lossless Context Compression for Transformers},
author={Anonymous},
booktitle={Submitted to The Thirteenth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=p7vJ3wsm34},
note={under review}
}
Sequence-to-sequence natural language tasks often benefit greatly from long contexts, but the quadratic complexity of self-attention renders usage of long contexts non-trivial. In particular, during generation, temporary representations (stored in the KV cache) account for a large portion of GPU memory usage, and scale linearly with context length. In this work, we introduce KV-Distill, a flexible compression framework for large language models (LLMs) that distills long context KV caches into significantly shorter representations. KV-Distill can be trained as a parameter-efficient adaptor for pre-trained models, and enables the compression of arbitrary spans of a context while preserving the pre-trained model's capabilities, including instruction-tuning. We do this by treating a compressed-uncompressed cache as a student-teacher pairing and applying a KL-type divergence to match the generated outputs. Our experiments show that KV-Distill outperforms other compression techniques in worst-case extractive tasks, and approaches uncompressed performance in long context question answering and summarization. Furthermore, KV-Distill can be fine-tuned on domain-specific contexts to reduce context lengths by up 95% while preserving downstream task performance. We demonstrate the generalizability of KV-Distill across various model sizes and architectures.
I certify that there is no URL (e.g., github page) that could be used to find authors’ identity.
I acknowledge that I and all co-authors of this work have read and commit to adhering to the ICLR Code of Ethics.
distillation long context efficiency LLM compression
I certify that there is no acknowledgement section in this submission for double blind review.
/pdf/7f961d7a1ae8cae5e38c00dad528e0bf6e13c266.pdf
transfer learning, meta learning, and lifelong learning
I understand the reciprocal reviewing requirement as described on https://iclr.cc/Conferences/2025/CallForPapers. If none of the authors are registered as a reviewer, it may result in a desk rejection at the discretion of the program chairs. To request an exception, please complete this form at https://forms.gle/Huojr6VjkFxiQsUp6.
I certify that this submission complies with the submission instructions as described on https://iclr.cc/Conferences/2025/AuthorGuide.
KV-Distill: Nearly Lossless Context Compression for Transformers
ICLR 2025 Conference Submission
ICLR.cc/2025/Conference/Submission