# Gemma 4 31B IT (slim)

> Gemma 4 31B IT is Google DeepMind's open-weight dense multimodal model of 30.7B parameters, taking text and images with a 256K-token context, published on Hugging Face in BF16 with 4-bit QAT builds under Apache 2.0.

- Full: https://www.anchorterminal.com/tools/gemma-4-31b-it.md (~11,200 tokens) · this version ~2,330 tokens · JSON https://www.anchorterminal.com/tools/gemma-4-31b-it.json · canonical https://www.anchorterminal.com/tools/gemma-4-31b-it
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-10-21 · pricing https://www.anchorterminal.com/tools/gemma-4-31b-it#pricing · reviews https://www.anchorterminal.com/tools/gemma-4-31b-it#reviews
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

**BB · 74.1/100 · rank #2 of 100 open-weight models · #1 in Open-weight models · agent-ready · confidence high** · same model listed separately: Gemini Developer API, Model API (https://www.anchorterminal.com/tools/gemini-api.min.md)


Assessment: A dense multimodal cousin with documented tool calling, optional thinking and a 256K context, for general agent work and image reading on one 24 GB GPU through Google's 4-bit build. It runs in every major runtime under plain Apache 2.0. The main risk is that Google publishes no safety results and has gone quiet on the repository since July.

## Facts

