All cards

Gemma 4 (26B-A4B / 31B)

Google DeepMind · Released: unverified (Unsloth posted GGUF benchmarks Apr 20) · Last verified 2026-10-16

Apache-2.0 multimodal family. 26B-A4B MoE for speed, 31B dense for quality. New thinking control tokens and a strict multi-turn rule.

Recommended quants

Chat template Works

Uses standard system/user/assistant roles. Thinking is enabled by putting <|think|> at the start of the system prompt. Larger models may emit an empty thought block when thinking is off.

Fix: Do not feed prior thought blocks back into history (only final answers). Ollama handles the template for you.

Sampling settings

All tasks (Google default)temp 1.0, top_p 0.95, top_k 64
Disable thinking (llama-server)--chat-template-kwargs '{"enable_thinking":false}' (llama-cli may not work reliably)

Runtimes

vLLMWorksNVFP4 documented by Unsloth.
llama.cppWorksDocumented by Unsloth.
OllamaWorksOfficial gemma4 tags incl. 26b, 31b and MLX tags. If '500 unable to load model', update Ollama (Unsloth).
LM StudioUnverified
MLXWorksUnsloth MLX quants + Ollama MLX tags.

Tool calling in agent tools

Claude Code (local endpoint)UnverifiedOllama documents ollama launch claude --model gemma4.
OpenCodeUnverifiedOllama documents ollama launch opencode --model gemma4.
ClineUnverified
AiderUnverified

Known issues

Sources checked

Spotted something wrong or a new fix? Corrections are reviewed before publishing. (Submission form coming soon.)