DiffusionGemma: The Diffusion Era Begins with 4x Faster Text Generation
Google DeepMind announced DiffusionGemma, abandoning classic autoregressive architecture. This 26B MoE model generates 256 tokens simultaneously, delivering up to 4x speedup on local GPUs. Includes Unsloth local deployment guide and Sudoku fine-tuning example.

DiffusionGemma: The Diffusion Era Begins with 4x Faster Text Generation
Large Language Models (LLMs) have become an indispensable part of software development, academic research, and daily workflows in recent years. However, the autoregressive architecture underlying these models operates like a sequential typewriter. Every token waits for the previous one. This sequential structure inevitably creates latency issues, especially when generating long outputs. No matter how large the model, output generation speed hits a certain physical limit.
In this article, we examine Google DeepMind's DiffusionGemma model. By abandoning the classic autoregressive architecture and bringing the diffusion mechanism to text generation, this open-source model can generate 256 tokens simultaneously. The 26B Mixture of Experts (MoE) DiffusionGemma promises up to 4x speedup on local GPUs. We also cover the Unsloth local deployment guide for 16GB VRAM and Google's Sudoku fine-tuning example.

What is Diffusion and Why is it Coming to Text Generation Now?
Diffusion technology is a familiar concept from visual generation models like Stable Diffusion and DALL-E. These models start from a canvas of random noise and iteratively produce a clear image through multiple steps. Google DeepMind researchers Brendan O'Donoghue and Sebastian Flennerhag have successfully transferred this principle to the world of text.
DiffusionGemma's working principle can be summarized as follows:
- Canvas creation: The model initializes a canvas with 256 random placeholder tokens.
- Iterative denoising: Through multiple passes, correct tokens are locked in, and these locked tokens serve as context to refine the remaining tokens.
- Final polish: The entire canvas transforms into high-quality, coherent text.
To use the elegant analogy from Google's blog post, this model represents a shift from a single sequential typewriter to a massive printing press. The entire text block is stamped simultaneously, rather than waiting word by word. This parallel structure provides a clear speed advantage, especially when working with low batch sizes on a single GPU.
One of DiffusionGemma's most interesting features is its bidirectional attention mechanism. In autoregressive models, each token can only look at previous tokens. In DiffusionGemma, every token within a 256-token block can access all other tokens. This structure naturally excels at tasks like code infilling, mathematical graphs, amino acid sequences, and even Sudoku, where each token depends on future tokens.
DiffusionGemma's Technical Architecture
DiffusionGemma is built on the Gemma 4 family's MoE architecture. The model's technical specifications are impressive:
- Total parameters: 26B (25.2B)
- Active parameters: 3.8B during inference
- Expert count: 128 total, 8 active + 1 shared
- Layer count: 30
- Context length: 256K tokens
- Canvas length: 256 tokens
- Sliding window: 1024 tokens
- Vocab size: 262K
- Vision encoder: Approximately 550M parameters
- Supported modalities: Text, image, video (frames)
- License: Apache 2.0
The model uses an encoder-decoder structure. The autoregressive encoder creates the prompt's KV (key-value) cache. The decoder applies bidirectional attention over the canvas and accesses the cached context via cross-attention. This design, combined with MoE efficiency, delivers strong reasoning capabilities with a low memory footprint.
DiffusionGemma is also a multilingual model, supporting over 140 languages. This is a significant differentiator among open-source models. Its ability to process visual and video inputs also distinguishes it from pure text models.

