TL;DR
Researchers have successfully "recycled" pre-trained autoregressive (AR) models like GPT-2 and LLaMA into high-performing Diffusion Language Models (DLMs). By using a clever adaptation recipe involving attention mask annealing and logit shifting, they created DiffuLLaMA-7B, the largest and most capable text diffusion model to date. This model achieves results competitive with standard AR models while gaining superior text-infilling and parallel generation abilities.
The Scale Gap in Diffusion Language Models
Autoregressive (AR) models currently dominate the generative AI landscape. However, they are limited by their strict left-to-right generation nature, which makes "future planning" and self-correction difficult. Diffusion Language Models (DLMs) offer a promising alternative: they generate text by iteratively refining a sequence of noisy or masked tokens, allowing for non-linear generation and seamless text infilling.
Despite these advantages, DLMs face a massive "scale gap." While AR models have been scaled to trillions of parameters, DLMs have mostly remained small (under 1B parameters) because training them from scratch at scale is computationally expensive and highly unstable. This paper asks a practical question: Instead of training DLMs from scratch, can we simply adapt the powerful AR models we already have?
Adaptation Methodology
The authors propose a "continual pre-training" approach to convert an AR model into a DLM. The transition is not straightforward because AR models use causal (left-to-right) attention and predict the next token, whereas DLMs use bidirectional attention and predict masked tokens.
Their adaptation recipe consists of three key components:
- Unifying Objectives: They mathematically demonstrate that AR training is essentially a special, restricted case of discrete diffusion.
- Attention Mask Annealing: To move from causal to bidirectional attention without breaking the model's pre-trained representations, they gradually "fade out" the causal mask during training.
- The Shift Operation: AR models are trained to predict the token at position $i+1$ using the hidden state at position $i$. To preserve this learned behavior, the authors maintain this "shift" in the diffusion setup.
The resulting models, DiffuGPT (based on GPT-2) and DiffuLLaMA (based on LLaMA-2-7B), were trained using standard discrete diffusion (absorbing state) objectives. Notably, they found that time embeddings—a staple in image diffusion—were unnecessary for text, simplifying the architecture.
Training and Evaluation Datasets
- Training: DiffuGPT was trained on 30 billion tokens from the FineWeb dataset. DiffuLLaMA was trained on 65 billion tokens from a mixture of SlimPajama (70%) and Starcoder (30%).
- Evaluation: The models were tested on a comprehensive suite including TriviaQA (reading comprehension), Lambada (word completion), HellaSwag/Winogrande/SIQA/PIQA (commonsense reasoning), GSM8K (math), ROCStories (infilling), and HumanEval (code).
Key Insights and Results
The authors' models set new state-of-the-art benchmarks for DLMs across nearly all tasks, proving that adaptation is a highly viable path forward.
- The "Shift" is Vital: Simply switching an AR model to a bidirectional mask causes a massive performance drop. Maintaining the AR "shift" allows the diffusion model to inherit the AR model's pre-trained weights effectively.
- Scaling Laws Apply: Larger models (7B) achieve significantly lower loss than smaller ones (127M/355M) given the same number of tokens, suggesting that DLMs benefit from scaling just as much as AR models do.
- Strong Reasoning Performance: DiffuLLaMA-7B achieved a score of 63.1% on GSM8K, actually outperforming the original LLaMA-2 baseline (58.6%).
- Infilling is "Free": Because DLMs are trained to denoise arbitrary masks, they are naturally excellent at "filling in the middle" (FIM) without needing the complex prompt re-ordering required by AR models. In ROCStories infilling, DiffuLLaMA achieved a ROUGE-L of 21.2, nearly doubling the performance of the AR baseline (10.5).
- Unconditional Generation: DiffuGPT models produced more fluent and diverse text with fewer decoding steps compared to previous DLMs like SEDD or MD4.
Limitations and Future Work
While reasoning and logic transferred well, the authors noted that some "world knowledge" (e.g., specific facts in TriviaQA) seemed to diminish during the adaptation phase. They suggest more training tokens might be needed to fully recover this knowledge.
Additionally, while parallel generation is a theoretical advantage, DLMs still require multiple steps (e.g., 64-256) to generate high-quality text, which can be slower than AR models for very short sequences. Finally, while the 7B model can follow instructions, it hasn't been fully "chat-tuned" like LLaMA-2-Chat, identifying instruction tuning for DLMs as a key area for future research.
Summary updated