Abstract
Diffusion-based Large Language Models (DLLMs) offer a promising alternative to standard autoregressive models by enabling parallel text generation, but their massive computational overhead makes deployment difficult. We present DLLMQuant, the first post-training quantization (PTQ) framework specifically designed for DLLMs. By introducing time-aware calibration and interaction-aware quantization, DLLMQuant achieves 4-bit efficiency with minimal accuracy loss—outperforming standard methods by over 10 points on reasoning tasks.
Introduction
While standard Large Language Models (LLMs) generate text one token at a time, Diffusion-based LLMs (DLLMs) like LLaDA initialize an entire sequence of "mask" tokens and iteratively refine them into coherent text. This allows for parallel decoding and helps solve issues like the "reversal curse." However, DLLMs are computationally expensive, often requiring tens or hundreds of times more computation per token than their autoregressive counterparts. To make them practical for edge devices or consumer GPUs, Post-Training Quantization (PTQ)—compressing 16-bit weights and activations into 4-bit formats—is essential.
Standard PTQ methods (like AWQ or GPTQ) fail significantly on DLLMs, causing accuracy drops of over 16%. This failure stems from three unique DLLM traits:
- Temporal Distribution Shift: The input distribution changes drastically as the model moves from 100% masked tokens to a fully decoded sequence.
- Error Amplification: Because the model is iterative, small quantization errors at early steps propagate and grow geometrically.
- Feature Mismatch: At any given step, some tokens are "fixed" (already decoded) while others are "probabilistic" (still being predicted), creating a hybrid distribution.
Methodology
DLLMQuant introduces three "plug-and-play" techniques to bridge the gap between diffusion architectures and quantization:
- Temporal-Mask Adaptive Sampling (TMAS): Standard calibration uses random data. TMAS instead samples data across different timesteps and masking ratios. This ensures the calibration set represents the diverse feature distributions the model encounters during its entire iterative lifecycle.
- Interaction-Aware Activation Quantization (IA-AQ): The matrix multiplication following the softmax operation in the attention layer is a primary source of error. IA-AQ uses the sparsity of bidirectional attention signals to dynamically allocate quantization resources, prioritizing the "Value" ($V$) matrix features with the strongest interactions.
- Certainty-Guided Quantization (CGQ): This refines weight quantization by incorporating the model's own confidence. It uses a weighted Hessian matrix that emphasizes tokens about to be unmasked or those with high confidence scores, ensuring the most "certain" parts of the generation remain high-fidelity.
Experimental Setup
The researchers evaluated DLLMQuant across three major DLLM architectures: LLADA-8B, LLADA-1.5-8B, and DREAM-7B. Performance was tested across nine diverse benchmarks covering common sense (TruthfulQA, HellaSwag, MMLU), reasoning (GSM8K), and coding (HumanEval). Calibration was performed using 128 segments from the WinoGrande dataset.
Key Results and Insights
DLLMQuant achieves state-of-the-art results for quantized DLLMs:
- Accuracy Recovery: On the LLADA-8B model, DLLMQuant++ achieved an average score of 54.29%, significantly higher than standard GPTQ (51.03%) and AWQ (48.09%).
- Reasoning Gains: The most dramatic improvements were in complex tasks. On GSM8K (math), DLLMQuant improved accuracy by over 10 points compared to standard 4-bit baselines.
- Efficiency: The 4-bit implementation delivered a 1.6x to 1.7x speedup in token generation and reduced memory usage by 3.2x (e.g., bringing LLADA-8B down from ~16GB to ~5GB of VRAM).
The researchers visualized the Mean Squared Error (MSE) over time and realized that 4-bit quantization errors grow geometrically. By leaving the attention's post-softmax matmul better quantized via IA-AQ, the cumulative error drops significantly. Furthermore, CGQ exploits the fact that already "decided" tokens do not change, focusing error compensation on the "active" masked regions.
Conclusion
DLLMQuant demonstrates that a single, static calibration set is insufficient for diffusion-based text generation. By acknowledging the dynamic nature of DLLMs—where behavior at Step 1 is fundamentally different from Step 99—the proposed framework enables efficient deployment on consumer-grade hardware. Future work will explore extreme compression (sub-2-bit) and adaptation to multimodal diffusion models.
Summary updated