Performance and Benchmarks
Speed is DiffusionGemma's most prominent promise. According to Google's official data:
- 1000+ tokens/second on a single NVIDIA H100
- 700+ tokens/second on an NVIDIA GeForce RTX 5090
- Up to 4x speedup compared to autoregressive Gemma 4
The technical reason behind this speedup is shifting the bottleneck from memory bandwidth to compute intensity. In autoregressive models, each token generation is memory bandwidth limited. DiffusionGemma, by processing 256 tokens in parallel, uses the GPU's computational capacity more efficiently. However, this optimization is valid for low batch sizes and single GPU scenarios. In cloud environments handling thousands of requests simultaneously, the diminishing returns are noticeable.
Looking at quality metrics, DiffusionGemma falls behind autoregressive Gemma 4. This confirms the known trade-off between speed and quality:
- MMLU Pro: 77.6% (Gemma 4: 82.6%)
- AIME 2026 (no tools): 69.1% (Gemma 4: 88.3%)
- LiveCodeBench v6: 69.1% (Gemma 4: 77.1%)
- GPQA Diamond: 73.2% (Gemma 4: 82.3%)
- BigBench Extra Hard: 47.6% (Gemma 4: 64.8%)
- MMMLU: 81.5% (Gemma 4: 86.3%)
- HLE (no tools): 11.0% (Gemma 4: 8.7%). DiffusionGemma leads here.
Visual benchmarks show a similar gap. In MMMU Pro, DiffusionGemma scores 54.3% while Gemma 4 achieves 73.8%. In OmniDocBench edit distance (lower is better), Gemma 4's 0.149 beats DiffusionGemma's 0.319.
These numbers show that DiffusionGemma is still an experimental model and won't immediately replace autoregressive models in production environments. However, the speed advantage it offers for interactive, real-time applications makes it attractive for local usage and rapid prototyping scenarios. As we discussed in our previous article on Gemma 4 and Multi-Token Prediction, Google is experimenting with different acceleration strategies simultaneously. While multi-token prediction predicts multiple tokens in a single forward pass, DiffusionGemma denoises the entire canvas in parallel.
Local Deployment Guide with Unsloth
The most practical way to run DiffusionGemma locally is through Unsloth's prepared GGUF releases and the special llama.cpp branch. This approach makes it possible to run the model even with consumer-class GPUs.
Hardware Requirements
The model's memory needs vary by quantization level:
- 4-bit (Q4_K_M): Approximately 16-17 GB VRAM/RAM
- 5-bit (Q5_K_M): Approximately 19 GB
- 6-bit (Q6_K): Approximately 23 GB
- 8-bit (Q8_0): Approximately 27 GB
- BF16 (full precision): 52 GB
Google states that the model fits within 18 GB VRAM. This means high-end consumer GPUs like the RTX 4090 (24 GB) and RTX 5090 (32 GB) can handle it comfortably. 4-bit quantization can run with 15-17 GB total memory. If memory is insufficient, llama.cpp can offload layers to RAM or disk, though generation speed drops.
Step-by-Step Setup
1. Build the llama.cpp DiffusionGemma Branch
Standard llama.cpp does not support DiffusionGemma. You must use the special PR branch:
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
gh pr checkout 24423
# or without gh CLI:
# git fetch origin pull/24423/head:diffusiongemma && git checkout diffusiongemma
# Build with CUDA (omit -DGGML_CUDA=ON for CPU-only)
cmake -B build -DGGML_CUDA=ON
cmake --build build -j --config Release --target llama-diffusion-cli
Mac users have Metal support enabled by default. Windows users can build via WSL or natively.
2. Download the GGUF Model
pip install -U "huggingface_hub[cli]"
hf download unsloth/diffusiongemma-26B-A4B-it-GGUF --local-dir ./diffusiongemma --include "*Q4_K_M*"
Q4_K_M is the most compact option at around 16 GB download. Q8_0 offers near-lossless quality but requires approximately 27 GB.
3. Run in Chat Mode
./build/bin/llama-diffusion-cli -m ./diffusiongemma/diffusiongemma-26B-A4B-it-Q4_K_M.gguf -ngl 99 -cnv -n 2048
Parameters explained:
-ngl 99: Offloads all layers to GPU (use 0 for CPU-only)-cnv: Multi-turn conversation mode-n 2048: Target token count; auto-derives diffusion block count and batch/context sizes
4. Live Diffusion Visualization
llama.cpp enables watching the diffusion process live in the terminal:
./build/bin/llama-diffusion-cli -m ./diffusiongemma/diffusiongemma-26B-A4B-it-Q4_K_M.gguf -ngl 99 -cnv -n 2048 --diffusion-visual
The --diffusion-visual flag shows how each 256-token canvas is denoised step by step in a flicker-free manner. This is an educational experience for understanding the diffusion mechanism.
Recommended Inference Settings
Unsloth and Google's joint recommendations are as follows:
- Sampler: Entropy-Bound (EB) denoising
- Maximum denoising steps: 48
- Temperature schedule: Linear decay, from 0.8 to 0.4
- Entropy bound: 0.1
- Adaptive stopping: When average canvas entropy drops below 0.005 and high-probability tokens remain stable for 2 consecutive steps
DiffusionGemma also supports Thinking Mode. Adding the <|think|> token at the start of the system prompt enables the internal thinking channel. The model produces its reasoning process between <|channel>thought and <channel|> tags, followed by the final answer.
For a broader guide on local LLM deployment, including different quantization strategies, security, and data sovereignty, check our previous article on Enterprise Local LLM Deployment.
Unsloth Fine-tuning with Sudoku Example
One of DiffusionGemma's most striking use cases is fine-tuning for specific domain tasks. Google and Unsloth conducted a fine-tuning experiment to teach the model Sudoku solving. Sudoku is a natural challenge for autoregressive models because each number in a cell depends on other numbers in the same row, column, and 3x3 square. Every token depends on future tokens. Autoregressive models, which only look left, struggle to learn this structure.

