Abstract
Autoregressive Models (ARMs) are the current standard for Large Language Models, but their sequential token generation is inherently memory-bound. Diffusion Language Models (DLMs) offer a parallel alternative, yet their practical performance often falls short of theoretical expectations. This paper characterizes the performance of LLaMA-3 (ARM) against LLaDA (DLM), identifying a fundamental "arithmetic intensity flip" where DLMs become compute-bound. We analyze the scaling challenges of DLMs and demonstrate that block-wise decoding and reduced sampling steps are critical for achieving competitive inference speeds.
Introduction
The dominance of Autoregressive Models (ARMs) in natural language processing is largely due to their robust performance and established scaling laws. However, the sequential nature of next-token prediction limits hardware utilization, often leaving GPUs memory-bound during inference. Diffusion Language Models (DLMs) have recently gained attention for their ability to generate entire sequences in parallel through iterative denoising. Despite claims of massive speedups, open-source DLMs frequently underperform relative to ARMs. This study provides a systems-level analysis to explain this discrepancy, focusing on arithmetic intensity, memory operations, and context scaling.
Methodology
We conduct a comparative analysis between LLaMA-3-8B and LLaDA-8B. Our evaluation framework includes:
- Roofline Modeling: To determine whether model performance is limited by memory bandwidth or peak compute.
- Asymptotic Analysis: Comparing FLOPs and Memory Operations (MOPs) across different sequence lengths.
- Block-wise Decoding: Evaluating a hybrid decoding strategy that employs sequential block processing with internal parallel updates and approximate KV caching.
- Empirical Benchmarking: Measuring runtime and throughput on NVIDIA A6000 and A100 GPUs across standard reasoning (GSM8K) and coding (HumanEval) tasks.
The Arithmetic Intensity Flip
A key finding is the divergence in arithmetic intensity (AI) between the two architectures. ARMs perform minimal computation per byte of data moved during decoding, placing them firmly in the memory-bound regime. DLMs, by contrast, process the full sequence at every denoising step, resulting in high AI and making them compute-bound.
While high AI suggests better hardware utilization, it also implies a much higher total computational cost per token compared to the lightweight decoding of ARMs.
Scaling and Block-wise Optimization
Naive DLMs suffer from a "re-processing" tax because they lack the standard KV caching mechanisms used by ARMs. This results in quadratic latency scaling as the generated sequence grows. To mitigate this, we explore block-wise decoding. By partitioning the sequence and utilizing approximate KV caching, we can stabilize arithmetic intensity and significantly flatten the latency curve.
Key Results and Discussion
- Latency Scaling: DLMs are competitive for short sequences but become up to 10x slower than ARMs at 1k tokens without optimization. Block-wise decoding reduces this overhead by 2x-3x.
- The Sampling Bottleneck: The number of diffusion steps ($K$) is the primary determinant of DLM speed. Reducing $K$ allows DLMs to exceed ARM throughput in low-batch settings, though it currently incurs a significant penalty in model accuracy.
- Throughput Paradox: ARMs maintain superior throughput in high-batch scenarios because their lower per-step compute requirements allow for greater concurrency on existing hardware.
Conclusion
The transition from next-token prediction to parallel diffusion requires addressing significant systems-level overheads. While block-wise decoding provides a path toward scalability, the ultimate success of DLMs depends on algorithmic improvements that allow for fewer sampling steps without sacrificing reasoning capabilities.
Summary updated