Nov 10, 2026
LLMs can now dream: inside LLM memory consolidation
If you work with language models, you know the pattern: months of pretraining, then the weights freeze and the knowledge cutoff is fixed the moment the model ships. Retrieval and long context patch over this, but nothing the model reads after deployment changes what it knows. Four 2026 papers attack that limit with a sleep phase for LLM memory consolidation. This breakdown walks through each mechanism, what the numbers show, and what still breaks.
Key takeaways
What: In Language Models Need Sleep, a sleep phase with dreaming lifts no-context SQuAD recall from 31.9% to 48.9%; remove the dreaming and it drops back to 35.7%.
Why it matters: Zyphra’s scaling law puts measurable plasticity loss at about 1.8T training tokens for a 1B model, so model size alone only delays the point where a model stops learning well.
How: Replay recent context offline to refine fast weights, distill those into new low-rank experts, then train on self-generated “dreams”.
What to do: Start with the released In-Place TTT code on an existing checkpoint; neither sleep paper links public code yet.
Also: Four offline sleep passes raise Ouro 1.4B from 41.9% to 61.5% on six-operation GSM-Infinite problems, with the same single forward pass at answer time.
Table 1: Papers at a glance.
Paper | Group | First posted | Models tested | Code |
|---|---|---|---|---|
Zyphra | June 23, 2026 | GPT-style, 5M to 314M | Not linked | |
In-Place Test-Time Training | ByteDance Seed, Peking University | April 7, 2026 | Qwen3-4B, Llama-3.1-8B, Qwen3-14B | Yes |
Do Language Models Need Sleep? | Carnegie Mellon, University of Maryland | May 25, 2026 | Jet-Nemotron 2B, Ouro 1.4B | Not linked |
Language Models Need Sleep | Google, Cornell | June 2, 2026 | Qwen3-1.7B, Qwen3-8B, Llama-3.2-1B | Not linked |
All four are arXiv preprints without peer review at the time of writing. The fourth notes that a version has been on OpenReview since September 2025.
Background you need
The papers share a vocabulary, and bycloud’s walkthrough is a good companion if you prefer video. Four terms carry the rest of the article:
Catastrophic forgetting: new training succeeds but damages what the model already knew.
Plasticity loss: the opposite failure, where long training makes the network progressively worse at learning anything new.
Fast weights: a small set of parameters that change while the model runs, sitting beside the frozen “slow” pretrained weights.
State space model (SSM) layer: a recurrent layer, such as Gated DeltaNet (GDN), that compresses the whole stream into a fixed-size matrix instead of a growing KV cache (the stored keys and values attention reads back).
Taken together, the four papers describe a ladder of memories (Fig 1). Information enters through the context window, moves into fast weights if it stays relevant, and only later reaches stable parameters.

Fig 1: The memory ladder. Each paper works on one rung. Information should move rightward only after it has proven useful.
The bottleneck: why can’t a deployed LLM keep learning?
Fine-tuning a deployed model over and over risks catastrophic forgetting, and Zyphra’s paper shows that scale alone doesn’t buy your way out. The team trained GPT-style transformers from 5M to 314M non-embedding parameters on a repeating cycle of eight languages: English, Chinese, French, Japanese, Spanish, German, Portuguese and Russian. Each pass through a language used a fresh 5B-token slice.
After every cycle, a copy of the model was trained on 5B tokens of Vietnamese, which never appears in the training sequence. How fast the Vietnamese loss falls measures plasticity. Early on, extra training helped. Then the trend reversed: the 5M and 12M models got worse at learning Vietnamese right after the first cycle, and the 83M model only after the seventh.
The researchers fit the onset of plasticity loss to model size (Eq. 1).

Eq. 1: Onset of plasticity loss.
where:
T is the task instance (one 5B-token language slice) at which plasticity loss becomes measurable
P is the number of non-embedding parameters
Plug in P = 1B and T comes out at about 360 task instances, or 1.8T tokens. A 7B model lands near 1,800 instances, about 9T tokens. The exponent is below 1, so doubling the model buys less than double the runway. The paper’s conclusion is blunt: “scale alone cannot save us from plasticity loss.” It also finds plasticity loss under stationary multilingual training, so the effect isn’t limited to abrupt task switches.
External memory doesn’t solve this either. Retrieval has to find the right fact, fit it into context and reason over it on every call, and some knowledge is useful in ways no query would think to ask for. That leaves one option: let some weights change, without letting all of them drift.
How does In-Place TTT turn an MLP into memory?
In-Place Test-Time Training reuses part of every transformer’s MLP as fast weights, so an existing checkpoint gains test-time learning without retraining from scratch. Earlier test-time training (TTT) designs added their own recurrent layers, which meant a new architecture and a full pretraining run.
The trick is in the gated MLP (Fig 2). The up and gate projections stay frozen. The down projection, which maps the expanded hidden state back to model width, becomes the fast weights. As the model reads, it splits the sequence into chunks. For each chunk it first computes outputs with the current down projection, then takes one gradient step on it.

