arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2410.14042cs.CL
收藏

Style-Compress:一种考虑任务特定风格的基于大语言模型的提示压缩框架

Style-Compress: An LLM-Based Prompt Compression Framework Considering Task-Specific Styles

University of California, Santa Barbara(加利福尼亚大学圣巴巴拉分校);Tsinghua University(清华大学);Peking University(北京大学)

Xiao Pu, Tianxing He, Xiaojun Wan

AI总结:

本文提出 Style-Compress 框架,通过风格变化与上下文学习让小型语言模型无需训练即可为大型模型生成任务特定压缩提示,在多项任务上以低压缩比达到与原始提示相当或更优的性能。

摘要:

提示压缩在保持不同使用场景下信息量的同时压缩上下文。它不仅缩短了使用大语言模型时的推理时间并降低计算成本,还减少了使用闭源模型时的费用。在一项初步研究中,我们发现当指示语言模型压缩提示时,不同的压缩风格(例如抽取式或生成式)会影响压缩提示在下游任务上的性能。基于这一发现,我们提出了 Style-Compress,这是一个轻量级框架,它使一个较小的语言模型能够在新任务上为较大的模型压缩提示,而无需额外训练。我们的方法通过风格变化和上下文学习迭代地生成并选择有效的压缩提示作为任务特定示例,使较小的模型能够利用任务特定示例充当高效压缩器。Style-Compress 在四项任务上优于两个基线压缩模型:原始提示重建、文本摘要、多跳问答和思维链推理。此外,仅使用 10 个样本和 100 次查询进行适配,Style-Compress 压缩后的提示在压缩比为 0.25 或 0.5 时即可达到与原始提示相当或更好的性能。

英文摘要:

Prompt compression condenses contexts while maintaining their informativeness for different usage scenarios. It not only shortens the inference time and reduces computational costs during the usage of large language models, but also lowers expenses when using closed-source models. In a preliminary study, we discover that when instructing language models to compress prompts, different compression styles (e.g., extractive or abstractive) impact performance of compressed prompts on downstream tasks. Building on this insight, we propose Style-Compress, a lightweight framework that adapts a smaller language model to compress prompts for a larger model on a new task without additional training. Our approach iteratively generates and selects effective compressed prompts as task-specific demonstrations through style variation and in-context learning, enabling smaller models to act as efficient compressors with task-specific examples. Style-Compress outperforms two baseline compression models in four tasks: original prompt reconstruction, text summarization, multi-hop QA, and CoT reasoning. In addition, with only 10 samples and 100 queries for adaptation, prompts compressed by Style-Compress achieve performance on par with or better than original prompts at a compression ratio of 0.25 or 0.5.

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

↑