Build and Train your own Diffusion Language Models!
dllm is an open-source library that lets you build, train, and evaluate diffusion-based language models without setting up complex pipelines or writing custom training loops.
Most language models today are autoregressive. They generate token by token, which makes training and inference fast but also leads to problems like exposure bias and difficulty maintaining global coherence.
Diffusion language models flip this approach.
Instead of predicting the next token, they denoise corrupted text over multiple steps until the full output is reconstructed. This gives them better global reasoning, fewer cascading errors, and stronger robustness on long-form tasks.
The challenge has always been tooling. Diffusion LMs require more complex training loops, noise schedules, and evaluation setups than typical transformers.
dllm solves that part.
It gives you a structured, reproducible pipeline for training and evaluating diffusion LMs without writing custom scaffolding.
Key Features:
• Full training workflow for diffusion LMs using clean configs
• Support for LoRA, DeepSpeed, and FSDP for scaling and efficiency
• Modular model components so you can test new diffusion architectures
• Simple dataset loading and experiment management
• Built-in evaluation utilities for comparing runs and ablations
Github Repo →