← all repositories
DreamLM/Dream

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.

1.3k stars Python Language ModelsML Frameworks
Dream
Not currently ranked — collecting fresh signals.
star history

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, and entropy
  • Runs as a Hugging Face transformers model with AutoModel and AutoTokenizer
  • Intermediate hooks for generation_logits_hook_func and generation_tokens_hook_func allow step-level guidance
  • Ecosystem includes Dream-Coder for code and DreamOn for 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 transformers and torch versions 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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.