Lune

EMNLP2023顶会

Compressing Context to Enhance Inference Efficiency of Large Language Models

Yucheng Li, Bo Dong, Frank Guerin, Chenghua Lin

摘要

Large language models (LLMs) achieved remarkable performance across various tasks. However, they face challenges in managing long documents and extended conversations, due to significantly increased computational requirements, both in memory and inference time, and potential context truncation when the input exceeds the LLM's fixed context length. This paper proposes a method called Selective Context that enhances the inference efficiency of LLMs by identifying and pruning redundancy in the input context to make the input more compact. We test our approach using common data sources requiring long context processing: arXiv papers, news articles, and long conversations, on tasks of summarisation, question answering, and response generation. Experimental results show that Selective Context significantly reduces memory cost and decreases generation latency while maintaining comparable performance compared to that achieved when full context is used. Specifically, we achieve a 50% reduction in context cost, resulting in a 36% reduction in inference memory usage and a 32% reduction in inference time, while observing only a minor drop of .023 in BERTscore and .038 in faithfulness on four downstream applications, indicating that our method strikes a good balance between efficiency and performance. Code and data are available at https://github.com/ liyucheng09/Selective_Context .

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Learning to Compress Prompts with Gist Tokens 引用了 Language Models are Few-Shot Learners
  • Mental-LLM: Leveraging Large Language Models for Mental Health Prediction via Online Text Data 引用了 Language Models are Few-Shot Learners
  • Measuring Massive Multitask Language Understanding 引用了 Language Models are Few-Shot Learners
  • MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents 引用了 Language Models are Few-Shot Learners
  • C3oT: Generating Shorter Chain-of-Thought Without Compromising Effectiveness 引用了 Learning to Compress Prompts with Gist Tokens
  • C3oT: Generating Shorter Chain-of-Thought Without Compromising Effectiveness 引用了 Adapting Language Models to Compress Contexts
  • Adapting Language Models to Compress Contexts 引用了 Learning to Compress Prompts with Gist Tokens
  • Adapting Language Models to Compress Contexts 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper90

  1. Mental-LLM: Leveraging Large Language Models for Mental Health Prediction via Online Text DataXuhai Xu, Bingsheng Yao, Yuanzhe Dong, Saadia Gabriel 等UbiComp 2024 · 281 次引用
  2. MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory AgentHongli Yu, Tinghong Chen, Jiangtao Feng, Jiangjie Chen 等ICLR 2026 · 231 次引用
  3. MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon AgentsZijian Zhou, Ao Qu, Zhaoxuan Wu, Sunghwan Kim 等ICLR 2026 · 223 次引用
  4. C3oT: Generating Shorter Chain-of-Thought Without Compromising EffectivenessYu Kang, Xianghui Sun, Liangyu Chen, Wei ZouAAAI 2025 · 162 次引用
  5. LightMem: Lightweight and Efficient Memory-Augmented GenerationJizhan Fang, Xinle Deng, Haoming Xu, Ziyan Jiang 等ICLR 2026 · 162 次引用

它引用的 Paper5

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. BERTScore: Evaluating Text Generation with BERTTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger 等ICLR 2020 · 8,443 次引用
  3. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
  4. Learning to Compress Prompts with Gist TokensJesse Mu, Xiang Li, Noah D. GoodmanNeurIPS 2023 · 488 次引用
  5. Adapting Language Models to Compress ContextsAlexis Chevalier, Alexander Wettig, Anirudh Ajith, Danqi ChenEMNLP 2023 · 34 次引用

相关 Paper

  1. Dynamic Context Pruning for Efficient and Interpretable Autoregressive TransformersSotiris Anagnostidis, Dario Pavllo, Luca Biggio, Lorenzo Noci 等NeurIPS 2023 · 95 次引用
  2. SCA: Selective Compression Attention for Efficiently Extending the Context Window of Large Language ModelsHuanran Zheng, Wei Zhu, Xiaoling WangEMNLP Findings 2024
  3. Pretraining Context Compressor for Large Language Models with Embedding-Based MemoryYuhong Dai, Jianxun Lian, Yitian Huang, Wei Zhang 等ACL 2025
  4. Accelerating Inference of Retrieval-Augmented Generation via Sparse Context SelectionYun Zhu, Jia-Chen Gu, Caitlin Sikora, Ho Ko 等ICLR 2025
  5. Extending Context Window of Large Language Models via Semantic CompressionWeizhi Fei, Xueyan Niu, Pingyi Zhou, Lu Hou 等ACL Findings 2024 · 20 次引用
黄昏的海面,两侧是细线勾勒的悬崖