Lune

ICLR2025顶会

MatryoshkaKV: Adaptive KV Compression via Trainable Orthogonal Projection

Bokai Lin, Zihao Zeng, Zipeng Xiao, Siqi Kou, TianQi Hou, Xiaofeng Gao, Hao Zhang, Zhijie Deng

摘要

KV cache has become a de facto technique for the inference of large language models (LLMs), where tensors of shape (layer number, head number, sequence length, feature dimension) are introduced to cache historical information for selfattention. As the size of the model and data grows, the KV cache can quickly become a bottleneck within the system in both storage and memory transfer. To address this, prior studies usually focus on the first three axes of the cache tensors for compression. This paper supplements them, focusing on the feature dimension axis, by utilizing low-rank projection matrices to transform the cache features into spaces with reduced dimensions. We begin by investigating the canonical orthogonal projection method for data compression through principal component analysis (PCA). We observe the issue with PCA projection where significant performance degradation is observed at low compression rates. To bridge the gap, we propose to directly tune the orthogonal projection matrices with a distillation objective using an elaborate Matryoshka training strategy. After training, we adaptively search for the optimal compression rates for various layers and heads given varying compression budgets. Compared to previous works, our method can easily embrace pre-trained LLMs and hold a smooth tradeoff between performance and compression rate. We empirically witness the high data efficiency of our training procedure and find that our method can sustain over 90% performance with an average KV cache compression rate of 60% (and up to 75% in certain extreme scenarios) for popular LLMs like LLaMA2-7B-base and Mistral-7B-v0.3-base.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Efficient Streaming Language Models with Attention Sinks 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Efficient Streaming Language Models with Attention Sinks 引用了 Language Models are Few-Shot Learners
  • LoRA: Low-Rank Adaptation of Large Language Models 引用了 Language Models are Few-Shot Learners
  • SnapKV: LLM Knows What You are Looking for Before Generation 引用了 Efficient Streaming Language Models with Attention Sinks
  • MoME: Mixture of Matryoshka Experts for Audio-Visual Speech Recognition 引用了 LoRA: Low-Rank Adaptation of Large Language Models
  • Language Models are Few-Shot Learners 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • MUSTAFAR: Promoting Unstructured Sparsity for KV Cache Pruning in LLM Inference 引用了 SnapKV: LLM Knows What You are Looking for Before Generation
  • MUSTAFAR: Promoting Unstructured Sparsity for KV Cache Pruning in LLM Inference 引用了 ShadowKV: KV Cache in Shadows for High-Throughput Long-Context LLM Inference
  • ShadowKV: KV Cache in Shadows for High-Throughput Long-Context LLM Inference 引用了 Efficient Streaming Language Models with Attention Sinks
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. MUSTAFAR: Promoting Unstructured Sparsity for KV Cache Pruning in LLM InferenceDonghyeon Joo, Helya Hosseini, Ramyad Hadidi, Bahar AsgariNeurIPS 2025 · 12 次引用
  2. MoME: Mixture of Matryoshka Experts for Audio-Visual Speech RecognitionUmberto Cappellazzo, Minsu Kim, Pingchuan Ma, Honglie Chen 等NeurIPS 2025 · 5 次引用
  3. ShadowKV: KV Cache in Shadows for High-Throughput Long-Context LLM InferenceHanshi Sun, Li-Wen Chang, Wenlei Bao, Size Zheng 等ICML 2025

它引用的 Paper17

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
  3. WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 次引用
  4. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
  5. SnapKV: LLM Knows What You are Looking for Before GenerationYuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh 等NeurIPS 2024 · 1,019 次引用

相关 Paper

  1. Palu: KV-Cache Compression with Low-Rank ProjectionChi-Chih Chang, Wei-Cheng Lin, Chien-Yu Lin, Chong-Yan Chen 等ICLR 2025
  2. KV Cache Transform Coding for Compact Storage in LLM InferenceKonrad Staniszewski, Adrian LancuckiICLR 2026 · 9 次引用
  3. MiniCache: KV Cache Compression in Depth Dimension for Large Language ModelsAkide Liu, Jing Liu, Zizheng Pan, Yefei He 等NeurIPS 2024 · 160 次引用
  4. A3: an Analytical Low-Rank Approximation Framework for AttentionJeffrey T. H. Wong, Cheng Zhang, Xinye Cao, Pedro Gimenes 等ICML 2026 · 4 次引用
  5. Lexico: Extreme KV Cache Compression via Sparse Coding over Universal DictionariesJunhyuck Kim, Jongho Park, Jaewoong Cho, Dimitris PapailiopoulosICML 2025
黄昏的海面,两侧是细线勾勒的悬崖