arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.00592cs.CL
收藏

M+:用可扩展的长期记忆扩展 MemoryLLM

M+: Extending MemoryLLM with Scalable Long-Term Memory

UC, San Diego(加州大学圣地亚哥分校);IBM Research(IBM研究院);Amazon(亚马逊);OPPO

Yu Wang, Dmitry Krotov, Yuanzhe Hu, Yifan Gao, Wangchunshu Zhou, Julian McAuley, Dan Gutfreund, Rogerio Feris, Zexue He

AI总结:

针对 MemoryLLM 难以保留超 20k tokens 长期知识的问题,本文提出 M+ 模型,通过结合长期记忆机制与协同训练的检索器,在生成时动态检索相关信息,在相近 GPU 开销下将知识保留扩展至 160k tokens 以上。

摘要:

为大型语言模型(LLM)配备潜空间记忆引起了越来越多的关注,因为它们可以扩展现有语言模型的上下文窗口。然而,保留来自遥远过去的信息仍然是一个挑战。例如,MemoryLLM(Wang et al., 2024a)作为一项具有潜空间记忆的代表性工作,将过去的信息压缩到所有层的隐藏状态中,形成了一个包含 1B 参数的记忆池。虽然这对于长达 16k tokens 的序列长度很有效,但它难以保留超过 20k tokens 的知识。在这项工作中,我们通过引入 M+ 来解决这一限制,这是一种基于 MemoryLLM 的记忆增强模型,能够显著增强长期信息保留能力。M+ 将长期记忆机制与协同训练的检索器相结合,在文本生成过程中动态检索相关信息。我们在包括长上下文理解和知识保留任务在内的多种基准上评估了 M+。实验结果表明,M+ 显著优于 MemoryLLM 和近期强大的基线模型,在相似的 GPU 内存开销下,将知识保留从 20k 以下扩展到 160k tokens 以上。我们在 https://github.com/wangyu-ustc/MemoryLLM 开源了我们的代码。

英文摘要:

Equipping large language models (LLMs) with latent-space memory has attracted increasing attention as they can extend the context window of existing language models. However, retaining information from the distant past remains a challenge. For example, MemoryLLM (Wang et al., 2024a), as a representative work with latent-space memory, compresses past information into hidden states across all layers, forming a memory pool of 1B parameters. While effective for sequence lengths up to 16k tokens, it struggles to retain knowledge beyond 20k tokens. In this work, we address this limitation by introducing M+, a memory-augmented model based on MemoryLLM that significantly enhances long-term information retention. M+ integrates a long-term memory mechanism with a co-trained retriever, dynamically retrieving relevant information during text generation. We evaluate M+ on diverse benchmarks, including long-context understanding and knowledge retention tasks. Experimental results show that M+ significantly outperforms MemoryLLM and recent strong baselines, extending knowledge retention from under 20k to over 160k tokens with similar GPU memory overhead. We open-source our code at https://github.com/wangyu-ustc/MemoryLLM

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

↑