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

绝缘Transformers

Memorizing Transformers

Google(谷歌)

Yuhuai Wu, Markus N. Rabe, DeLesley Hutchins, Christian Szegedy

摘要:

语言模型通常需要进行训练或微调以获取新知识,这涉及更新其权重。相反,我们设想语言模型可以在推理时简单地读取和记忆新数据,从而立即获得新知识。在这项工作中,我们扩展了语言模型的能力,记忆过去的输入的内部表示。我们证明了对最近(键,值)对的不可微记忆的近似kNN查找可以改善各种基准和任务的语言建模,包括通用网络文本(C4),数学论文(arXiv),书籍(PG-19),代码(Github)以及形式定理(Isabelle)。我们表明,当我们将内存大小增加到262 K令牌时,性能稳步提高。在包括代码和数学在内的基准测试中,我们发现该模型能够在测试期间使用新定义的函数和定理。

英文摘要:

Language models typically need to be trained or finetuned in order to acquire new knowledge, which involves updating their weights. We instead envision language models that can simply read and memorize new data at inference time, thus acquiring new knowledge immediately. In this work, we extend language models with the ability to memorize the internal representations of past inputs. We demonstrate that an approximate kNN lookup into a non-differentiable memory of recent (key, value) pairs improves language modeling across various benchmarks and tasks, including generic webtext (C4), math papers (arXiv), books (PG-19), code (Github), as well as formal theorems (Isabelle). We show that the performance steadily improves when we increase the size of memory up to 262K tokens. On benchmarks including code and mathematics, we find that the model is capable of making use of newly defined functions and theorems during test time.

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

↑