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

LongAgent:通过多智能体协作将语言模型扩展到128k上下文

LongAgent: Scaling Language Models to 128k Context through Multi-Agent Collaboration

School of Computer Science, Fudan University(复旦大学计算机科学学院);Institute of Modern Languages and Linguistics, Fudan University(复旦大学现代语言与语言学研究所)

Jun Zhao, Can Zu, Hao Xu, Yi Lu, Wei He, Yiwen Ding, Tao Gui, Qi Zhang, Xuanjing Huang

AI总结:

本文提出基于多智能体协作的LongAgent方法,将LLM上下文扩展至128K,通过成员间通信解决幻觉冲突,在长文本检索和多跳问答上优于GPT-4。

摘要:

大型语言模型(LLMs)在理解语言和执行复杂推理任务方面展现了令人印象深刻的表现。然而,具有长上下文窗口的LLMs因其昂贵的训练成本和高推理延迟而闻名。即使是诸如GPT-4和Claude2等最先进的模型,在处理超过100k个令牌的输入时也常常出错,这一现象也被称为“lost in the middle”(中间丢失)。在本文中,我们提出了LongAgent,一种基于多智能体协作的方法,它将LLMs(例如LLaMA)扩展到128K的上下文,并在长文本处理方面展现出相比GPT-4的潜在优越性。在LongAgent中,一个领导者负责理解用户意图并指导团队成员从文档中获取信息。由于成员存在幻觉,领导者从数十到数百名成员的响应中获取准确信息并非易事。为了解决这个问题,我们开发了一种成员间通信机制,通过信息共享来解决由幻觉引起的响应冲突。我们的实验结果表明,LongAgent为长文本处理提供了一种有前景的替代方案。使用LLaMA-7B实例化的智能体团队在128k长文本检索、多跳问答等任务上相比GPT-4取得了显著改进。

英文摘要:

Large language models (LLMs) have demonstrated impressive performance in understanding language and executing complex reasoning tasks. However, LLMs with long context windows have been notorious for their expensive training costs and high inference latency. Even the most advanced models such as GPT-4 and Claude2 often make mistakes when processing inputs of over $100k$ tokens, a phenomenon also known as \textit{lost in the middle}. In this paper, we propose \textsc{LongAgent}, a method based on multi-agent collaboration, which scales LLMs (e.g., LLaMA) to a context of 128K and demonstrates potential superiority in long-text processing compared to GPT-4. In \textsc{LongAgent}, a leader is responsible for understanding user intent and directing team members to acquire information from documents. Due to members' hallucinations, it is non-trivial for a leader to obtain accurate information from the responses of dozens to hundreds of members. To address this, we develop an \textit{inter-member communication} mechanism to resolve response conflicts caused by hallucinations through information sharing. Our experimental results indicate that \textsc{LongAgent} offers a promising alternative for long-text processing. The agent team instantiated with LLaMA-7B achieves significant improvements in tasks such as 128k-long text retrieval, multi-hop question answering, compared to GPT-4.

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

↑