DiffusionGemma's bidirectional attention structure naturally solves this problem. After fine-tuning, the model can fill Sudoku boards and iteratively correct its mistakes. This capability points to broad application potential in code infilling, mathematical proofs, and bioinformatics sequence analysis.
Fine-tuning with Unsloth makes it possible to train the model approximately 1.5x faster and with 60% less VRAM. Unsloth supports visual, text, audio, and RL (Reinforcement Learning) fine-tuning for the Gemma 4 family, and this support continues for DiffusionGemma. You can start with 3GB VRAM on Colab, Kaggle, or local environments.
The fine-tuning process, thanks to Unsloth's optimizations, provides significant resource savings compared to traditional Flash Attention 2 setups. This is a democratizing advantage for academic researchers and independent developers. As we discussed in our Small Language Models (SLM) article, demand for efficient AI power is growing in 2026. DiffusionGemma adds a new dimension to this trend in terms of speed and memory efficiency.
Trade-offs and Limitations
When evaluating DiffusionGemma, we must consider both the speed-quality trade-off and some technical limitations.
There is an important warning for Apple Silicon Mac users. Google states that the model's speedup relies on exploiting compute intensity rather than memory bandwidth. Devices with unified memory architecture like Apple Silicon are typically memory bandwidth bound during inference. Therefore, the same speedup over autoregressive Gemma 4 may not be achievable on MacBook Pro or Mac Studio devices. The speedup is more pronounced on accelerators with discrete memory and high compute capacity, such as NVIDIA GPUs.
From a cloud services perspective, DiffusionGemma may not be as efficient as autoregressive models in high QPS (queries per second) scenarios. Autoregressive models can batch thousands of requests simultaneously, sharing memory bandwidth. DiffusionGemma's parallel structure is optimized for small batch sizes. This makes it ideal for local, interactive usage but not yet perfect for large-scale cloud services.
The quality gap is also non-negligible. Falling behind Gemma 4 in academic benchmarks like MMLU, AIME, LiveCodeBench, and GPQA shows that the model cannot yet directly replace autoregressive models in critical production tasks. However, for scenarios where speed matters, such as chatbots, code completion, and live note-taking, this quality difference may be acceptable.
Comparison with Other Models and Approaches
DiffusionGemma is not the only text diffusion model. Google DeepMind is also running the Gemini Diffusion research project. This project aims to give users more control, creativity, and speed in text generation. DiffusionGemma positions itself as the open-source and community-focused extension of this research.
Looking at alternative acceleration approaches:
- Multi-Token Prediction (MTP): Used by Gemma 4, this technique predicts 4 tokens in a single forward pass. DiffusionGemma processes 256 tokens simultaneously. MTP preserves the autoregressive structure while increasing speed. DiffusionGemma completely changes the structure.
- Speculative Decoding: Accelerates the large model with a smaller draft model. This method is also autoregressive-based and backward compatible with existing models.
- Lookahead Decoding: Pre-computes future tokens. Again works within the autoregressive framework.
DiffusionGemma represents the most radical change in this list. It completely abandons the token-by-token generation paradigm. This radical change brings both the biggest advantage (parallelism) and the biggest risk (ecosystem incompatibility). Most existing inference engines, prompt caching strategies, and deployment pipelines are designed for autoregressive models. Special support is being added for DiffusionGemma in frameworks like vLLM, Hugging Face Transformers, MLX, and NVIDIA NeMo, but widespread adoption will take time.
NVIDIA is optimizing DiffusionGemma on Hopper and Blackwell architectures with NVFP4 (4-bit floating point) kernel support. NVIDIA DGX Spark, DGX Station, and RTX PRO workstations are also on the official support list. This shows Google's strategy to position the model in both consumer and enterprise markets.
Conclusion: Speed or Quality?
DiffusionGemma is a harbinger of a new paradigm in the large language model world. The 4x speedup offers a serious alternative to the latency problem that autoregressive models have failed to solve for years. But this speed comes at the cost of quality. The regression in MMLU and code benchmarks shows that the model will not yet replace GPT-4, Claude, or Gemma 4 in production.
The model's real power emerges in interactive applications. For real-time code completion, live chat, code infilling, and special domain tasks (Sudoku, amino acid sequences), DiffusionGemma's bidirectional attention and iterative correction capabilities are unique. The ability to run with 16 GB VRAM via Unsloth and its open-source license (Apache 2.0) make the model accessible to independent developers and academic researchers.
In 2026, two major trends in AI are efficiency and speed. DiffusionGemma serves both. Thanks to its MoE architecture, it delivers the power of a 26B model with only 3.8B active parameters. The diffusion mechanism overcomes the memory bandwidth bottleneck by increasing compute intensity. With these two innovations combined, approaching 1000 tokens/second speeds at home or in your studio with a single RTX 4090 or 5090 becomes possible.
Google's announcement of this model once again emphasizes the importance of different architectural explorations in the open-source AI ecosystem. Transformer and autoregressive are not mandatory. Diffusion is an idea transferred from visual generation to text, and the first results are promising. We look forward with curiosity to how the fine-tuning community and inference engines will evolve the model in the coming months.
Have you tried DiffusionGemma? Share your local setup experiences or fine-tuning results in the comments. You can also reach out to me on X/Twitter and LinkedIn, and explore other AI and software content on the blog. See you in the next article.
This article was compiled from the Google DeepMind official blog post, the Unsloth Hugging Face page, and Unsloth documentation.
Efe Hüseyin Özkan
Software Engineer & AI Developer
Working on AI systems, full-stack development, and scalable product architecture. Follow the blog for more technical articles.