# Enabling Approximate Joint Sampling in Diffusion LMs

DevFeed: [Enabling Approximate Joint Sampling in Diffusion LMs](<https://devfeed.tech/articles/enabling-approximate-joint-sampling-in-diffusion-lms-123068.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2509.22738>)

Author: Parikshit Bansal, Sujay Sanghavi

Published: 2026-11-09T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [AI Foundation Models](<https://devfeed.tech/topics/ai-foundation-models.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [autoregressive](<https://devfeed.tech/tags/autoregressive.md>), [coding](<https://devfeed.tech/tags/coding.md>), [coding-tasks](<https://devfeed.tech/tags/coding-tasks.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [denoising](<https://devfeed.tech/tags/denoising.md>), [diffusion](<https://devfeed.tech/tags/diffusion.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [layer](<https://devfeed.tech/tags/layer.md>), [lightweight](<https://devfeed.tech/tags/lightweight.md>), [math](<https://devfeed.tech/tags/math.md>), [modeling](<https://devfeed.tech/tags/modeling.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [sampling](<https://devfeed.tech/tags/sampling.md>), [speed](<https://devfeed.tech/tags/speed.md>), [token](<https://devfeed.tech/tags/token.md>), [tokens](<https://devfeed.tech/tags/tokens.md>), [unmasked](<https://devfeed.tech/tags/unmasked.md>)

## AI overview

Masked diffusion LMs can gain speed by unmasking several tokens in parallel, but this moves generated text away from the model's true joint distribution and can reduce accuracy. The paper adds a lightweight, single-layer sampler to a frozen diffusion LM: after one full-model forward pass, repeated passes through the sampler produce multiple tokens, and the sampler is trained to mimic exact joint sampling. The authors report results on pretrained Dream-7B-Base and Llada-7B-Base and instruction-tuned Dream-7B-Instruct and Dream-7B-Coder across language modeling, math, and coding tasks. With four tokens unmasked per full-model denoising step, the method achieves MAUVE 0.87 against the true joint distribution, compared with 0.31 for a marginal-sampling baseline.

## Source excerpt

arXiv:2509.22738v4 Announce Type: replace-cross 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 {\em 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.