---
title: "How diffusion language models generate text"
date: 2026-07-31
canonical: https://solmaz.io/x/2083114621867864279/
x_url: https://x.com/onusoz/status/2083114621867864279
license: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
---

Ever wondered what token generation looks like in a Diffusion LLM (dLLM)?

@googlegemma DiffusionGemma by generates text in 256 token blocks

Each block starts with random tokens

On every pass, the model proposes tokens for all 256 slots in parallel. It keeps the more confident proposals and replaces the uncertain ones with new random tokens

This is called denoising. Denoising repeats until the block becomes stable and confident

The model then commits the finished block and starts the next one

I had to patch @vllm_project to be able to visualize the canvas, and had to develop yet another custom bundle of pi, osolmaz/diffusionpi

You can see all that in action in 4 parallel sessions below in glorious 4K (DGX Spark can do 16 sessions in parallel as well, but then it is not so easy to see what is going on)

But the video below is not the most objective benchmark of throughput. To measure tok/s more objectively (i.e. repeatable and fixed length), I made osolmaz/localperf ignore EOS token to keep request lengths equal. Result:

- nvidia/diffusiongemma-26B-A4B-it-NVFP4 
- NVIDIA DGX Spark, vLLM
- c4x66 ~ 264 aggregate tok/s at
-  32k context config each, 1k input tokens, fixed 512-token outputs, thinking off

You can see the full profiling sweep in the post below 👇

*Part 1/3 of a thread; root: https://solmaz.io/x/2083114621867864279/*
