Extended Mind Transformers

Phoebe Klett, Thomas Ahle
6/4/2024
cs.LGcs.CL

No official code found. Best implementation: normal-computing/extended-mind-transformers (130 stars, Apache-2.0, last commit 2024-08-06).

Abstract

Pre-trained language models demonstrate general intelligence and common sense, but long inputs quickly become a bottleneck for memorizing information at inference time. We resurface a simple method, Memorizing Transformers (Wu et al., 2022), that gives the model access to a bank of pre-computed memories. We show that it is possible to fix many of the shortcomings of the original method, such as the need for fine-tuning, by critically assessing how positional encodings should be updated for the keys and values retrieved. This intuitive method uses the model's own key/query system to select and attend to the most relevant memories at each generation step, rather than using external embeddings. We demonstrate the importance of external information being retrieved in a majority of decoder layers, contrary to previous work. We open source a new counterfactual long-range retrieval benchmark, and show that Extended Mind Transformers outperform today's state of the art by 6% on average.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
13010Python, Jupyter NotebookJun 3, 20242 years agoApache-2.0

Similar Papers

Cite this paper

@article{klett2024extended,
  title  = {Extended Mind Transformers},
  author = {Phoebe Klett and Thomas Ahle},
  year   = {2024},
  eprint = {2406.02332},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.02332v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.02332.svg)](https://codeofpaper.com/paper/2406.02332)

Discussion