---
title: "The sleep framework: A new way for LLMs to retain knowledge in continual learning"
description: "A sleep phase for continual learning alternates LLM operation between an active (wake) phase that stores information in fast short-term memory and an offline sleep phase that consolidates it into long-term parameters."
url: "https://swe.quest/articles/the-sleep-framework-a-new-way-for-llms-to-retain-knowledge-in-continual-learning-b15c6213801b74cb"
canonical: "https://research.google/blog/the-sleep-framework-a-new-way-for-llms-to-retain-knowledge-in-continual-learning/"
source: "Google Research"
published: "2026-10-27"
difficulty: "hard"
kind: "Research"
reading_minutes: 7
tags: ["model-training","llms","machine-learning"]
---

# The sleep framework: A new way for LLMs to retain knowledge in continual learning

A post on [Google Research](https://swe.quest/sources/google-research.md), published 2026-10-27, 7 min read, Research. Original: [https://research.google/blog/the-sleep-framework-a-new-way-for-llms-to-retain-knowledge-in-continual-learning/](https://research.google/blog/the-sleep-framework-a-new-way-for-llms-to-retain-knowledge-in-continual-learning/)

## Summary

A sleep phase for continual learning alternates LLM operation between an active (wake) phase that stores information in fast short-term memory and an offline sleep phase that consolidates it into long-term parameters. Consolidation unlocks low-rank Mixture-of-Experts memory blocks, distills in-context memory into them via on-policy Generalized Knowledge Distillation plus RL-based imitation learning rewarded by semantic and Levenshtein similarity, then resets the short-term parameters. A 'dreaming' stage generates synthetic samples with randomly routed experts, filters them by gradient-based selection, and refines the model with SFT and RL. Reported results include near-zero forgetting on continual translation for unseen languages like Manchu and Kalamang, near-perfect BABILong scaling to 10M tokens, better factual incorporation than SFT and SEAL on SQuAD, and 79.2%/69.0%/46.1% on AIME 24/25 and HMMT 25.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)

## Prerequisites

- catastrophic forgetting
- knowledge distillation
- Mixture-of-Experts
- RL fine-tuning of LLMs ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))

## Keywords

Mixture-of-Experts, Hope architecture, Generalized Knowledge Distillation, BABILong, Titans, SEAL, GRPO

## Related posts

- [Making Knowledge Distillation Cheap Enough to Run at Scale](https://swe.quest/articles/making-knowledge-distillation-cheap-enough-to-run-at-scale-f55a4297b4be9cef.md): Hugging Face · 2026-08-10 · Hard · 8 min read · Model training, LLMs, Performance engineering, Memory management
  Two systems changes make LLM knowledge distillation far cheaper: caching the teacher's top-100 logits offline so the teacher never shares memory with the student, and a fused chunked KL loss that folds the output projection into the loss and recomputes chunks in the backward pass, so the full vocabulary × sequence logits grid is never materialized.
- [Mitigating memorization in LLMs](https://swe.quest/articles/mitigating-memorization-in-llms-72b97a002db22906.md): Jane Street Tech Blog · 2026-09-30 · Hard · 6 min read · LLMs, Evaluation, Model training, AI safety
  LLMs evaluated on historical prediction benchmarks can score well by recalling memorized outcomes from pretraining rather than reasoning, so an intern project measured and tried to mitigate this using a cricket match-preview dataset, comparing accuracy before and after the model's knowledge cutoff.
- [Together AI expands fine-tuning service with more models, live metrics, and finer controls](https://swe.quest/articles/together-ai-expands-fine-tuning-service-with-more-models-live-metrics-and-finer-30dc413ddac46c8c.md): Together AI · 2026-09-11 · Medium · 10 min read · Model training, LLMs, ML platforms
  Together Fine-Tuning adds support for new open-weight models (GLM-5.3, Kimi K2.7, Qwen 3.5/3.6/3.8, Gemma 4, DeepSeek-V4-Flash), live per-step metrics via API, CLI and dashboard, and new training controls.
- [Consistency diffusion language models: Up to 14x faster inference without sacrificing quality](https://swe.quest/articles/consistency-diffusion-language-models-up-to-14x-faster-inference-without-729cf6964ed22edf.md): Together AI · 2026-02-19 · Hard · 6 min read · Inference & serving, LLMs, Model training, Performance engineering
  Consistency diffusion language models (CDLM) speed up diffusion LLM inference by post-training a block-wise causal student that can finalize multiple tokens per step and use exact block-wise KV caching.
- [Granite 4.1 LLMs: How They’re Built](https://swe.quest/articles/granite-4-1-llms-how-they-re-built-67acb17697f52ad3.md): Hugging Face · 2026-04-29 · Hard · 14 min read · Model training, LLMs, Evaluation
  Granite 4.1 is IBM's family of dense decoder-only LLMs (3B, 8B, 30B) trained on ~15T tokens through five pre-training phases that shift from web-heavy data to math/code, high-quality annealing with chain-of-thought and instruction data, and staged long-context extension to 512K with model merging after each stage.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
