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

通过指令感知上下文压缩增强和加速大型语言模型

Enhancing and Accelerating Large Language Models via Instruction-Aware Contextual Compression

Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ)(广东省人工智能与数字经济实验室(深圳))

Haowen Hou, Fei Ma, Binwen Bai, Xinxin Zhu, Fei Yu

AI总结:

本文提出Instruction-Aware Contextual Compression方法,通过过滤低信息量内容来压缩上下文,在保持性能的同时显著降低内存消耗和推理延迟,实现效率与性能的有效平衡。

摘要:

大型语言模型(LLMs)因其在各种任务上的卓越表现而受到广泛关注。然而,为了缓解幻觉问题,LLMs通常结合检索增强流水线,为其提供丰富的外部知识和上下文。尽管如此,挑战源于检索器获取的不准确且粗粒度的上下文。向LLMs提供无关上下文会导致响应质量下降、推理延迟增加以及成本上升。本文提出了一种名为Instruction-Aware Contextual Compression的方法,该方法过滤掉信息量较少的内容,从而加速并增强LLMs的使用。实验结果表明,Instruction-Aware Contextual Compression显著降低了内存消耗并最小化了生成延迟,同时保持与使用完整上下文相当的性能水平。具体而言,我们实现了上下文相关成本降低50%,推理内存使用减少5%,推理速度提升2.2倍,而Rouge-1仅小幅下降0.047。这些发现表明,我们的方法在效率和性能之间取得了有效平衡。

英文摘要:

Large Language Models (LLMs) have garnered widespread attention due to their remarkable performance across various tasks. However, to mitigate the issue of hallucinations, LLMs often incorporate retrieval-augmented pipeline to provide them with rich external knowledge and context. Nevertheless, challenges stem from inaccurate and coarse-grained context retrieved from the retriever. Supplying irrelevant context to the LLMs can result in poorer responses, increased inference latency, and higher costs. This paper introduces a method called Instruction-Aware Contextual Compression, which filters out less informative content, thereby accelerating and enhancing the use of LLMs. The experimental results demonstrate that Instruction-Aware Contextual Compression notably reduces memory consumption and minimizes generation latency while maintaining performance levels comparable to those achieved with the use of the full context. Specifically, we achieved a 50% reduction in context-related costs, resulting in a 5% reduction in inference memory usage and a 2.2-fold increase in inference speed, with only a minor drop of 0.047 in Rouge-1. These findings suggest that our method strikes an effective balance between efficiency and performance.

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

↑