Needle in the Haystack for Memory Based Large Language Models

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Nelson, Elliot, Kollias, Georgios, Das, Payel, Chaudhury, Subhajit, Dan, Soham
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866914867436322816
author Nelson, Elliot
Kollias, Georgios
Das, Payel
Chaudhury, Subhajit
Dan, Soham
author_facet Nelson, Elliot
Kollias, Georgios
Das, Payel
Chaudhury, Subhajit
Dan, Soham
contents Current large language models (LLMs) often perform poorly on simple fact retrieval tasks. Here we investigate if coupling a dynamically adaptable external memory to a LLM can alleviate this problem. For this purpose, we test Larimar, a recently proposed language model architecture which uses an external associative memory, on long-context recall tasks including passkey and needle-in-the-haystack tests. We demonstrate that the external memory of Larimar, which allows fast write and read of an episode of text samples, can be used at test time to handle contexts much longer than those seen during training. We further show that the latent readouts from the memory (to which long contexts are written) control the decoder towards generating correct outputs, with the memory stored off of the GPU. Compared to existing transformer-based LLM architectures for long-context recall tasks that use larger parameter counts or modified attention mechanisms, a relatively smaller size Larimar is able to maintain strong performance without any task-specific training or training on longer contexts.
format Preprint
id arxiv_https___arxiv_org_abs_2407_01437
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Needle in the Haystack for Memory Based Large Language Models
Nelson, Elliot
Kollias, Georgios
Das, Payel
Chaudhury, Subhajit
Dan, Soham
Computation and Language
Artificial Intelligence
Machine Learning
Current large language models (LLMs) often perform poorly on simple fact retrieval tasks. Here we investigate if coupling a dynamically adaptable external memory to a LLM can alleviate this problem. For this purpose, we test Larimar, a recently proposed language model architecture which uses an external associative memory, on long-context recall tasks including passkey and needle-in-the-haystack tests. We demonstrate that the external memory of Larimar, which allows fast write and read of an episode of text samples, can be used at test time to handle contexts much longer than those seen during training. We further show that the latent readouts from the memory (to which long contexts are written) control the decoder towards generating correct outputs, with the memory stored off of the GPU. Compared to existing transformer-based LLM architectures for long-context recall tasks that use larger parameter counts or modified attention mechanisms, a relatively smaller size Larimar is able to maintain strong performance without any task-specific training or training on longer contexts.
title Needle in the Haystack for Memory Based Large Language Models
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2407.01437