Fig 2: In-Place TTT inside one MLP block. Only the down projection changes, once per chunk, so the architecture stays the same.
Two design choices make this practical. Because attention is untouched, updates happen per chunk rather than per token, and the ablations find 512 to 1,024 tokens per chunk works best. The update target also changed: older TTT methods trained fast weights to reconstruct the current token, while In-Place TTT uses a target built from future tokens, aligned with next-token prediction.
The authors continued training Qwen3-4B-Base for about 20B tokens at 32k context, then about 15B tokens at 128k, with and without In-Place TTT. On the RULER long-context benchmark, the gap widens with length: 74.3% to 78.7% at 64k, and 41.7% to 43.9% at 256k, beyond the training length. The code is public.
Builds on: TTT layers and chunk-wise linear attention, which treat a layer’s weights as a memory updated by gradient steps.
Intuition: the MLP keeps its general skills in two frozen matrices and takes notes on the current document in the third.
The catch is time. Writing into fast weights while reading means the memory gets one quick pass at each chunk. Information can be stored without being organized well enough for multi-step reasoning, and test time is the wrong moment to spend extra effort on it.
What happens when a model sleeps between context windows?
The CMU and Maryland paper, Do Language Models Need Sleep?, adds a pause: when the context window fills, the model stops reading and replays the same chunk several times to refine its fast weights. Only then does it delete the KV cache and continue. The authors call the number of replays the sleep duration, N.
The setup is a hybrid that interleaves attention blocks with SSM blocks. Attention gives exact, short-term recall of the current window. The SSM blocks hold a fixed-size state that carries compressed information across windows (Eq. 2).

Eq. 2: Fast-weight update in an SSM layer.
where:
Sₜ is the fixed-size fast-weight matrix after token t
αₜ and βₜ are data-dependent forget and input gates between 0 and 1
vₜ, kₜ and qₜ are the value, key and query for token t
The paper shows this simpler Mamba2-style form; its GDN layers add a delta-rule correction. Either way the state never grows, which is why it can outlive the KV cache. With N = 1 the model is an ordinary hybrid. With N = 4, every chunk passes through the looped blocks four times before eviction, and each pass can build on what the previous one wrote (Fig 3).

