CAMELoT: Towards Large Language Models with Training-Free Consolidated Associative Memory

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: He, Zexue, Karlinsky, Leonid, Kim, Donghyun, McAuley, Julian, Krotov, Dmitry, Feris, Rogerio
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866929250467053568
author He, Zexue
Karlinsky, Leonid
Kim, Donghyun
McAuley, Julian
Krotov, Dmitry
Feris, Rogerio
author_facet He, Zexue
Karlinsky, Leonid
Kim, Donghyun
McAuley, Julian
Krotov, Dmitry
Feris, Rogerio
contents Large Language Models (LLMs) struggle to handle long input sequences due to high memory and runtime costs. Memory-augmented models have emerged as a promising solution to this problem, but current methods are hindered by limited memory capacity and require costly re-training to integrate with a new LLM. In this work, we introduce an associative memory module which can be coupled to any pre-trained (frozen) attention-based LLM without re-training, enabling it to handle arbitrarily long input sequences. Unlike previous methods, our associative memory module consolidates representations of individual tokens into a non-parametric distribution model, dynamically managed by properly balancing the novelty and recency of the incoming data. By retrieving information from this consolidated associative memory, the base LLM can achieve significant (up to 29.7% on Arxiv) perplexity reduction in long-context modeling compared to other baselines evaluated on standard benchmarks. This architecture, which we call CAMELoT (Consolidated Associative Memory Enhanced Long Transformer), demonstrates superior performance even with a tiny context window of 128 tokens, and also enables improved in-context learning with a much larger set of demonstrations.
format Preprint
id arxiv_https___arxiv_org_abs_2402_13449
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CAMELoT: Towards Large Language Models with Training-Free Consolidated Associative Memory
He, Zexue
Karlinsky, Leonid
Kim, Donghyun
McAuley, Julian
Krotov, Dmitry
Feris, Rogerio
Computation and Language
Large Language Models (LLMs) struggle to handle long input sequences due to high memory and runtime costs. Memory-augmented models have emerged as a promising solution to this problem, but current methods are hindered by limited memory capacity and require costly re-training to integrate with a new LLM. In this work, we introduce an associative memory module which can be coupled to any pre-trained (frozen) attention-based LLM without re-training, enabling it to handle arbitrarily long input sequences. Unlike previous methods, our associative memory module consolidates representations of individual tokens into a non-parametric distribution model, dynamically managed by properly balancing the novelty and recency of the incoming data. By retrieving information from this consolidated associative memory, the base LLM can achieve significant (up to 29.7% on Arxiv) perplexity reduction in long-context modeling compared to other baselines evaluated on standard benchmarks. This architecture, which we call CAMELoT (Consolidated Associative Memory Enhanced Long Transformer), demonstrates superior performance even with a tiny context window of 128 tokens, and also enables improved in-context learning with a much larger set of demonstrations.
title CAMELoT: Towards Large Language Models with Training-Free Consolidated Associative Memory
topic Computation and Language
url https://arxiv.org/abs/2402.13449