DiffusionGemma - How to Run Locally
DiffusionGemma 26B-A4B is Google DeepMind’s new open multimodal model, built on the Gemma 4 MoE architecture. With support for 256K context, 140+ languages, DiffusionGemma is designed for high-speed text generation across text, video and image inputs. DiffusionGemma can run locally on 18GB RAM, and fine-tuning is now supported via Unsloth.
Instead of standard token-by-token decoding, DiffusionGemma uses diffusion generation to produce outputs in parallel and gradually refine them into a final answer - similar to diffusion image models, but for text. Run the model via Unsloth Studio or llama.cpp. On a RTX 6000, DiffusionGemma can reach 2000+ tokens/s. GGUF: diffusiongemma-26B-A4B-it-GGUF
Run DiffusionGemmaFine-tune DiffusionGemma
Jun 12: You can now run DiffusionGemma via Unsloth Studio ✨ with 1.8x faster inferece!
Usage Guide
DiffusionGemma is designed for users who need faster generation than standard models. It is suited to fast local inference, long-context doc analysis, image/video understanding, OCR and document parsing, code generation, tool use, agentic workflows, and low-latency small-batch inference.
Unlike standard Gemma 4 models, DiffusionGemma requires a diffusion-aware inference runtime. Autoregressive settings such as temperature, top_p, and top_k alone are not enough to reproduce the recommended behavior without the required diffusion sampler.

Hardware requirements
It's generally best to have at least 18GB RAM to run the model in 4-bit precision. GGUF: diffusiongemma-26B-A4B-it-GGUF
Table: DiffusionGemma Inference GGUF recommended hardware requirements (units = total memory: RAM + VRAM, or unified memory).
18 GB
20 GB
24 GB
28 GB
52 GB
As a rule of thumb, your total available memory should at least exceed the size of the quantized model you download. If it does not you can still run using partial RAM / disk offload, but generation will be slower. You will also need more compute, depending on the context window you use.
Run DiffusionGemma Tutorials
It's best to use at least 4-bit precision so we'll use the 4-bit Q4_K_M quant which needs 18GB RAM. GGUF: diffusiongemma-26B-A4B-it-GGUF
🦥 Unsloth Studio Guide🦙 Llama.cpp Guide
🦥 Unsloth Studio Guide
You can now run DiffusionGemma via Unsloth Studio ✨. Ensure you use v0.1.463-beta or 2026.6.6.
DiffusionGemma can now be run and trained in Unsloth Studio, our new open-source web UI for local AI. Unsloth Studio lets you run models locally on MacOS, Windows, Linux and:
Search, download, run GGUFs and safetensor models
Self-healing tool calling + web search
Code execution (Python, Bash)
Automatic inference parameter tuning (temp, top-p, etc.)
Fast CPU + GPU inference via llama.cpp
Train LLMs 2x faster with 70% less VRAM

Install Unsloth
Ensure you use the latest v0.1.463-beta or 2026.6.6. Run in your terminal:
MacOS, Linux, WSL:
Windows PowerShell:
Search and download DiffusionGemma
On first launch you will need to create a password to secure your account and sign in again.
Then go to the Studio Chat tab and search for DiffusionGemma in the search bar and download your desired model and quant.
Run DiffusionGemma
Inference parameters should be auto-set when using Unsloth Studio, however you can still change it manually. You can also edit the context length, chat template and other settings.
For more information, you can view our Unsloth Studio inference guide.

🦙 Llama.cpp Guide
For this tutorial, we will be utilizing the Dynamic 4-bit Q4_K_M quant which needs 18GB RAM and llama.cpp for fast local inference, especially if you have a CPU.
Obtain the SPECIFIC llama.cpp PR on GitHub here. You can follow the build instructions below as well. Change -DGGML_CUDA=ON to -DGGML_CUDA=OFF if you don't have a GPU or just want CPU inference. For Apple Mac / Metal devices, set -DGGML_CUDA=OFF then continue as usual - Metal support is on by default.
Download the model via (after installing pip install huggingface_hub). You can choose Q4_K_M or other quantized versions like Q8_0 . If downloads get stuck, see: Hugging Face Hub, XET debugging
Chat with DiffusionGemma
Then run the below:
You will see:

And if you type a question like "Create a Flappy Bird Game", you will see steps:

Then afterwards you'll see the output:

You can continue conversing as well!
Change -n 2048 as the number of tokens you want to predict, so more will produce longer answers.
Live visualization of diffusion
To see diffusion actually live, use the below - specially enable --diffusion-visual:
You will again see:

And we get:

