# Memory Grafting: Scaling Language Model Pre-training via Offline Conditional Memory

*Runxi Cheng, Yuchen Guan, Yongxian Wei, Qianpu Sun, Qixiu Li, Sinan Du, Feng Xiong, Chun Yuan, Yan Lu, Yeyun Gong*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149792) · [OpenReview](https://openreview.net/forum?id=nHzlhHtSTk) · [alphaXiv](https://www.alphaxiv.org/abs/2605.20948) · [Open on the map](../papers.html#p149792)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Efficient Language Model Scaling](../pgroup/329.md) · Type: new method · Keywords: knowledge transfer, language model pre-training, model scaling, structured memory, efficient training

Areas: [LLM Reasoning](../areas/reasoning.md) › Efficient Reasoning › Memory and Forgetting; [Memory](../areas/memory.md) › Agent Memory Systems › Memory Augmentation

## Summary
Memory Grafting extracts structured memories from a frozen large donor model and injects them into a compact student during pre-training, enabling more efficient scaling of language model training.

## Explained to a 5-year-old
Big computers learn a lot of things. Small computers have to learn everything again, which takes a long time. We found a way to copy the things the big computer already knows and give them to the small computer while it is learning. This helps the small computer learn faster and uses less energy. It means we can make smarter small models without needing huge amounts of data.

## Explained to a 5-year-old, longer
Big computers, like the ones that power chat programs, spend a lot of time reading many books and websites to learn how language works. They store all that knowledge inside them. When we want a smaller computer to do the same job, we usually have to teach it everything from scratch, which takes a lot of time and energy. We wanted a shortcut that lets the small computer use the knowledge the big computer already has. So we took the useful parts of the big computer's knowledge and gave them to the small computer while it was learning. This way, the small computer doesn't have to start from zero. It can learn faster because it already knows some tricks. This also saves electricity and reduces the amount of data needed. The new idea shows that knowledge can be split into pieces and moved between different sized models. It opens up a new way to make smaller language models that are still smart. By reusing knowledge, we can train models more efficiently and affordably. This could help many people build useful AI tools without huge computer farms.

## For a technical reader
The paper addresses the inefficiency of training compact language models from raw data by leveraging knowledge already present in larger pretrained models. It extracts structured representations from a frozen donor model and injects them into the student model during its training loop, effectively incorporating external knowledge into the optimization process. This differs from traditional distillation, which aligns outputs, and from retrieval-based methods, which only access external knowledge at inference time. The proposed paradigm enables modular and reusable knowledge transfer across model scales, potentially reducing training compute and data requirements. Experimental results demonstrate that this approach yields comparable performance to full fine-tuning while using significantly fewer parameters and less training data.

## Problem
Compact language models must relearn the rich knowledge acquired by large models during pre-training, which is computationally expensive. There is a need for a way to directly reuse pretrained knowledge during training rather than from raw data or distillation.

## Method
The approach extracts structured representations from a frozen large model and injects them into a smaller model throughout its training, making the knowledge part of the student's optimization process rather than relying on output alignment or external retrieval.

## Contributions
The work demonstrates that pretrained knowledge can be modular and transplantable across model scales, and proposes a new paradigm for efficient language model pre-training that integrates knowledge directly into the training process.

## Research questions this paper is counted under

- [How can we efficiently transfer or select knowledge in large language models to reduce computational cost?](../q/67.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/149792)
