Simple and Effective Masked Diffusion Language Models

Subham Sekhar Sahoo, Marianne Arriola, Yair Schiff, Aaron Gokaslan, Edgar Marroquin +3 more
6/11/2024
cs.CLcs.AIcs.LG

No official code found. Best implementation: kuleshov-group/mdlm (699 stars, Apache-2.0, last commit 2025-09-29).

Abstract

While diffusion models excel at generating high-quality images, prior work reports a significant performance gap between diffusion and autoregressive (AR) methods in language modeling. In this work, we show that simple masked discrete diffusion is more performant than previously thought. We apply an effective training recipe that improves the performance of masked diffusion models and derive a simplified, Rao-Blackwellized objective that results in additional improvements. Our objective has a simple form -- it is a mixture of classical masked language modeling losses -- and can be used to train encoder-only language models that admit efficient samplers, including ones that can generate arbitrary lengths of text semi-autoregressively like a traditional language model. On language modeling benchmarks, a range of masked diffusion models trained with modern engineering practices achieves a new state-of-the-art among diffusion models, and approaches AR perplexity. We provide the code, along with a blog post and video tutorial on the project page: https://s-sahoo.com/mdlm

View on arXivView PDF

Code Implementations(1)

kuleshov-group/mdlmCommunity100%
Apache-2.0

[NeurIPS 2024] Simple and Effective Masked Diffusion Language Model

699100Shell, PythonJun 7, 20241 years agoApache-2.0
diffusion-language-modelsdiffusion-modelslanguage-modeltext

Similar Papers

Cite this paper

@article{sahoo2024simple,
  title  = {Simple and Effective Masked Diffusion Language Models},
  author = {Subham Sekhar Sahoo and Marianne Arriola and Yair Schiff and Aaron Gokaslan and Edgar Marroquin and Justin T Chiu and Alexander Rush and Volodymyr Kuleshov},
  year   = {2024},
  eprint = {2406.07524},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2406.07524},
  url    = {http://arxiv.org/abs/2406.07524v2},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.07524.svg)](https://codeofpaper.com/paper/2406.07524)

Discussion