Preprint
Large Language Models

Large Language Diffusion Model

Shen Nie, Fengqi Zhu, Zebin You, Xiaolu Zhang, Jingyang Ou, Jun Hu, Jun Zhou, Yankai Lin, Jirong Wen, Chongxuan Li
February 14, 2025arXiv.org789 citations

789

Citations

328

Influential Citations

arXiv.org

Venue

2025

Year

Abstract

The capabilities of large language models (LLMs) are widely regarded as relying on autoregressive models (ARMs). We challenge this notion by introducing LLaDA, a diffusion model trained from scratch under the pre-training and supervised fine-tuning (SFT) paradigm. LLaDA employs a forward data masking process and a reverse generation process, parameterized by a Transformer to predict masked tokens. It provides a principled generative approach for probabilistic inference by optimizing a likelihood lower bound. Across extensive benchmarks on general tasks, math, code, and so on, LLaDA demonstrates strong scalability and performs comparably to our self-constructed ARM baselines. Remarkably, LLaDA 8B is competitive with strong LLMs like LLaMA3 8B in in-context learning and, after SFT, exhibits impressive instruction-following abilities in case studies such as multi-turn dialogue. Moreover, LLaDA addresses the reversal curse, surpassing GPT-4o in a reversal poem completion task. Our findings show the promise of diffusion models for language modeling at scale and challenge the common assumption that core LLM capabilities discussed above inherently depend on ARMs. Project page and codes: https://ml-gsai.github.io/LLaDA-demo/.

Analysis

Why This Paper Matters

This paper is significant because it directly challenges the long-held belief that autoregressive models (ARMs) are essential for achieving the core capabilities of large language models (LLMs). By introducing LLaDA, a diffusion model trained from scratch under the standard pre-training and supervised fine-tuning (SFT) paradigm, the authors demonstrate that diffusion models can match or even surpass ARMs in key areas such as in-context learning, instruction following, and mathematical reasoning. This is a paradigm shift that could influence future research directions in language modeling.

The paper also addresses a known weakness of ARMs—the reversal curse—where models fail to handle reversed sequences. LLaDA's ability to outperform GPT-4o on a reversal poem completion task highlights a fundamental advantage of diffusion-based generation. This finding suggests that diffusion models may be better suited for tasks requiring bidirectional context understanding.

Technical Contributions

  • Diffusion for Language Modeling: LLaDA applies a forward data masking process and a reverse generation process, parameterized by a Transformer, to predict masked tokens. This is a principled generative approach that optimizes a likelihood lower bound.
  • Scalable Pre-training and SFT: The model is trained from scratch using the same pre-training and SFT paradigm as ARMs, showing that diffusion models can scale effectively.
  • Addressing the Reversal Curse: LLaDA explicitly tackles the reversal curse, a limitation of ARMs, by leveraging its bidirectional generation process.
  • Competitive Performance: The 8B parameter version of LLaDA is competitive with LLaMA3 8B across diverse benchmarks, including general tasks, math, and code.

Results

LLaDA 8B performs comparably to LLaMA3 8B on a range of benchmarks, including general language understanding, math reasoning, and code generation. After SFT, it demonstrates impressive instruction-following abilities in multi-turn dialogue case studies. Notably, LLaDA surpasses GPT-4o on a reversal poem completion task, directly addressing the reversal curse. The paper reports 789 citations, indicating strong interest from the research community.

Significance

This work has broad implications for the AI field. It challenges the dominant autoregressive paradigm and suggests that diffusion models can serve as a viable alternative for large-scale language modeling. This could lead to more robust models that are less susceptible to issues like the reversal curse. Additionally, the open-source release of code and project resources will accelerate further research into diffusion-based language models. The findings may also inspire new hybrid approaches that combine the strengths of both autoregressive and diffusion models.