Pretraining Context Compressor for Large Language Models with Embedding-Based Memory
Yuhong Dai, Jianxun Lian, Yitian Huang, Wei Zhang, Mingyang Zhou, Mingqi Wu, Xing Xie, Hao Liao
Abstract
Efficient processing of long contexts in large language models (LLMs) is essential for realworld applications like retrieval-augmented generation and in-context learning, especially in resource-constrained environments such as edge computing. This paper explores the embedding-based context compression to reduce inference costs while preserving the downstream LLM configurations. We propose a decoupled compressor-LLM framework, pretrained on text reconstruction and completion tasks, designed to effectively preserve essential contextual information within condensed embedding representations. Our extensive experiments investigate pretraining, model configurations, compression rates, efficiency across tasks, and adaptability to various LLMs. Results demonstrate that our approach outperforms competitive baselines in three domains and across eight datasets while being adaptable to different downstream LLMs. We find that thorough pretraining and carefully selected compression rates, such as 4x and 16x, enable a lightweight compressor to achieve a good balance between accuracy and speed. These findings underscore the potential of embeddingbased compression to enhance LLM efficiency and motivate further research in this area.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- MemoryBank: Enhancing Large Language Models with Long-Term Memory cites LoRA: Low-Rank Adaptation of Large Language Models
- Read As Human: Compressing Context via Parallelizable Close Reading and Skimming cites GMSA: Enhancing Context Compression via Group Merging and Layer Semantic Alignment
- Frozen LLMs are Native Decoders for High-Norm Semantic Vectors cites LoRA: Low-Rank Adaptation of Large Language Models
- COMI: Coarse-to-fine Context Compression via Marginal Information Gain cites GMSA: Enhancing Context Compression via Group Merging and Layer Semantic Alignment
- LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models cites LoRA: Low-Rank Adaptation of Large Language Models
Cited by top-tier papers5
- GMSA: Enhancing Context Compression via Group Merging and Layer Semantic AlignmentJiwei Tang, Zhicheng Zhang, Shunlong Wu, Jingheng Ye et al.ACL 2026 · 24 citations
- COMI: Coarse-to-fine Context Compression via Marginal Information GainJiwei Tang, Shilei Liu, Zhicheng Zhang, Yujin Yuan et al.ICLR 2026 · 17 citations
- Read As Human: Compressing Context via Parallelizable Close Reading and SkimmingJiwei Tang, Shilei Liu, Zhicheng Zhang, Qingsong Lv et al.ACL 2026 · 10 citations
- Do LLMs Forget What They Should? Evaluating In-Context Forgetting in Large Language ModelsYuli Qian, Zechuan Yang, Wenbiao Ding, Hongzhi Li et al.ICLR 2026
- Frozen LLMs are Native Decoders for High-Norm Semantic VectorsYunsheng Zeng, Yongmei TanACL 2026
Builds on14
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse AttentionHuiqiang Jiang, Yucheng Li, Chengruidong Zhang, Qianhui Wu et al.NeurIPS 2024 · 479 citations
- MemoryBank: Enhancing Large Language Models with Long-Term MemoryWanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye et al.AAAI 2024 · 394 citations
- LongRoPE: Extending LLM Context Window Beyond 2 Million TokensYiran Ding, Li Lyna Zhang, Chengruidong Zhang, Yuanyuan Xu et al.ICML 2024 · 316 citations
- LongLoRA: Efficient Fine-tuning of Long-Context Large Language ModelsYukang Chen, Shengju Qian, Haotian Tang, Xin Lai et al.ICLR 2024 · 254 citations
Related papers
- Enhancing RAG Efficiency with Adaptive Context CompressionShuyu Guo, Shuo Zhang, Zhaochun RenEMNLP Findings 2025 · 5 citations
- C2KV: Compressed and Composable KV Cache Reuse for Efficient LLM InferenceChuheng Du, Junyi Chen, Hanlin Tang, Kan Liu et al.KDD 2026 · 3 citations
- LLoCO: Learning Long Contexts OfflineSijun Tan, Xiuyu Li, Shishir G. Patil, Ziyang Wu et al.EMNLP 2024 · 3 citations
- Provence: efficient and robust context pruning for retrieval-augmented generationNadezhda Chirkova, Thibault Formal, Vassilina Nikoulina, Stéphane ClinchantICLR 2025 · 2 citations
- In-Context Former: Lightning-fast Compressing Context for Large Language ModelXiangfeng Wang, Zaiyi Chen, Tong Xu, Zheyong Xie et al.EMNLP Findings 2024 · 6 citations
