SelfCP: Compressing over-limit prompt via the frozen large language model itself

IF 6.9 1区 管理学 Q1 COMPUTER SCIENCE, INFORMATION SYSTEMS Information Processing & Management Pub Date : 2024-08-30 DOI:10.1016/j.ipm.2024.103873
Jun Gao , Ziqiang Cao , Wenjie Li
{"title":"SelfCP: Compressing over-limit prompt via the frozen large language model itself","authors":"Jun Gao ,&nbsp;Ziqiang Cao ,&nbsp;Wenjie Li","doi":"10.1016/j.ipm.2024.103873","DOIUrl":null,"url":null,"abstract":"<div><p>Long prompt leads to huge hardware costs when using transformer-based Large Language Models (LLMs). Unfortunately, many tasks, such as summarization, inevitably introduce long documents, and the wide application of in-context learning easily makes the prompt length explode. This paper proposes a Self-Compressor (SelfCP), which adopts the target LLM itself to compress over-limit prompts into dense vectors on top of a sequence of learnable embeddings (<strong>memory tags</strong>) while keeping the allowed prompts unmodified. Dense vectors are then projected into <strong>memory tokens</strong> via a learnable connector, allowing the same LLM to understand them. The connector and the memory tag are supervised-tuned under the language modeling objective of the LLM on relatively long texts selected from publicly accessed datasets involving an instruction dataset to make SelfCP respond to various prompts, while the target LLM keeps frozen during training. We build the lightweight SelfCP upon 2 different backbones with merely 17M learnable parameters originating from the connector and a learnable embedding. Evaluation on both English and Chinese benchmarks demonstrate that SelfCP effectively substitutes 12<span><math><mo>×</mo></math></span> over-limit prompts with memory tokens to reduce memory costs and booster inference throughputs, yet improving response quality. The outstanding performance brings an efficient solution for LLMs to tackle long prompts without training LLMs from scratch.</p></div>","PeriodicalId":50365,"journal":{"name":"Information Processing & Management","volume":"61 6","pages":"Article 103873"},"PeriodicalIF":6.9000,"publicationDate":"2024-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information Processing & Management","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0306457324002322","RegionNum":1,"RegionCategory":"管理学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

Abstract

Long prompt leads to huge hardware costs when using transformer-based Large Language Models (LLMs). Unfortunately, many tasks, such as summarization, inevitably introduce long documents, and the wide application of in-context learning easily makes the prompt length explode. This paper proposes a Self-Compressor (SelfCP), which adopts the target LLM itself to compress over-limit prompts into dense vectors on top of a sequence of learnable embeddings (memory tags) while keeping the allowed prompts unmodified. Dense vectors are then projected into memory tokens via a learnable connector, allowing the same LLM to understand them. The connector and the memory tag are supervised-tuned under the language modeling objective of the LLM on relatively long texts selected from publicly accessed datasets involving an instruction dataset to make SelfCP respond to various prompts, while the target LLM keeps frozen during training. We build the lightweight SelfCP upon 2 different backbones with merely 17M learnable parameters originating from the connector and a learnable embedding. Evaluation on both English and Chinese benchmarks demonstrate that SelfCP effectively substitutes 12× over-limit prompts with memory tokens to reduce memory costs and booster inference throughputs, yet improving response quality. The outstanding performance brings an efficient solution for LLMs to tackle long prompts without training LLMs from scratch.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
SelfCP:通过冻结的大型语言模型本身压缩超限提示
在使用基于转换器的大型语言模型(LLM)时,长提示会导致巨大的硬件成本。遗憾的是,许多任务(如摘要)不可避免地会引入长文档,而上下文学习的广泛应用很容易使提示符长度爆炸式增长。本文提出了一种自压缩器(SelfCP),它采用目标 LLM 本身,在可学习嵌入(记忆标签)序列的基础上,将超限提示压缩成密集向量,同时保持允许的提示不变。然后,通过可学习连接器将密集向量投射到内存标记中,使同一 LLM 能够理解这些标记。连接器和记忆标记是在 LLM 的语言建模目标下,在从公开访问的数据集(包括指令数据集)中选取的相对较长的文本上进行监督调整的,以使 SelfCP 响应各种提示,而目标 LLM 在训练过程中保持冻结。我们在两个不同的骨干上构建了轻量级的 SelfCP,其中仅有 177 个可学习的参数来自连接器和一个可学习的嵌入。在中英文基准测试中的评估表明,SelfCP 有效地用内存令牌替代了 12 倍超限提示,从而降低了内存成本,提高了推理吞吐量,同时改善了响应质量。出色的性能为 LLMs 提供了一个高效的解决方案,无需从头开始训练 LLMs 就能处理长提示。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Information Processing & Management
Information Processing & Management 工程技术-计算机:信息系统
CiteScore
17.00
自引率
11.60%
发文量
276
审稿时长
39 days
期刊介绍: Information Processing and Management is dedicated to publishing cutting-edge original research at the convergence of computing and information science. Our scope encompasses theory, methods, and applications across various domains, including advertising, business, health, information science, information technology marketing, and social computing. We aim to cater to the interests of both primary researchers and practitioners by offering an effective platform for the timely dissemination of advanced and topical issues in this interdisciplinary field. The journal places particular emphasis on original research articles, research survey articles, research method articles, and articles addressing critical applications of research. Join us in advancing knowledge and innovation at the intersection of computing and information science.
期刊最新文献
Dynamic loss balancing for long-tailed multi-label problem in document-level relation extraction Game-theoretic approach on strategizing cooperation model in community group-buying Bridging the gap in cross-domain graph anomaly detection: Enhanced source utilization and label accuracy Fusion decomposition and backbone gathering based multimodal sentiment analysis under uncertain missing modalities The autonomy equation: How agentic AI reshapes trust and workload in routine productivity applications
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1