Enabling Approximate Joint Sampling in Diffusion LMs
cs.CL, cs.LG
Submitted: 2025-09-25
Updated: 2026-09-24
Code: https://github.com/DreamLM/Dream
License: http://creativecommons.org/licenses/by/4.0/
The gist: In autoregressive language models, each token is sampled by conditioning on all the past tokens; the overall string has thus been sampled from the correct underlying joint distribution represented by
Terminology
Abstract
In autoregressive language models, each token is sampled by conditioning on all the past tokens; the overall string has thus been sampled from the correct underlying joint distribution represented by the model. In contrast, masked diffusion language models generate text by unmasking tokens out of order and potentially in parallel. Generating an overall string sampled from the correct underlying joint distribution would (again) require exactly one token unmasking in every full-model forward pass. The more tokens unmasked in parallel, the further away the string is from the true joint; this can be seen in the resulting drop in accuracy (but, increase in speed). In this paper we devise a way to approximately sample multiple tokens from the joint distribution in a single full-model forward pass; we do so by developing a new lightweight single-layer ``sampler" on top of an existing large diffusion LM. One forward pass of the full model can now be followed by multiple forward passes of only this sampler layer, to yield multiple unmasked tokens. Our sampler is trained to mimic exact joint sampling from the (frozen) full model. We show the effectiveness of our approximate joint sampling for both pretrained-only (Dream-7B-Base, Llada-7B-Base) and instruction-tuned (Dream-7B-Instruct, Dream-7B-Coder) models on language modeling and math & coding tasks. When four tokens are unmasked for each full-model denoising step, our sampling algorithm achieves a MAUVE score of 0.87 (vs marginal baseline of 0.31) with respect to the true joint distribution.
Sources
- Discrete Copula Diffusion
- DeepSeek-V3 Technical Report
- Encoder-Decoder Diffusion Language Models for Efficient Training and Inference
- Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
- Self-Speculative Masked Diffusions
- Large Language Diffusion Models
- Reviving Any-Subset Autoregressive Models with Principled Parallel Sampling and Speculative Decoding
- Anchored Diffusion Language Model
- OpenCoder: The Open Cookbook for Top-Tier Code Large Language Models
- Accelerating Diffusion LLMs via Adaptive Parallel Decoding
- Your LLM Knows the Future: Uncovering Its Multi-Token Prediction Potential
- ParallelBench: Understanding the Trade-offs of Parallel Decoding in Diffusion LLMs
- Mercury: Ultra-Fast Language Models Based on Diffusion
- Seed Diffusion: A Large-Scale Diffusion Language Model with High-Speed Inference
- Energy-Based Diffusion Language Models for Text Generation
- EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty
- Dream 7B: Diffusion Large Language Models
- EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test
- MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models
- Learning Harmonized Representations for Speculative Sampling
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering