Lune

ICLR2025顶会

HShare: Fast LLM Decoding by Hierarchical Key-Value Sharing

Huaijin Wu, Lianqiang Li, Hantao Huang, Tu Yi, Jihang Zhang, Minghui Yu, Junchi Yan

摘要

The frequent retrieval of Key-Value (KV) cache data has emerged as a significant factor contributing to the inefficiency of the inference process in large language models. Previous research has demonstrated that a small subset of critical KV cache tokens largely influences attention outcomes, leading to methods that either employ fixed sparsity patterns or dynamically select critical tokens based on the query. While dynamic sparse patterns have proven to be more effective, they introduce significant computational overhead, as critical tokens must be reselected for each self-attention computation. In this paper, we reveal substantial similarities in KV cache token criticality across neighboring queries, layers, and heads. Motivated by this insight, we propose HShare, a hierarchical KV sharing framework. HShare facilitates the sharing of critical KV cache token indices across layers, heads, and queries, which significantly reduces the computational overhead associated with query-aware dynamic token sparsity. In addition, we introduce a greedy algorithm that dynamically determines the optimal layer-level and head-level sharing configuration for the decoding phase. We evaluate the effectiveness and efficiency of HShare across various tasks using three models: LLaMA2-7b, LLaMA3-70b, and Mistral-7b. Experimental results demonstrate that HShare achieves competitive accuracy with different sharing ratios, while delivering up to an 8.6× speedup in self-attention operations and a 2.7× improvement in end-to-end throughput compared with FlashAttention2 and GPT-fast respectively. The source code is publicly available at https://github.com/wuhuaijin/HShare.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Efficient Streaming Language Models with Attention Sinks 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • Efficient Streaming Language Models with Attention Sinks 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Efficient Streaming Language Models with Attention Sinks 引用了 Reformer: The Efficient Transformer
  • SALS: Sparse Attention in Latent Space for KV Cache Compression 引用了 Efficient Streaming Language Models with Attention Sinks
  • SALS: Sparse Attention in Latent Space for KV Cache Compression 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • SALS: Sparse Attention in Latent Space for KV Cache Compression 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • SALS: Sparse Attention in Latent Space for KV Cache Compression 引用了 Reformer: The Efficient Transformer
  • Achieving low-bit Muon through subspace preservation and grid quantization 引用了 Generation as Search Operator for Test-Time Scaling of Diffusion-based Combinatorial Optimization
  • FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inference 引用了 Efficient Streaming Language Models with Attention Sinks
  • FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inference 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inference 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inference 引用了 Twilight: Adaptive Attention Sparsity with Hierarchical Top-p Pruning
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Reformer: The Efficient Transformer
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning 引用了 Reformer: The Efficient Transformer
  • Twilight: Adaptive Attention Sparsity with Hierarchical Top-p Pruning 引用了 Efficient Streaming Language Models with Attention Sinks
  • Twilight: Adaptive Attention Sparsity with Hierarchical Top-p Pruning 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Twilight: Adaptive Attention Sparsity with Hierarchical Top-p Pruning 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. Twilight: Adaptive Attention Sparsity with Hierarchical Top-pp PruningChaofan Lin, Jiaming Tang, Shuo Yang, Hanshuo Wang 等NeurIPS 2025 · 53 次引用
  2. FreeKV: Boosting KV Cache Retrieval for Efficient LLM InferenceGuangda Liu, Chengwei Li, Zhenyu Ning, Jing Lin 等ICLR 2026 · 17 次引用
  3. Generation as Search Operator for Test-Time Scaling of Diffusion-based Combinatorial OptimizationYang Li, Lvda Chen, Haonan Wang, Runzhong Wang 等NeurIPS 2025 · 13 次引用
  4. SALS: Sparse Attention in Latent Space for KV Cache CompressionJunlin Mu, Hantao Huang, Jihang Zhang, Minghui Yu 等NeurIPS 2025 · 7 次引用
  5. Achieving low-bit Muon through subspace preservation and grid quantizationHuaijin Wu, Bingrui Li, Yebin Yang, Yi Tu 等ICLR 2026

它引用的 Paper21

  1. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
  2. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
  3. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
  4. Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 次引用
  5. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen 等NeurIPS 2023 · 1,003 次引用

相关 Paper

  1. ZipVL: Accelerating Vision-Language Models Through Dynamic Token SparsityYefei He, Feng Chen, Jing Liu, Wenqi Shao 等ICCV 2025 · 1 次引用
  2. Q Cache: Visual Attention Is Valuable in Less than Half of Decode Layers for Multimodal Large Language ModelJiedong Zhuang, Lu Lu, Ming Dai, Rui Hu 等AAAI 2026
  3. Not All Heads Matter: A Head-Level KV Cache Compression Method with Integrated Retrieval and ReasoningYu Fu, Zefan Cai, Abedelkadir Asi, Wayne Xiong 等ICLR 2025
  4. HATA: Trainable and Hardware-Efficient Hash-Aware Top-k Attention for Scalable Large Model InferencePing Gong, Jiawei Yi, Shengnan Wang, Juncheng Zhang 等ACL Findings 2025 · 4 次引用
  5. SlimInfer: Accelerating Long-Context LLM Inference via Dynamic Token PruningLingkun Long, Rubing Yang, Yushi Huang, Desheng Hui 等AAAI 2026 · 8 次引用
黄昏的海面,两侧是细线勾勒的悬崖