[Paper Review] Large Language Diffusion Models
LLaDA introduces a diffusion-based large language model trained from scratch, achieving competitive performance with autoregressive baselines and strong in-context learning, instruction-following, and reversal reasoning at 8B parameters.
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/.
Motivation & Objective
- Challenge the notion that autoregressive models are the only viable path for LLMs by proposing a diffusion-based alternative (LLaDA).
- Scale from scratch to 8B parameters and pre-train on 2.3 trillion tokens with supervised fine-tuning on 4.5 million pairs.
- Evaluate LLaDA across language understanding, math, code, and Chinese tasks, focusing on in-context learning, instruction-following, and reversal reasoning.
- Demonstrate that diffusion models can achieve bidirectional dependencies and principled likelihood-based generation in LLM settings.
Proposed method
- Define a masked diffusion model (MDM) where a forward masking process gradually hides tokens and a reverse mask-predictor recovers them.
- Optimize a lower-bound log-likelihood using a cross-entropy loss on masked tokens (eq. 3) and leverage the bound in eq. (4) for principled training.
- Pre-train Transformer-based mask predictor on 2.3T tokens (8B and 1B variants) with variable masking ratio t~U[0,1] and a 4096-token sequence length.
- Perform supervised fine-tuning (SFT) by optimizing p_theta(r0|p0) on 4.5M instruction-following pairs (eq. 5).
- Inference via a discretized reverse diffusion process with flexible remasking strategies (low-confidence remasking and semi-autoregressive remasking); evaluation via a stable likelihood-like form (eq. 6).
- Compare LLaDA to autoregressive baselines and open LLMs on 15 tasks across general, math, code, and Chinese domains; analyze scalability up to 10^23 FLOPs.
Experimental results
Research questions
- RQ1Is the autoregressive paradigm necessary to achieve core LLM capabilities, or can diffusion-based generative modeling suffice?
- RQ2Can LLaDA scale to 8B parameters and reach performance comparable to strong ARM-based LLMs on diverse tasks?
- RQ3How do in-context learning, instruction-following, and reversal reasoning capabilities manifest in a diffusion-based LLM?
- RQ4What sampling/remasking strategies best balance efficiency and sample quality in diffusion-based LLMs?
Key findings
- LLaDA 8B achieves competitive performance with self-constructed ARM baselines across six tasks at a computational budget up to 10^23 FLOPs.
- LLaDA 8B surpasses LLaMA2 7B and is on par with LLaMA3 8B in nearly all zero/few-shot tasks, with advantages in math and Chinese.
- Post-SFT, LLaDA shows strong instruction-following abilities, demonstrated in multi-turn dialogue cases.
- In reversal reasoning, LLaDA effectively mitigates the reversal curse and outperforms GPT-4o on reversal poem completion tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.