All parameters for llama.cpp using the branch:
-n, --n-predict N- target tokens; derives--diffusion-blocksand grows-ub/-b/-c.-ngl 99- offload all layers to the GPU (-ngl 0for CPU-only).-cnv- multi-turn conversation mode.--diffusion-visual- live canvas denoising view.The Entropy-Bound sampler is on by default (
--diffusion-eb auto). Tune it with--diffusion-eb-max-steps(default 48),--diffusion-eb-t-max/--diffusion-eb-t-min(0.8 -> 0.4),--diffusion-eb-entropy-bound(0.1), and--diffusion-eb-confidence(0.005).--diffusion-kv-cache {auto,on,off}- prompt prefix KV cache (auto = on for single GPU).
Fine-tune DiffusionGemma
You can now train and fine-tune DiffusionGemma directly with Unsloth. In our example, we demonstrate the impact of domain-specific training by fine-tuning the model on Sudoku. The base model initially performs poorly on Sudoku tasks, but after training on a targeted dataset, it learns how to actually solve sudoku and solves every example correctly.
You can use our Colab notebook (A100) to fine-tune DiffusionGemma with:

Recommended Settings
Unsloth Studio automatically sets the best inference settings for your model. Use below if necessary:
Sampling
Method
diffusion_sampling
Sampling
Sampler
entropy_bounded_denoising
Sampling
Max denoising steps
48
Temperature
Temperature schedule
linear_decay
Temperature
Temperature start
0.8
Temperature
Temperature end
0.4
Entropy
Entropy bound
0.1
Adaptive stopping
Adaptive stopping enabled
true
Adaptive stopping
Entropy threshold
0.005
Canvas
Canvas length
256
Adaptive Stopping Trigger Conditions
Adaptive stopping should trigger only when both conditions are met:
Average canvas entropy
< 0.005
Highest-probability tokens stable for 2 consecutive steps
true
At each denoising step, the sampler should select the lowest-entropy tokens whose mutual information bound remains: entropy_bound = 0.1. Non-selected tokens should be fully renoised before the next denoising step.
Thinking Mode
DiffusionGemma supports Gemma 4-style thinking mode. To enable thinking, add the thinking token at the start of the system prompt:
When thinking is enabled, the model may emit an internal reasoning channel followed by the final answer:
To disable thinking, remove the <|think|> token from the system prompt. When thinking is disabled, the model may still emit an empty thought channel:
For multi-turn conversations, do not include previous hidden thoughts in the conversation history. Only include the final assistant response before the next user turn.
DiffusionGemma Best Practices
Multimodal Prompting
DiffusionGemma supports interleaved multimodal inputs, including text and images. Video can be processed as sequences of image frames.
For best results with multimodal prompts, place image or frame content before text instructions. Example:
For document parsing, OCR, chart understanding, UI understanding, or small text extraction, use a higher visual token budget.
Supported visual token budgets:
70
Fast classification, simple captioning
140
Lightweight visual QA
280
General image understanding
560
OCR, charts, UI screenshots
1120
Dense documents, small text, detailed extraction
For video-style inputs, DiffusionGemma can process up to 60 seconds when sampled at 1 frame per second.
Sampling Notes
DiffusionGemma is not a normal next-token-only model. It generates a block of tokens, called a canvas, by repeatedly refining noisy token predictions. The generation process works roughly as follows:
The encoder processes the prompt and builds a context cache.
The decoder receives a 256-token generation canvas.
The diffusion sampler iteratively denoises the canvas.
Confident tokens are selected and preserved.
Uncertain tokens are renoised and refined again.
Once the canvas is complete, it is appended to the context.
The model continues with the next canvas.
This block-autoregressive approach allows DiffusionGemma to generate many tokens in fewer forward passes than a standard autoregressive model.
Benchmarks
DiffusionGemma is optimized for speed and multimodal reasoning, though standard Gemma 4 is stronger on conventional reasoning benchmarks.
MMLU Pro
77.6%
82.6%
AIME 2026 no tools
69.1%
88.3%
LiveCodeBench v6
69.1%
77.1%
Codeforces ELO
1429
1718
GPQA Diamond
73.2%
82.3%
Tau2 Average
56.2%
68.2%
HLE no tools
11.0%
8.7%
HLE with search
11.9%
17.2%
BigBench Extra Hard
47.6%
64.8%
MMMLU
81.5%
86.3%
MRCR v2 8 needle 128K average
32.0%
44.1%
Vision benchmarks:
MMMU Pro
54.3%
73.8%
OmniDocBench 1.5, lower is better
0.319
0.149
MATH-Vision
70.5%
82.4%
MedXPertQA MM
49.0%
58.1%
Last updated
Was this helpful?

