arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.01178cs.CLcs.AIcs.LG
收藏

$\ ext{Memory}^3$:基于显式记忆的语言建模

$\text{Memory}^3$: Language Modeling with Explicit Memory

Institute for Advanced Algorithms Research(高级算法研究院);Moqi Inc(墨奇科技);Peking University(北京大学);AI for Science Institute(人工智能科学研究院)
Hongkang Yang, Zehao Lin, Wenjin Wang, Hao Wu, Zhiyu Li, Bo Tang, Wenqiang Wei, Jinbo Wang, Zeyun Tang, Shichao Song, Chenyang Xi, Yu Yu, Kai Chen, Feiyu Xiong,… 展开作者

Hongkang Yang, Zehao Lin, Wenjin Wang, Hao Wu, Zhiyu Li, Bo Tang, Wenqiang Wei, Jinbo Wang, Zeyun Tang, Shichao Song, Chenyang Xi, Yu Yu, Kai Chen, Feiyu Xiong, Linpeng Tang, Weinan E

AI总结:

受人脑记忆层级启发,本文提出为LLMs配备显式记忆以降低训练与推理成本,并从零训练了2.4B的$\ ext{Memory}^3$模型,其性能超越更大模型及RAG且解码更快,同时引入记忆回路理论及记忆稀疏化等新技术支持知识外化。

摘要:

大型语言模型(LLMs)的训练和推理共同构成一个将知识从原始数据传输至有意义计算的昂贵过程。受人脑记忆层级的启发,我们通过为LLMs配备显式记忆来降低这一成本,这是一种比模型参数和文本检索增强生成(RAG)更便宜的记忆格式。概念上,由于大部分知识被外化至显式记忆中,LLM能够享有更小的参数规模、训练成本和推理成本,且均与剩余的“抽象知识”量成正比。作为初步的概念验证,我们从零开始训练了一个2.4B的LLM,其性能优于大得多的LLMs以及RAG模型,并保持比RAG更高的解码速度。该模型被命名为$\ ext{Memory}^3$,因为显式记忆是继隐式记忆(模型参数)和工作记忆(上下文键值)之后LLMs中的第三种记忆形式。我们引入了记忆回路理论来支持知识的外化,并提出了包括使存储变得可处理的记忆稀疏化机制,以及促进记忆形成的两阶段预训练方案等新技术。

英文摘要:

The training and inference of large language models (LLMs) are together a costly process that transports knowledge from raw data to meaningful computation. Inspired by the memory hierarchy of the human brain, we reduce this cost by equipping LLMs with explicit memory, a memory format cheaper than model parameters and text retrieval-augmented generation (RAG). Conceptually, with most of its knowledge externalized to explicit memories, the LLM can enjoy a smaller parameter size, training cost, and inference cost, all proportional to the amount of remaining "abstract knowledge". As a preliminary proof of concept, we train from scratch a 2.4B LLM, which achieves better performance than much larger LLMs as well as RAG models, and maintains higher decoding speed than RAG. The model is named $\text{Memory}^3$, since explicit memory is the third form of memory in LLMs after implicit memory (model parameters) and working memory (context key-values). We introduce a memory circuitry theory to support the externalization of knowledge, and present novel techniques including a memory sparsification mechanism that makes storage tractable and a two-stage pretraining scheme that facilitates memory formation.

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

↑