Fig 3: One wake, sleep and wake cycle. Only the SSM state survives the eviction, so everything the model needs later must be written there during sleep.
Rule 110: reasoning about states you can’t see
Rule 110 is a one-dimensional cellular automaton; predicting it after t steps is P-complete, with no known parallel shortcut. The model reads four unrelated 24-bit starting states, but the window is only 24 tokens, so each state is evicted before the next arrives. It must then output the first bit of every state after 32 updates, one forward pass per answer, with no chain of thought.
After nearly 5B training tokens, a 4-layer GDN-attention hybrid without sleep stayed near random at about 10% exact accuracy. Two sleep loops reached about 20%; three and four loops passed 30%. Context length, eviction rule and answer-time compute were identical across runs. The only difference was offline compute spent forming the memory.
GSM-Infinite: the same trend on pretrained models
GSM-Infinite generates math word problems padded with distractors that look relevant. Here each problem ran 2,000 to 3,300 tokens against a 2,000-token window, the question came first, and chain-of-thought traces were removed from training. The authors fine-tuned two pretrained models: the hybrid Jet-Nemotron 2B, looping its middle 14 of 28 blocks, and the looped Ouro 1.4B with six added Jet layers (under 10% more parameters).
Easy two- and four-operation problems often saturated regardless of N. The gains showed up on harder ones (Table 2).
Table 2: GSM-Infinite accuracy with and without sleep.
Model | Sleep passes (N) | 6 operations (%) | 8 operations (%) |
|---|---|---|---|
Jet-Nemotron 2B | 1 | 74.2 | 35.1 |
Jet-Nemotron 2B | 6 | 81.2 | 38.8 |
Ouro 1.4B | 1 | 41.9 | 21.0 |
Ouro 1.4B | 4 | 61.5 | 27.2 |
For Ouro, that is a 47% relative gain on six-operation problems. The extra work all happens during sleep, so answering still takes one forward pass and prediction latency stays the same.
Builds on: hybrid attention-SSM models and depth-recurrent “looped” transformers, here looping over fast weights rather than over activations.
Intuition: before throwing away its notes, the model rereads the chapter a few times and writes a better summary.
The remaining problem: the consolidated memory lives in the SSM state. Reset that state and the knowledge is gone. This is a strong working memory, not a change to what the model permanently knows.
Why does LLM memory consolidation need a slower tier?
Making knowledge permanent without overwriting old weights means giving it new parameters, and that is what Language Models Need Sleep does. The paper builds on the authors’ earlier Nested Learning work and its Hope architecture, which arrange MLP blocks as a continuum memory system: blocks that update often act as short-term parametric memory, and blocks that update rarely act as long-term memory.
Sleep has two stages. The first, knowledge seeding, moves knowledge from a fast block into the next slower one. The MLP blocks are sparse mixtures of experts. When it is time to consolidate, the slower block grows a new low-rank expert (two small matrices, much like a fresh LoRA adapter) reserved for the incoming knowledge. Older experts are never overwritten.
Compute, consolidate, update
The transfer follows a three-step protocol (Fig 4):
Compute the fast block’s scheduled weight update from its accumulated gradients, but hold it back.
Consolidate by building two versions of the model. The teacher is the model as it stands, temporary experts included. The student gets the pending update, has the fast block’s temporary experts reset, and carries the new low-rank expert in the slower block. Only that new expert trains, until the student behaves like the teacher.
Update by committing the held-back update, resetting the fast block’s temporary experts (the paper compares this to synaptic pruning) and activating the new expert.

Fig 4: The two stages of sleep. Seeding preserves what the model knew; dreaming tries to improve on it.
The authors call this upward distillation: a smaller self teaches a slightly larger self. The objective combines on-policy distillation from Generalized Knowledge Distillation with a reinforcement learning (RL) term. That term rewards the student for completing the teacher’s sampled outputs, scored on semantic match and on edit distance.
Builds on: Nested Learning’s continuum memory, mixture-of-experts routing, LoRA and on-policy distillation.
Intuition: instead of cramming new facts into a full shelf, the model builds a small new shelf and copies the notes onto it before tidying the desk.
Seeding has a ceiling, though. Its goal is for the student to match the teacher, so at best the model wakes up knowing what it already knew.
How does dreaming let an LLM teach itself?
Dreaming is the second stage: the model generates its own synthetic training data from what it just learned, keeps the samples most likely to help and trains on them with RL. A single passage gives little to train on, so dreaming expands it into many training examples.
The process extends SEAL, an earlier self-adapting language model, in three ways:
While generating dreams, every MoE router also picks one random expert, mixing unrelated knowledge into the sample.
Each dream gets an importance score from its training gradient; the top-k are kept, plus a few random ones for diversity.
Each kept dream fine-tunes an isolated LoRA copy of the model, and the dream is rewarded only if that copy improves on the task. The ReST-EM algorithm optimizes the process.
On knowledge incorporation, the model reads SQuAD passages, the passages are removed, and it answers questions about them (Fig 5).

