Autoregressive vs. Masked Diffusion Language Models: A Controlled Comparison
Organizations: Independent Researcher
Abstract
We present a controlled empirical comparison between autoregressive (AR) and masked diffusion (MDLM) language models. Both models are trained on identical data (50M tokens from TinyStories), identical compute budget (20,000 steps, batch size 32, sequence length 512), and identical hardware (NVIDIA H100 80GB), isolating the generation paradigm as the sole variable. We report three findings. First, both paradigms achieve comparable training throughput (~50K tokens/second), with MDLM requiring only 4.7% more wall-clock time. Second, AR converges faster and begins overfitting by step 14,000, while MDLM converges more slowly and is still improving at step 20,000, suggesting different compute-optimal training regimes. Third, quantitative diversity analysis over 1,000 generated samples reveals a structural diversity-fluency trade-off: AR produces fluent but repetitive outputs (99.8% begin with the same word), while MDLM generates more diverse narratives (93.4% unique 5-word openings, higher Distinct-n, lower Self-BLEU), at the cost of occasional grammatical inconsistencies. All code, trained checkpoints, and data pipelines are released for reproducibility.
Figures & tables
| Variable | AR | MDLM |
|---|---|---|
| Shared (identical) | ||
| Data | TinyStories ( Eldan & Li, 2023 ) , 50M tokens | |
| Steps | 20,000 | |
| Batch size | 32 | |
| Sequence length | 512 | |
| 768 | ||
| Metric | AR | MDLM |
|---|---|---|
| Parameters | 123.6M | 162.7M |
| Training time | 107.9 min | 113.0 min |
| Throughput | 50,620 tok/s | 48,343 tok/s |
| Best val loss | 1.589 | 3.412 |
| Best checkpoint | Step 14,000 | Step 20,000 |
| Val losses use different objectives and are not cross-comparable. | ||
| Step | AR Val Loss | MDLM Val Loss |
|---|---|---|
| 2,000 | 2.660 | 3.952 |
| 4,000 | 2.047 | 3.841 |
| 6,000 | 1.837 | 3.585 |
| 8,000 | 1.726 | 3.528 |
| 10,000 | 1.665 | 3.509 |
| 12,000 | 1.633 | 3.527 |
| Metric | AR | MDLM | More diverse |
|---|---|---|---|
| Distinct-1 | 0.053 | 0.058 | MDLM |
| Distinct-2 | 0.275 | 0.297 | MDLM |
| Distinct-3 | 0.531 | 0.542 | MDLM |
| Distinct-4 | 0.701 | 0.690 | AR |
| Self-BLEU ( ) | 0.341 | 0.334 | MDLM |
| Vocabulary used | 5,360 | 5,754 | MDLM |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Model | Hardware | Time | Cost |
|---|---|---|---|
| AR (123.6M, 20K steps) | H100 80GB (Colab) | 107.9 min | $35 |
| MDLM (162.7M, 20K steps) | H100 80GB (Colab) | 113.0 min | $35 |
| Total | 220.9 min | $70 |