A 7B language model that diffuses text instead of predicting it
It swaps next-token prediction for iterative denoising across an entire sequence, arguing diffusion can rival autoregressive quality at 7B scale.

What it does
Dream 7B is a 7-billion-parameter language model that uses diffusion sampling instead of standard autoregressive generation. It produces text through iterative timesteps via a diffusion_generate() method, remasking and refining tokens according to confidence or entropy-based strategies. The weights load through standard Hugging Face transformers classes, and the project now ships with training and fine-tuning code.
The interesting bit
Unlike conventional unidirectional generation, Dream can fill tokens anywhere in the sequence at each step, using remasking strategies such as entropy or topk_margin. The README also exposes hook functions for custom logit and token control at intermediate steps, which makes the pipeline feel closer to discrete image diffusion than a classic LLM rollout.
Key highlights
- 7B parameters with performance the authors describe as competitive with leading same-size autoregressive models
- Four remasking strategies:
origin(random),maskgit_plus(top-1 confidence),topk_margin, andentropy - Runs as a Hugging Face
transformersmodel withAutoModelandAutoTokenizer - Intermediate hooks for
generation_logits_hook_funcandgeneration_tokens_hook_funcallow step-level guidance - Ecosystem includes
Dream-Coderfor code andDreamOnfor variable-length generation and infilling
Caveats
- Requires a GPU with at least 20 GB of memory just to run inference
- Total context length is limited to 2048 tokens for input plus output
- Only specific
transformersandtorchversions are tested; others are explicitly not guaranteed
Verdict
Researchers and hackers curious about non-autoregressive text generation should take a look. If you just need a drop-in replacement for a standard 7B chat model and are VRAM-constrained, the hardware requirements and 2048-token limit may grate.
Frequently asked
- What is DreamLM/Dream?
- It swaps next-token prediction for iterative denoising across an entire sequence, arguing diffusion can rival autoregressive quality at 7B scale.
- Is Dream open source?
- Yes — DreamLM/Dream is open source, released under the Apache-2.0 license.
- What language is Dream written in?
- DreamLM/Dream is primarily written in Python.
- How popular is Dream?
- DreamLM/Dream has 1.3k stars on GitHub.
- Where can I find Dream?
- DreamLM/Dream is on GitHub at https://github.com/DreamLM/Dream.