arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.03094cs.CL
收藏

500xCompressor:面向大语言模型的通用提示压缩方法

500xCompressor: Generalized Prompt Compression for Large Language Models

University of Cambridge(剑桥大学)

Zongqian Li, Yixuan Su, Nigel Collier

AI总结:

本文提出500xCompressor,一种无需微调即可将任意自然语言提示压缩为单个特殊token的通用提示压缩方法,实现6至480倍压缩率,并在多个问答数据集上验证其能保留原始大语言模型62.26%至72.89%的能力。

摘要:

提示压缩对于提升推理速度、降低成本和改善用户体验至关重要。然而,当前方法面临压缩率低以及评估过程中可能出现数据泄漏等挑战。为解决这些问题,我们提出500xCompressor,一种将大量自然语言上下文压缩为至少一个单一特殊token的方法。500xCompressor引入约0.3%的额外参数,并实现6倍至480倍的压缩率。它被设计用于压缩任意文本、回答各类问题,并可由原始大语言模型(LLM)直接使用,无需微调。最初,500xCompressor在Arxiv Corpus上进行预训练,随后在ArxivQA数据集上进行微调,并在严格未见过的经典问答(QA)数据集上进行评估。结果表明,与使用未压缩提示相比,该LLM保留了62.26%至72.89%的能力。本研究还表明,并非所有压缩后的token都被同等利用,并且在高压缩率下,K V值在保留信息方面相比嵌入具有显著优势。自然语言提示的高度可压缩性,即使对于细粒度复杂信息也是如此,这为未来应用以及进一步研究开发一种新的LLM语言展现了广阔前景。

英文摘要:

Prompt compression is crucial for enhancing inference speed, reducing costs, and improving user experience. However, current methods face challenges such as low compression ratios and potential data leakage during evaluation. To address these issues, we propose 500xCompressor, a method that compresses extensive natural language contexts into a minimum of one single special token. The 500xCompressor introduces approximately 0.3% additional parameters and achieves compression ratios ranging from 6x to 480x. It is designed to compress any text, answer various types of questions, and could be utilized by the original large language model (LLM) without requiring fine-tuning. Initially, 500xCompressor was pretrained on the Arxiv Corpus, followed by fine-tuning on the ArxivQA dataset, and subsequently evaluated on strictly unseen and classical question answering (QA) datasets. The results demonstrate that the LLM retained 62.26-72.89% of its capabilities compared to using non-compressed prompts. This study also shows that not all the compressed tokens are equally utilized and that K V values have significant advantages over embeddings in preserving information at high compression ratios. The highly compressive nature of natural language prompts, even for fine-grained complex information, suggests promising potential for future applications and further research into developing a new LLM language.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