FocusLLM:通过动态压缩实现对长上下文的精确理解
FocusLLM: Precise Understanding of Long Context by Dynamic Condensing
AI总结:
提出 FocusLLM 框架,通过分块、动态压缩和并行解码机制扩展 decoder-only LLM 的上下文长度,以更低训练成本实现长达 400K tokens 的长文本精确理解。
摘要:
赋予 LLMs 精确理解长上下文的能力对许多下游应用至关重要。然而,使用传统 transformer 架构处理长上下文需要大量的训练和推理资源。现有的上下文压缩方法无法准确理解完整上下文,因为压缩过程中存在大量信息损失。为了解决这些问题,我们提出了 FocusLLM,这是一个旨在扩展任何 decoder-only LLM 固定上下文长度的框架,使模型能够关注超长序列中的相关信息。FocusLLM 首先根据模型原始上下文长度将长文本输入分块。然后采用动态压缩过程从每个块中提取关键信息。最终,通过新颖的并行解码机制,FocusLLM 能将提取的信息整合到其局部上下文中。FocusLLM 以出色的训练效率和通用性脱颖而出:以 8K 输入长度进行训练,且训练成本远低于以往方法,FocusLLM 在下游任务中表现出卓越性能,并在处理长达 400K tokens 的超长文本时保持强大的语言建模能力。
英文摘要:
Empowering LLMs with the ability to precisely understand long contexts is crucial for many downstream applications. However, handling long contexts with conventional transformer architecture requires substantial training and inference resources. Existing context condensing methods cannot accurately understand the full context, as there is a considerable amount of information loss in the condensing process. To address these issues, we present FocusLLM, a framework designed to extend the fixed context length of any decoder-only LLM, allowing the model to focus on relevant information from very long sequences. FocusLLM first divides long text input into chunks based on the model's original context length. It then employs the dynamic condensing process to distill crucial information from each chunk. Ultimately, through the novel parallel decoding mechanism, FocusLLM can integrate the extracted information into its local context. FocusLLM stands out for great training efficiency and versatility: trained with an 8K input length and with much less training cost than previous methods, FocusLLM exhibits superior performance across downstream tasks and maintains strong language modeling ability when handling extensive long texts, even up to 400K tokens. Our code is available at https://github.com/leezythu/FocusLLM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。