Language Models Need Sleep: Learning to Self-Modify and Consolidate Memories A paper posted to arXiv on 2 June 2026 and revised 10 July 2026 proposes a "Sleep" paradigm that lets large language models continually learn by distilling short-term in-context memories into long-term parameters. The two-stage approach, from author Ali Behrouz, combines "Memory Consolidation" — a Knowledge Seeding process pairing on-policy distillation with reinforcement-learning-based imitation learning to move a smaller model's memories into a larger network — with a "Dreaming" self-improvement phase in which the model uses RL to generate synthetic-data curricula without human supervision. Experiments on long-horizon, continual learning, knowledge incorporation and few-shot generalization tasks support the importance of the sleep stage, the authors report. Computer Science Machine Learning Submitted on 2 Jun 2026 v1 https://arxiv.org/abs/2606.03979v1 , last revised 10 Jul 2026 this version, v2 Title:Language Models Need Sleep: Learning to Self-Modify and Consolidate Memories View PDF https://arxiv.org/pdf/2606.03979 HTML experimental https://arxiv.org/html/2606.03979v2 Abstract:The past few decades have witnessed significant advances in the design of machine learning algorithms, from early studies on task-specific shallow models to more general deep Large Language Models LLMs . Despite showing promising results in tasks that require instant prediction or in-context learning, existing models lack the ability to continually learn and effectively transfer their temporal in-context knowledge to their long-term parameters. Inspired by human learning process, we introduce a ''Sleep'' paradigm that allows the models to continually learn, distill their short-term fragile memories into stable long-term knowledge with replay, and recursively improve themselves with ''Dreaming'' process. In more detail, sleep consists of two stages: 1 Memory Consolidation: an upward distillation process, called Knowledge Seeding, where the memories of a smaller-self are distilled into a larger network to provide more capacity while preserving the knowledge. As a proof of concept, we present a new Generalized Distillation process for {Knowledge Seeding} i.e., the combination of on-policy distillation with Reinforcement Learning RL -based imitation learning ; 2 Dreaming: a self-improvement phase, where the model uses RL to generate a curriculum of synthetic data to rehearse new knowledge and refine existing capabilities without human supervision. Our experiments on long-horizon, continual learning, knowledge incorporation, and few-shot generalization tasks support the importance of the sleep stage. Submission history From: Ali Behrouz view email https://arxiv.org/show-email/8d432d4f/2606.03979 Tue, 2 Jun 2026 17:56:55 UTC 2,961 KB \ v1\ https://arxiv.org/abs/2606.03979v1 v2 Fri, 10 Jul 2026 17:52:03 UTC 2,961 KB References & Citations Loading... Bibliographic and Citation Tools Bibliographic Explorer What is the Explorer? https://info.arxiv.org/labs/showcase.html arxiv-bibliographic-explorer Connected Papers What is Connected Papers? https://www.connectedpapers.com/about Litmaps What is Litmaps? https://www.litmaps.co/ scite Smart Citations What are Smart Citations? https://www.scite.ai/ Code, Data and Media Associated with this Article alphaXiv What is alphaXiv? https://alphaxiv.org/ CatalyzeX Code Finder for Papers What is CatalyzeX? https://www.catalyzex.com DagsHub What is DagsHub? https://dagshub.com/ Gotit.pub What is GotitPub? http://gotit.pub/faq Hugging Face What is Huggingface? https://huggingface.co/huggingface ScienceCast What is ScienceCast? https://sciencecast.org/welcome Demos Recommenders and Search Tools Influence Flower What are Influence Flowers? https://influencemap.cmlab.dev/ CORE Recommender What is CORE? https://core.ac.uk/services/recommender IArxiv Recommender What is IArxiv? https://iarxiv.org/about arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs https://info.arxiv.org/labs/index.html .