Although applications involving long-context inputs are crucial for the effective utilization of large language models (LLMs), they also result in increased computational costs and reduced performance. To address this challenge, we propose an efficient, training-free prompt compression method that retains key information within compressed prompts. We identify specific attention heads in transformer-based LLMs, which we designate as evaluator heads, that are capable of selecting tokens in long inputs that are most significant for inference. Building on this discovery, we develop EHPC, an Evaluator Head-based Prompt Compression method, which enables LLMs to rapidly "skim through" input prompts by leveraging only the first few layers with evaluator heads during the pre-filling stage, subsequently passing only the important tokens to the model for inference. EHPC achieves state-of-the-art results across two mainstream benchmarks: prompt compression and long-context inference acceleration. Consequently, it effectively reduces the complexity and costs associated with commercial API calls. We further demonstrate that EHPC attains competitive results compared to key-value cache-based acceleration methods, thereby highlighting its potential to enhance the efficiency of LLMs for long-context tasks.
Which Heads Matter for Reasoning? RL-Guided KV Cache Compression
Westlake University(西华大学);McGill University(麦吉尔大学);Mila - Quebec AI Institute(魁北克AI研究院);Zhejiang University(浙江大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德智能大学)
HeteroCache: A Dynamic Retrieval Approach to Heterogeneous KV Cache Compression for Long-Context LLM Inference
School of Software Technology, Zhejiang University(浙江大学软件学院);China Mobile (Zhejiang) Research & Innovation Institute(中国移动(浙江)研究院);State Key Lab of CAD&CG, Zhejiang University(浙江大学CAD与CG国家重点实验室);Geely Automobile Research Institute (Ningbo) Co., Ltd.(吉利汽车研究院(宁波)有限公司);FABU Inc.(FABU公司)
LKV: End-to-End Learning of Head-wise Budgets and Token Selection for LLM KV Cache Eviction
University of Science and Technology of China(中国科学技术大学);State Key Lab of Processors, Institute of Computing Technology, CAS, Beijing, China(中国科学院计算技术研究所过程器重点实验室,北京,中国);University of Chinese Academy of Sciences, Beijing, China(中国科学院大学,北京,中国)
Garbage Attention in Large Language Models: BOS Sink Heads and Sink-aware Pruning
Graduate School of Data Science, Seoul National University(数据科学研究生院,首尔国立大学);Department of Rural Systems Engineering, Seoul National University(农村系统工程系,首尔国立大学);Department of Aerospace Engineering, Seoul National University(航空航天工程系,首尔国立大学)
Distance-KV: Exploiting Relative Distance for Efficient Long-Context Inference
Inner Mongolia University(内蒙古大学);Shenzhen Loop Area Institute(深圳河套学院);Sun Yat-sen University(中山大学);Kyoto University(京都大学);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))
MoE-nD: Per-Layer Mixture-of-Experts Routing for Multi-Axis KV Cache Compression
Department of Computer Science and Software Engineering, Auburn University, Auburn, AL, USA(计算机科学与软件工程系,阿伯拉罕大学,阿伯丁,阿拉巴马州,美国);Department of Information Management, National Central University, Taoyuan, Taiwan(信息管理系,国立中央大学,桃园,台湾)
Autonomy-of-Heads: Data-Free Sparse Attention from Frozen Query-Key Geometry
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Beijing University of Posts and Telecommunications(北京邮电大学);Baidu Inc.(百度公司)
HeadRouter: Dynamic Head-Weight Routing for Task-Adaptive Audio Token Pruning in Large Audio Language Models
EPIC Lab, Shanghai Jiao Tong University(上海交通大学EPIC实验室);DAIL Tech(DAIL科技);Northeastern University(东北大学);Sichuan University(四川大学);Huazhong University of Science and Technology(华中科技大学)
MiniLMv2: Multi-Head Self-Attention Relation Distillation for Compressing Pretrained Transformers
Microsoft Research(微软研究院)
我们在MiniLM中推广了深度自我注意力蒸馏(Wang et al.,2020)通过仅使用自注意关系蒸馏来对预训练的Transformers进行任务不可知压缩。特别是,我们定义了多头自我注意力的关系,每个自我注意力模块内的查询,键和值向量对之间的缩放点积。然后运用上述相关知识对学生模型进行训练。除了简单和统一的原则,更有利的是,它没有限制的数量方面的学生的注意头,而大多数以前的工作必须保证相同的头数之间的教师和学生。此外,细粒度的自注意关系倾向于充分利用Transformer学习的交互知识。此外,我们彻底研究了教师模型的层选择策略,而不是像MiniLM中那样只依赖最后一层。我们对压缩单语和多语言预训练模型进行了广泛的实验。实验结果表明,我们的模型提取的基础大小和大尺寸的教师(BERT,RoBERTa和XLM-R)优于国家的最先进的。
Sentinel: Decoding Context Utilization via Attention Probing for Efficient LLM Context Compression
Ping An Technology (Shenzhen) Co., Ltd., China(平安科技(深圳)有限公司,中国);University of Science and Technology of China(中国科学技术大学);University of Electronic Science and Technology of China(电子科技大学)
Entropy Meets Importance: A Unified Head Importance-Entropy Score for Stable and Efficient Transformer Pruning
Department of Computer Science and Engineering, Korea University, Seoul, South Korea(计算机科学与工程系,韩国大学,首尔,韩国);School of Software, Soongsil University, Seoul, South Korea(软件学院,顺天大学,首尔,韩国)