Fig 5: Knowledge incorporation on SQuAD. Removing dreaming costs about 13 points with one passage and 10 with 200, close to plain fine-tuning.
With 200 passages and 974 questions, the four-level sleep model reaches 46.2%, against 43.2% for SEAL and 32.0% for plain fine-tuning. The paper samples five dreams per passage in this setting.
Builds on: SEAL’s self-edits and ReST-EM, plus gradient-based data selection.
Intuition: after studying, the model writes its own practice questions, mixes in old material and keeps only the drills that measurably help.
By the numbers
The paper’s math results come from its memory-consolidation experiments, reported as average over 16 samples. The other rows test the full sleep process.
Table 3: Results from Language Models Need Sleep.
Task | Model | Baseline | Strongest prior method | Sleep |
|---|---|---|---|---|
AIME 2024 (%) | Qwen3-1.7B | 49.8 | 51.6 (OPSD) | 53.2 |
AIME 2025 (%) | Qwen3-1.7B | 34.5 | 40.0 (OPSD) | 40.2 |
AIME 2024 (%) | Qwen3-8B | 73.8 | 76.6 (OPSD) | 79.2 |
AIME 2025 (%) | Qwen3-8B | 68.1 | 68.1 (GRPO) | 69.0 |
SQuAD, 1 passage (%) | Paper’s SQuAD setup | 31.9 | 46.7 (SEAL) | 48.9 |
ARC few-shot success (%) | Llama-3.2-1B | 0 (ICL) | 72.5 (SEAL) | 80 |
OPSD is on-policy self-distillation; GRPO is the group-relative RL method behind many reasoning models. Sleep also beats supervised fine-tuning and GRPO on every math benchmark at both sizes, including HMMT 2025 (29.3% vs. 25.7% base on Qwen3-1.7B).
What’s the catch?
Each mechanism moves cost somewhere else rather than removing it:
In the CMU paper, training throughput falls roughly in proportion to N on one H200 at 12,000-token sequences, and windows must be processed in order. The authors note deeper recurrence can make training slow and unstable.
Gains shrink with scale. On Qwen3-8B, AIME 2025 moves 0.9 points (68.1% to 69.0%), against 5.7 points on Qwen3-1.7B.
Every consolidation adds a low-rank expert, so the slower blocks get larger after each sleep.
Each candidate dream needs its own LoRA fine-tune and evaluation before it earns a reward.
Caveat: The 80% ARC result comes from 8 held-out tasks (with 11 for training), so one task flips the score by 12.5 points.
Limitations and open questions
Several things remain open across the four papers:
The largest sleep experiment uses an 8B model; the plasticity law is fit on models up to 314M and extrapolated beyond that.
What a sleep cycle would cost on a model serving live traffic remains an open question.
The SQuAD test runs one continued-pretraining pass over 200 passages, not months of repeated sleep.
Neither sleep paper links public code, so outside replication has to start from the papers.
A convincing replication would run many sleep cycles on a 7B-plus model and track both new-fact recall and older benchmarks over time.
What this means for your research
If you study continual learning, long-context memory or test-time compute, these papers give you a shared frame and some concrete baselines to beat.
Reproducing the results
In-Place TTT is the only one of the three methods with released code, and its drop-in recipe needs about 35B tokens of continued training on a 4B model. The CMU sleep method is reachable with open parts: Jet-Nemotron provides the hybrid model, and GDN layers ship in common linear-attention libraries.
Building on it
The open question is the boundary between rungs of Fig 1. When should information leave fast weights for permanent experts, and how many cycles can a model absorb before the new experts start to interfere? The SEAL codebase is the closest public starting point for dreaming experiments.
Next steps for your study
Each step below starts from public code:
Run the drop-in recipe from the In-Place TTT repository on a small Qwen3 checkpoint and compare RULER scores by context length.
Build an attention-GDN hybrid with flash-linear-attention and test whether extra passes before cache eviction help on a Rule 110 setup.
Start from Jet-Nemotron to try sleep loops on a pretrained hybrid.
Extend the SEAL code with random-expert sampling and gradient-based dream selection.
My take: I find the CMU result the most convincing of the four, because it isolates one variable: same window, same answer-time compute, more offline passes, better accuracy. The Google paper is more ambitious but stacks many components, and the ablations show dreaming does most of the work. I’d want to see the full sleep cycle repeated for weeks on a 7B model before calling knowledge cutoffs solved.
What to watch next
Three developments would show whether sleep moves beyond small-scale experiments:
Code releases for either sleep paper, which would allow independent replication.
Tests of the plasticity scaling law on billion-parameter models, where the paper’s extrapolation predicts onset near 1.8T tokens.
Sleep phases inside production hybrid models, which already interleave attention with SSM layers.
FAQ
Do language models really dream?
Not in a biological sense. In Language Models Need Sleep, “dreaming” means generating synthetic training data from recent knowledge, keeping the samples that improve the model, and training on them with RL.
How is plasticity loss different from catastrophic forgetting?
Catastrophic forgetting means learning something new erases old abilities. Plasticity loss means the network gets worse at learning anything new at all, even when old knowledge is intact.
Is sleep-time compute the same as test-time compute?
No. Test-time compute spends extra tokens or passes while producing the answer. Sleep-time compute spends them while consolidating memory, so in the CMU paper the answer itself still takes a single forward pass.
Can you try these methods on an open model today?
Partly. In-Place TTT has public code and was tested on Qwen3 and Llama checkpoints, while both sleep methods currently have to be rebuilt from their papers.