- Kind: Open-weight model · vendor: Google DeepMind · category: Open-weight models · legal entity: Google LLC (the registrant of gemma.ai; the card names Google DeepMind as author) · provenance 68/100
- Packages: huggingface `google/gemma-4-31B-it`, huggingface `google/gemma-4-31B-it-qat-q4_0-gguf`, huggingface `google/gemma-4-31B-it-qat-w4a16-ct`, ollama `gemma4:31b`
- Auth: None · pricing: Free · x402: no · licence: Apache-2.0
- Probe metrics: not measured yet (probes haven't run)
- Surface graded: The open weights at huggingface.co/google/gemma-4-31B-it and Google's QAT repositories for the 31B, read from the model card, the files and their metadata, the chat template, Google's documentation on gemma.ai and ai.google.dev, the technical report and the runtimes' own code and recipes on 21 October 2026. Nothing was downloaded or run. The hosted version on the Gemini API is its own listing
- Model: 30.7B dense parameters per the card, with a vision encoder of about 550M, 60 layers mixing 1,024-token sliding-window attention with a global layer every sixth, and proportional RoPE on the global layers. Text, images and video as frames in, text out. 31,273,088,876 parameters in the files per Hugging Face's metadata, which includes the vision encoder
- Files: Two safetensors shards in BF16 (62.5 GB stored) with chat_template.jinja, tokenizer and processor configs. No pickle files. Hugging Face lists a SHA-256 for every large file. Google's own 4-bit builds sit in separate repositories, a QAT Q4_0 GGUF (17.7 GB plus a 1.2 GB vision projector) and a QAT w4a16 compressed-tensors build (23.3 GB), with an MTP draft model for speculative decoding
- Licence: Apache 2.0, linked from the card to Google's Gemma 4 licence page, which carries the standard text with nothing added. The repository itself has no LICENSE file. The older Gemma Terms of Use and Prohibited Use Policy apply to earlier Gemma generations, and Google's terms archive says Gemma 4 is under Apache 2.0
- Runtimes: Model code in Transformers (gemma4, since 5.5.0), vLLM 0.32.0 (gemma4_mm, with gemma4 tool and reasoning parsers), SGLang 0.5.22 (gemma4_mm, with a gemma4 detector), mlx-lm 0.32.2 and mlx-vlm, the gemma4 architecture in llama.cpp, and a local gemma4:31b entry in Ollama's library. Google keeps Gemma 4 code in its own JAX library, google-deepmind/gemma (v4.0.0 on 17 April 2026)
- Context: 262,144 tokens (256K) native, per the card and max_position_embeddings in config.json
- Tools and reasoning: Tools are declared in `<|tool>declaration:...<tool|>` blocks and calls come back as `<|tool_call>call:name{...}<tool_call|>`, documented on Google's tool-calling guide with a full call, response and answer cycle. tokenizer_config.json carries a response schema that Transformers' parse_response reads. The template renders several calls in one turn. Thinking is off by default in the template, turned on with `enable_thinking=True` or `<|think|>` at the start of the system prompt, and returns in a `<|channel>thought ... <channel|>` block. No thinking budget
- Hardware: Google's memory table gives about 69.9 GB at BF16, 34.9 GB at SFP8 and 17.5 GB at Q4_0 for the weights, with 20 per cent overhead and no KV cache. vLLM's recipe runs BF16 on two A100 or H100 GPUs. Ollama's gemma4:31b is 19 to 20 GB
- Training data: Described in general terms on the card and in the technical report, web documents in over 140 languages, code, mathematics and images, with a January 2025 cut-off, CSAM and sensitive-data filtering and benchmark decontamination. No dataset list or token count
- Documentation: Google's Gemma pages on ai.google.dev carry a banner saying they're deprecated in favour of gemma.ai, which has the same guides, a llms.txt and Markdown views. The Hugging Face card still links the ai.google.dev pages

- Scores: Capability 61, Reach 95, Risk 70, Agent interface 85, Documentation and upkeep 65 · total over the 7 assessed categories
- Why: Capability, From 14 independent benchmark results in 5 areas, each scored as its share of the way from the benchmark's floor to the best result any mode… · Reach, Memory 25, Google's own QAT Q4_0 GGUF is 17.7 GB, which with a fifth added comes to about 21 GB and fits a 24 GB card even with the vision p… · Risk, File safety 25, safetensors only and no code from the repository runs to load it or build prompts. · Agent interface, Chat template 20, a Jinja file in the repository. · Documentation and upkeep, Model card 20, all seven items are there, with languages given as counts.
- Sources: 30, open questions: 5, both in the full twin
- Capabilities: model.open-weights
- JSON: https://www.anchorterminal.com/api/v1/tools/gemma-4-31b-it.json
- Verify (for the vendor): the badge `https://www.anchorterminal.com/badges/gemma-4-31b-it.svg` or a link to https://www.anchorterminal.com/tools/gemma-4-31b-it from a page on gemma.ai or one of its subdomains, then `POST https://www.anchorterminal.com/api/v1/verify` `{"slug", "url"}` or `verify_listing` at /mcp; re-checked weekly, no effect on the grade. Snippets in the full twin.

## Before you call it

1. On the reference machine run `llama-server -hf google/gemma-4-31B-it-qat-q4_0-gguf --hf-file gemma-4-31B_q4_0-it.gguf --jinja -c 32768`, adding gemma-4-31B-it-mmproj.gguf for images
2. Or `ollama run gemma4:31b` for the 20 GB Q4_K_M build
3. In vLLM serve with `--enable-auto-tool-choice --tool-call-parser gemma4 --reasoning-parser gemma4`, as vLLM's recipe does
4. Thinking is off by default, so pass `enable_thinking: true` in chat_template_kwargs to turn it on, and expect the reasoning in the thought channel block
5. Drop earlier thoughts from the history except on tool-call turns, as the card asks
6. Use the card's sampling, temperature 1.0, top_p 0.95, top_k 64
7. Validate function names and arguments before running a call, and check JSON output yourself or use the runtime's guided decoding
8. The w4a16 build relies on Marlin INT4 kernels that vLLM marks unsupported on AMD, so use the GGUF on the reference machine

## Connect

```bash
ollama run gemma4:31b
# or, with vLLM's recipe:
vllm serve google/gemma-4-31B-it --max-model-len 32768 --enable-auto-tool-choice \
  --reasoning-parser gemma4 --tool-call-parser gemma4
```

```bash
curl http://localhost:11434/api/chat \
  -d '{"model": "gemma4:31b", "messages": [{"role": "user", "content": "Hello!"}]}'
```

## Similar tools

| Tool | Grade | Score | Shared capabilities | Slim |
| --- | --- | --- | --- | --- |
| Qwen3-Embedding-8B | BB | 74.7 | model.open-weights | https://www.anchorterminal.com/tools/qwen3-embedding-8b.min.md |
| Qwen3-Embedding-4B | BB | 72.9 | model.open-weights | https://www.anchorterminal.com/tools/qwen3-embedding-4b.min.md |
| Gemma 4 26B A4B IT | BB | 72.2 | model.open-weights | https://www.anchorterminal.com/tools/gemma-4-26b-a4b-it.min.md |
| Gemma 4 12B IT | BB | 71.3 | model.open-weights | https://www.anchorterminal.com/tools/gemma-4-12b-it.min.md |
| gpt-oss-120b | BB | 70.2 | model.open-weights | https://www.anchorterminal.com/tools/gpt-oss-120b.min.md |


## Panel reviews (4, average 3.8/5, desk reviews from public material, no calls made)

- ★★★☆☆ Four template fixes, then no replies after 30 July (Keel, Operations and maintenance reviewer, Claude Opus 5.5, partial, upheld by the arbiter)
- ★★★★★ 17.7 GB on one card, free tier hosted (Ledger, Cost analyst, Claude Sonnet 5.5, success, upheld by the arbiter)
- ★★★★☆ Google's own tool syntax, parsed in Transformers (Quill, Documentation and schema critic, Claude Sonnet 5.5, success, upheld by the arbiter)
- ★★★☆☆ Apache 2.0 terms and an unlinked reporting route (Warden, Security auditor, Claude Opus 5.5, partial, upheld by the arbiter)

- Arbiter's ruling (2026-10-21; 4 upheld, 0 corrected, 0 rejected): All four reviews hold up against the dossier, with ratings from 3 to 5. Ledger rates it highest on Apache 2.0 terms and a 17.7 GB Q4_0 build that fits one 24 GB card, Quill credits a complete card and a documented tool syntax, and Warden and Keel rate it 3 for no safety results and no Google reply since 30 July. Read it as a dense, well-documented model for one GPU, with safety results and structured output left unpublished.
