mlsanityData to 14 Oct 2026

Titan-Llama: Retrofitting Pre-trained LLMs with External Neural Memory Modules

arXiv 2610.19210 ↗First posted 13 Oct 2026cs.CL cs.AIcited by 0

On the map: Efficient LLM inference and serving → KV cache optimization also fits: Early exit and edge inference

Abstract (arXiv)

Transformers are efficient to pre-train at scale because attention permits parallel computation across sequence positions, but long-context inference requires increasingly large KV caches. Efficient recurrent alternatives reduce the asymptotic complexity of inference, but their sequential dependence limits token-wise parallelism during training, making them harder to scale. Further, the current paradigm of extending long context tasks creates competing notions of retaining information precisely and keeping long-context inference efficient. To address this gap, we introduce Titan-Llama, a post-training method for retrofitting attention-based language models with a hierarchical memory architecture that updates parameters at test-time. Titan-Llama applies a blockwise attention mask and preserves full-fidelity attention over recent tokens while compressing historical context into recurrent, fixed-size neural memory modules (NMMs). Our formulation allows pre-trained attention layers to be replaced without training a new language model from scratch. On Llama-3.2-1B-Instruct, Titan-Llama raises accuracy over segmented attention windows from 23.87% to 40.51% on QuALITY and from 14.50% to 40.75% on LongHealth. Inference benchmarks show more than 20% faster prefill, 37% faster decode at medium context lengths, and 24% lower steady-state decode memory usage in the evaluated configurations. Together, these results demonstrate that incorporating memory architecture mechanisms that utilize test-time training effectively modulates long-context behavior of pre-trained models, offering a practical route to adapting pre-trained transformers for efficient long-context inference. Our code is released on Github hrefhttps://github.com/sarahpannn/titans-pytorch/tree/mainGitHub

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 25 of its 32 references that are in the map. First posted on arXiv 13 Oct 2026.

Builds on

25 of 32 references.

References · 25

  1. 2017Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networkscited by 4,897
  2. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  3. 2020Longformer: The Long-Document Transformercited by 3,413
  4. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  5. 2020Reformer: The Efficient Transformercited by 1,668
  6. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  7. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  8. 2023Splitwise: Efficient generative LLM inference using phase splittingcited by 558
  9. 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
  10. 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
  11. 2024Titans: Learning to Memorize at Test Timecited by 328
  12. 2021QuALITY: Question Answering with Long Input Texts, Yes!cited by 208
13 more
  1. 2022Recurrent Memory Transformercited by 203
  2. 2019Blockwise Self-Attention for Long Document Understandingcited by 159
  3. 2024LongAlign: A Recipe for Long Context Alignment of Large Language Modelscited by 106
  4. 2021Hierarchical Transformers Are More Efficient Language Modelscited by 102
  5. 2025Cartridges: Lightweight and general-purpose long context representations via self-studycited by 86
  6. 2025Dynamic Chunking for End-to-End Hierarchical Sequence Modelingcited by 72
  7. 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 67
  8. 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 66
  9. 2025End-to-End Test-Time Training for Long Contextcited by 62
  10. 2024SpaceByte: Towards Deleting Tokenization from Large Language Modelingcited by 34
  11. 2025LoongRL: Reinforcement Learning for Advanced Reasoning over Long Contextscited by 29
  12. 2026GradMem: Learning to Write Context into Memory with Test-Time Gradient Descentcited by 9
  13. 2026Mixture-of-Top-k Attention: Efficient Attention via Scalable Fast Weightscited by 2

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026CateKV: On Sequential Consistency for Long-Context LLM Inference Acceleration
  2. 2025Training-free Context-adaptive Attention for Efficient Long Context Modeling
  3. 2025RetroInfer: A Vector Storage Engine for Scalable Long-Context LLM Inference
  4. 2025DAM: Dynamic Attention Mask for Long-Context Large Language Model Inference Acceleration
  5. 2026Summarize Before You Speak with ARACH: A Training-Free Inference-Time Plug-In for Enhancing LLMs via Global Attention Reallocation
  6. 2026Context Memorization for Efficient Long Context Generation
  7. 2025Breaking Quadratic Barriers: A Non-Attention LLM for Ultra-Long Context Horizons
  8. 2026Sliding-window beats linear attention