Source-linked AI summary
dLLM: Simple Diffusion Language Modeling
Zhanhui Zhou, Lingjie Chen, Hanghang Tong, Dawn Song
TL;DR
DLM research lacks unified, transparent components for reproducing and extending training, inference, and evaluation. dLLM addresses this gap with a modular framework, reproducible conversion recipes, and released checkpoints; its evaluation pipeline closely matches official results, while converted AR models can yield competitive DLMs with SFT alone.
Problem
DLM components are often scattered across ad-hoc codebases or implemented opaquely, while evaluation tools and inference settings vary across models.
Method
dLLM unifies training, inference, and evaluation through modular trainers, a plug-and-play sampler abstraction, and reproducible recipes for converting pretrained encoders or autoregressive models into DLMs.
Results
The framework closely matches official evaluation results and produces competitive converted DLMs from autoregressive models using SFT alone and no continual pretraining.
Takeaways & Limitations
dLLM lowers the barrier to reproducing, finetuning, comparing, and developing DLMs with accessible compute.
Abstract
from arXiv · showhide
Although diffusion language models (DLMs) are evolving quickly, many recent models converge on a set of shared components. These components, however, are distributed across ad-hoc research codebases or lack transparent implementations, making them difficult to reproduce or extend. As the field accelerates, there is a clear need for a unified framework that standardizes these common components while remaining flexible enough to support new methods and architectures. To address this gap, we introduce dLLM, an open-source framework that unifies the core components of diffusion language modeling -- training, inference, and evaluation -- and makes them easy to customize for new designs. With dLLM, users can reproduce, finetune, deploy, and evaluate open-source large DLMs such as LLaDA and Dream through a standardized pipeline. The framework also provides minimal, reproducible recipes for building small DLMs from scratch with accessible compute, including converting any BERT-style encoder or autoregressive LM into a DLM. We also release the checkpoints of these small DLMs to make DLMs more accessible and accelerate future research.
1 Introduction
dLLM addresses fragmented and opaque DLM implementations with a standardized, modular framework for training, inference, and evaluation. It also provides reproducible recipes and checkpoints for building small DLMs from existing encoders or autoregressive models.
- Motivation: These components address common DLM codebases that are distributed across ad-hoc repositories or lack transparent implementations.The stated goal is to make DLM development easier to reproduce, extend, and iterate across new designs.
- Framework: dLLM unifies DLM training, inference, and evaluation in a standardized, modular, extensible workflow.Its training modules cover common Masked Diffusion and Block Diffusion objectives while separating diffusion logic from model architectures.
- Framework: The framework supports reproducing and finetuning existing DLMs such as LLaDA and Dream, while enabling new models and objectives.New inference algorithms can be added without modifying existing model implementations.
- Framework: dLLM provides a plug-and-play sampler abstraction that swaps inference algorithms while keeping the underlying model unchanged.This decouples models from inference algorithms and supports efficient decoding implementations.
- Accessible DLM development: The framework includes minimal, transparent recipes for converting BERT-style encoders and autoregressive language models into DLMs.Released checkpoints make these small models available as starting points for future research.
2 Preliminaries
Discrete diffusion language models corrupt discrete token sequences over time and learn a reverse process that denoises them. MDLM masks tokens independently, whereas BD3LM generates autoregressive blocks whose contents are produced through diffusion conditioned on clean prior blocks.
- Discrete Diffusion: Discrete diffusion progressively corrupts token sequences and learns a reverse process to recover clean data in a discrete state space.The forward process adds noise from t = 0 to 1, while the reverse process denoises corrupted sequences.
- Masked Diffusion (MDLM): Masked Diffusion independently masks tokens with probability t and trains the model to predict clean tokens at masked positions.Its objective uses time-dependent reweighting, such as 1/t under a linear schedule.
- Masked Diffusion (MDLM): MDLM minimizes the negative log-likelihood of clean tokens conditioned on masked inputs.The loss is applied to tokens whose corrupted state is the special mask token.
- Block Diffusion (BD3LM): Block Diffusion partitions a sequence into K non-overlapping blocks and factorizes generation autoregressively across those blocks.Each block is generated by diffusion conditioned on the clean history of previous blocks.
- Block Diffusion (BD3LM): BD3LM applies diffusion loss only to the current block while freezing the history of preceding blocks.The masked positions are defined as the intersection of the current block with the globally masked indices.
3 dLLM Overview
dLLM organizes diffusion language modeling around modular training, inference, and evaluation interfaces. It supports interchangeable objectives and samplers, reproducible evaluation, and practical debugging while exposing the sensitivity of measured performance to decoding settings.
- dLLM provides a unified overview of training, sampling, and evaluation as its three core components.
- Trainer: Unified trainers support MDLM and BD3LM pretraining, finetuning, and extension to new diffusion objectives.The framework decouples diffusion modeling logic from model architectures, enabling new objectives and variants with minimal refactoring.
- Trainer: Localized configuration changes support MDLM or BD3LM pretraining, MDLM SFT, and autoregressive-to-MDLM adaptation without changing the overall pipeline.Examples include swapping trainers, toggling arguments, and wrapping the data collator.
- Sampler: Sampler(model).sample() decouples models from inference algorithms, enabling plug-and-play sampler swaps while leaving model implementations unchanged.dLLM includes a Fast-dLLM sampler as a drop-in replacement for standard MDLM sampling and reports substantial inference speedups.
- Sampler: A terminal visualizer exposes token decoding order and sample evolution across decoding steps for debugging and interpretability.This is useful because DLMs may decode tokens in any order rather than strictly left-to-right.
- Evaluation: Evaluation reproduces model-specific preprocessing, decoding, and post-processing while supporting consistent comparisons across models and tasks.The framework closely matches official results, while reproduction experiments show that inference hyperparameters can sharply affect performance.
4 Open DLMs with Open Recipes
dLLM supplies reproducible recipes for finetuning large DLMs and converting BERT-style or autoregressive models into DLMs. These experiments show useful reasoning and generation capabilities, while retaining important benchmark limitations.
- Open recipes: dLLM provides reproducible recipes and checkpoints for finetuning open-weight DLMs and training small DLMs from scratch.The recipes cover reasoning finetuning and conversion of BERT-style and autoregressive models into DLMs.
- Finetuning large DLMs: MDLM-style supervised finetuning elicits reasoning capabilities in existing LLaDA and Dream models and improves downstream performance.The models are finetuned with LoRA on the s1K reasoning dataset.
- Finetuning large DLMs: Instruct models gain consistently across math, planning, and coding benchmarks, whereas Base models improve on in-distribution math but regress on out-of-distribution benchmarks.Reasoning is forced at inference by prepending a <reasoning> token.
- BERT-to-DLM conversion: An off-the-shelf BERT-style model can become a diffusion chatbot without architectural changes by finetuning only on instruction-following data.ModernBERT-base-chat-v0.1 and ModernBERT-large-chat-v0.1 are released as checkpoints.
- BERT-to-DLM conversion: ModernBERT-large-chat surpasses both GPT-2 variants on most benchmarks and outperforms Qwen1.5-0.5B-Chat on BBH and MATH, but trails similar-sized decoder-only ARLMs on some tasks.The result is notable because ModernBERT-large-chat is encoder-only and has no architectural modification for generation.
- AR-to-DLM conversion: An off-the-shelf ARLM can be converted into a diffusion chatbot with minimal changes using MDLM or BD3LM objectives and instruction-following data.The released Qwen3-0.6B variants use SFT without continual pretraining.
- AR-to-DLM conversion: BD3LM surpasses the original Qwen3-0.6B-Base on HumanEval and MBPP, while both converted variants trail AR counterparts on most knowledge and reasoning benchmarks.The findings identify AR-to-diffusion conversion as a practical, compute-efficient path to building DLMs.
5 Related Work
Related work spans discrete diffusion formulations, rapidly scaling open-weight DLMs, and emerging tools for inference and evaluation. Existing tools remain fragmented across development stages and evaluation configurations.
- Discrete diffusion: Discrete diffusion extends diffusion modeling to text through absorbing-state and uniform-state formulations, with continuous-time, score-based, and ratio-based objectives further unifying the theory.The state space remains discrete while the forward process progressively destroys information and the reverse process learns denoising.
- Open-weight DLMs: Open-weight DLMs have scaled from 1.1B masked-diffusion models to 100B block-level systems, while pretrained ARLM conversion has reached models from 127M to 30B.Dream adapts Qwen-2.5 at the 7–8B scale.
- Open tools for DLMs: Prior open-weight DLMs often lack unified development pipelines, while inference tools and evaluation pipelines are developed independently and use varying configurations.These differences make reproduction and comparison difficult.
6 Conclusion
dLLM unifies DLM training, inference, and evaluation in a modular pipeline and supplies recipes showing that pretrained models can be converted into competitive DLMs with lightweight finetuning. The framework is intended to lower barriers to reproduction and future extension.
- Conclusion: dLLM unifies training, inference, and evaluation in a modular, extensible pipeline for reproducing, finetuning, and comparing DLMs.The framework is designed to integrate new designs straightforwardly.
- Conclusion: Released recipes and checkpoints show that BERT-style encoders and autoregressive LMs can become competitive DLMs through lightweight finetuning alone.The paper presents this as making DLM development accessible with minimal compute.
- Future work: Future work will add new methods, including reinforcement-learning algorithms once widely adopted DLM approaches emerge, and support additional open-weight models.The authors also plan to incorporate models as they are released.
A Training Curves
The appendix presents training-loss curves for three recipe families: reasoning finetuning of open-weight DLMs, BERT-to-chat conversion, and autoregressive-LM-to-DLM conversion.
- Training curves: Figure 6 reports training loss for finetuning open-weight DLMs to reason.It corresponds to the reasoning-finetuning recipe in Section 4.1.
- Training curves: Figure 7 reports training loss for finetuning BERT to chat.It corresponds to the BERT-chat conversion recipe in Section 4.2.1.
- Training curves: Figure 8 reports training loss for finetuning autoregressive LMs to become DLMs.It corresponds to the AR-to-diffusion conversion recipe in Section 4.2.2.
B Evaluation Reproduction
The dLLM framework closely reproduces official evaluation results for LLaDA and Dream under matching configurations. Its Fast-dLLM reimplementation maintains similar accuracy while substantially improving generation throughput.
- Evaluation Reproduction: dLLM closely reproduces official results across benchmarks under the same configurations.Only minor necessary adjustments were required, supporting consistency between the unified pipeline and the official setup.
- Evaluation Reproduction: Tables 4 and 5 report reproduced evaluation results for LLaDA and Dream.The tables identify official results from the original papers and compare them with dLLM reimplementations across listed benchmarks.
- Fast-dLLM Evaluation: Fast-dLLM achieves similar accuracy to official results while substantially improving generation throughput.The Fast-dLLM evaluations cover LLaDA-Instruct and Dream-Base at maximum generation lengths of 256 and 512 tokens.
- Fast-dLLM Evaluation: Tables 6 and 7 evaluate Fast-dLLM reimplementations for LLaDA-Instruct and Dream-Base.Each table compares official and dLLM results across maximum new-token settings of 256 and 512.