Memory Grafting: Scaling Language Model Pre-training via Offline Conditional Memory
On the map: Mixture-of-experts → MoE large language models
Abstract (arXiv)
Scaling conditional memory offers a promising way to increase language-model capacity, but existing methods such as Engram learn large memory tables from scratch during pre-training, making memory scaling expensive and sometimes ineffective. We propose Memory Grafting, a conditional memory scaling method that utilizes frozen hidden states from a grafting model as conditional n-gram memory. Given frequent local n-grams, we run the grafting model offline, store final-token hidden representations as memory values, and let the recipient model retrieve them through exact longest-match suffix lookup. Retrieved memories are adapted by lightweight projections and gates, while a hash-based Engram fallback preserves coverage for unmatched contexts. Since the grafting model is only run offline and exact lookup has expected O(1) complexity with respect to memory-bank size, Memory Grafting expands external latent capacity with limited training and inference overhead. Experiments under matched recipient architectures and pre-training budgets show that Memory Grafting improves over both MoE and vanilla Engram baselines. In the 2.8B-scale setting, it improves the average benchmark score from 51.95 for MoE and 52.43 for vanilla Engram to 53.86. In the 0.92B-scale setting, all grafting-model variants improve over the baselines, with Qwen3.5-35B-A3B giving the strongest gains. These results suggest that pretrained models can serve as reusable constructors of external latent memory, providing a practical step toward scaling future language models beyond trainable parameters alone.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in MoE large language models, one of 12 directions in Mixture-of-experts. Builds on 42 of its 53 references that are in the map. First posted on arXiv 20 May 2026.
Builds on
42 of 53 references.
Closest ancestors · 4
Same direction, newest first
- 2026Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models12 Jan
- 2024Open-RAG: Enhanced Retrieval-Augmented Reasoning with Open-Source Large Language Models2 Oct
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model7 May
- 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models11 Jan
Other references · 38
- 2017Attention Is All You Needcited by 60,361
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2020Scaling Laws for Neural Language Modelscited by 6,586
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
- 2022Training Compute-Optimal Large Language Modelscited by 3,019
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
26 more
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
- 2019Root Mean Square Layer Normalizationcited by 1,480
- 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Toolscited by 1,121
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
- 2017Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learningcited by 950
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 861
- 2025GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Modelscited by 467
- 2024Nemotron-CC: Transforming Common Crawl into a Refined Long-Horizon Pretraining Datasetcited by 160
- 2024Infini-gram: Scaling Unbounded n-gram Language Models to a Trillion Tokenscited by 153
- 2019Large Memory Layers with Product Keyscited by 124
- 2022Reliability of CKA as a Similarity Measure in Deep Learningcited by 87
- 2023ReLLa: Retrieval-enhanced Large Language Models for Lifelong Sequential Behavior Comprehension in Recommendationcited by 77
- 2025Whoever Started the Interference Should End It: Guiding Data-Free Model Merging via Task Vectorscited by 62
- 2025Modeling Multi-Task Model Merging as Adaptive Projective Gradient Descentcited by 39
- 2024Pre-training Distillation for Large Language Models: A Design Space Explorationcited by 27
- 2023Chameleon: a Heterogeneous and Disaggregated Accelerator System for Retrieval-Augmented Language Modelscited by 23
- 2024Multi-Task Model Merging via Adaptive Weight Disentanglementcited by 22
- 2024Accelerating Retrieval-Augmented Language Model Serving with Speculationcited by 20
- 2024Ultra-Sparse Memory Networkcited by 19
- 2025HS-STaR: Hierarchical Sampling for Self-Taught Reasoners via Difficulty Estimation and Budget Reallocationcited by 18
- 2025Mixture of Lookup Expertscited by 12
- 2026STEM: Scaling Transformers with Embedding Modulescited by 12
- 2025Learning to Pose Problems: Reasoning-Driven and Solver-Adaptive Data Synthesiscited by 8
- 2025Distilled Pretraining: A modern lens of Data, In-Context Learning and Test-Time Scalingcited by 7
- 2025How Users Who are Blind or Low Vision Play Mobile Games: Perceptions, Challenges, and Strategiescited by 3
- 2025Understanding How Visually Impaired Players Socialize in Mobile Gamescited by 1
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026From Content to Knowledge: Lightning Fast Long-Video Understanding with Neural Knowledge Representationscited by 0
- 2026FactorEngram: Factorized N-gram Memory with Basis-Level Gating for Language Modelscited by 0
- 2026Forking: Sudden Overfitting Under Replaycited by 0
- 2026Towards In-Parameter Memory Augmentation for Large Language Modelscited by 0
- 2026EngramEdit: Decoupled Knowledge Updates in LLMs through Conditional Memorycited by 0
- 2026EngramEdit: Decoupled Knowledge Updates in LLMs through Conditional Memory7 Oct 2026
- 2026Towards In-Parameter Memory Augmentation for Large Language Models6 Oct 2026
- 2026Forking: Sudden Overfitting Under Replay30 Sep 2026
- 2026FactorEngram: Factorized N-gram Memory with Basis-Level Gating for Language Models28 Sep 2026
- 2026From Content to Knowledge: Lightning Fast Long-Video Understanding with Neural Knowledge Representations10 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2026Memory Decoder at Scale: A Pretrained, Parametric Long-Term Memory
- 2026Hidden Decoding at Scale: Latent Computation Scaling for Large Language Models
- 2025Pretraining with hierarchical memories: separating long-tail and common knowledge
- 2025Efficient Pretraining Length Scaling
- 2026TransMem: Transforming Hidden States into Memory for Large Language Models
- 2024Memory3: Language Modeling with Explicit Memory
- 2026MoME: Mixture-of-Memory Embeddings for Context-Aware Sparse Lookup
- 2026TF-Engram: A Train-Free Engram with SSD-Backed Memory for Large Language Models