In long context scenarios, large language models (LLMs) face three main challenges: higher computational cost, performance reduction, and position bias. Research indicates that LLM performance hinges on the density and position of key information in the input prompt. Inspired by these findings, we propose LongLLMLingua for prompt compression towards improving LLMs' perception of the key information to simultaneously address the three challenges. Our extensive evaluation across various long context scenarios demonstrates that LongLLMLingua not only enhances performance but also significantly reduces costs and latency. For instance, in the NaturalQuestions benchmark, LongLLMLingua boosts performance by up to 21.4% with around 4x fewer tokens in GPT-3.5-Turbo, leading to substantial cost savings. It achieves a 94.0% cost reduction in the LooGLE benchmark. Moreover, when compressing prompts of about 10k tokens at ratios of 2x-6x, LongLLMLingua can accelerate end-to-end latency by 1.4x-2.6x. Our code is available at https://aka.ms/LongLLMLingua.
BEAVER: A Training-Free Hierarchical Prompt Compression Method via Structure-Aware Page Selection
School of Computer Technology and Application, Qinghai University(青海大学计算机技术与应用学院);Tsinghua University(清华大学);Ant Group Security and Intelligence Laboratory (SIL)(蚂蚁集团安全与智能实验室)
DSPC: Dual-Stage Progressive Compression Framework for Efficient Long-Context Reasoning
Institute of Cyberspace Security, Zhejiang University of Technology A STAR Amazon Binjiang Institute of Artificial Intelligence, Zhejiang University of Technology
Variator: Accelerating Pre-trained Models with Plug-and-Play Compression Modules
Tsinghua University(清华大学);Quan Cheng Laboratory(泉城实验室);Zhili College, Tsinghua University(清华大学志道书院);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Tencent Inc.(腾讯公司)
DASH-KV: Accelerating Long-Context LLM Inference via Asymmetric KV Cache Hashing
School of Information and Software Engineering, University of Electronic Science and Technology of China(电子科技大学信息与软件工程学院);School of Computer Science and Engineering, University of Electronic Science and Technology of China(电子科技大学计算机科学与工程学院);Bangladesh University of Engineering and Technology(孟加拉工程与技术大学);The Hong Kong Polytechnic University(香港理工大学);Kyung Hee University, School of Computing(庆熙大学计算机学院)
CompactifAI: Extreme Compression of Large Language Models using Quantum-Inspired Tensor Networks
Multiverse Computing(多维计算公司);Catalan Institute of Nanoscience and Nanotechnology (ICN2)(加泰罗尼亚纳米科学与纳米技术研究所);The Barcelona Institute of Science and Technology(巴塞罗那科学技术研究院);Donostia International Physics Center(多斯蒂亚国际物理中心);Centre for Social Innovation(社会创新中心)