1. Commercial use
“each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work”
Any use is allowed, paid products included; no fee and no credit line is required to use it.
ai.google.dev/gemma/docs/gemma_4_license2. On your machine
Our estimate: about 0.6 GB per billion parameters at 4-bit, with room for the context.
huggingface.co/google/gemma-4-31B-it3. Through an API
Cheapest live provider with tool calling, as the provider reports its price.
huggingface.co/docs/inference-providers4. Tool calling
Providers whose API supports tool calling for this model, as each reports it.
huggingface.co/google/gemma-4-31B-itChecked against its official pages on Nov 23, 2026. Tap a verdict to see its source.How we checkedReport an error
What Gemma 4 31B does
Gemma 4 31B is an open text and image model by Google DeepMind that chats, writes code, reasons step by step and reads pictures, documents and screenshots. It is the largest dense size of the Gemma 4 family. The model files are on Hugging Face, free to use in paid products under the Apache 2.0 license.
What people use it for
Chat assistant and drafts
Run your own assistant for support chats, emails, summaries or marketing text, on your own server instead of a paid hosted model.
Read documents, charts and screenshots
Ask questions about a photo, a scanned page, a chart or an app screen, including text in many languages and handwriting.
Agents that call your tools
Let the model pick a function from your app (search, booking, database lookup) and fill in its inputs, as the core of an agent.
Write and fix code
Generate, complete and correct code locally, for example inside a private coding assistant.
Long files in one go
Give it up to 256K tokens at once, so a long report or a large part of a codebase fits in one request.
Many languages
Answer users in 35+ languages out of the box; it was trained on text in over 140 languages.
Gemma 4 31B popularity
As reported by Hugging Face, checked Nov 26, 2026. Downloads include automated ones; some repositories report none.
Where to run Gemma 4 31B
Through an API
| Provider | $ per 1M in / out | Tools | Context |
|---|---|---|---|
| CoreWeave (99.6% up, 24h) | $0.1 / $0.34 | Yes | 262K |
| Venice (99.8% up, 24h) | $0.12 / $0.36 | Yes | 256K |
| NextBit (100% up, 24h) | $0.125 / $0.34 | Yes | 262K |
| Crusoe (100% up, 24h) | $0.14 / $0.4 | Yes | 260K |
| Parasail (100% up, 24h) | $0.15 / $0.4 | Yes | 262K |
| PrimeIntellect (95.2% up, 24h) | $0.186 / $0.312 | Yes | 262K |
| DeepInfra (99.8% up, 24h) | $0.2 / $0.4 | Yes | 262K |
| OpenRouter | $0.2 / $0.4 | Yes | 262K |
| Modal (100% up, 24h) | $0.34 / $0.1 | Yes | 131K |
| ModelRun (100% up, 24h) | $0.75 / $1 | Yes | 262K |
As reported by each provider via Hugging Face Inference Providers and OpenRouter, checked Nov 26, 2026.
On your machine
31.3B
about 18.8 GB
Our estimate: 0.6 GB per billion parameters, with room for the context.
57 on Hugging Face
For llama.cpp, Ollama and LM Studio; e.g. ggml-org/gemma-4-31B-it-GGUF
15 on Hugging Face
For Apple silicon
Gemma 4 31B license
Free to use, change and sell inside paid products under Apache 2.0. If you pass the model files on, include a copy of the license and mark the files you changed.
Any use is allowed, paid products included; no fee and no credit line is required to use it.
“each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work” source
Shipping the weights or a fine-tuned copy needs a copy of the Apache 2.0 license and a note on changed files.
“You must cause any modified files to carry prominent notices stating that You changed the files” source
You may build and deliver client projects with it under the same Apache 2.0 terms.
“each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work” source
Alternatives
Gemma 4 31B This page
Qwen · image-text-to-text
moonshotai · image-text-to-text
meta-llama · text-generation
Qwen · image-text-to-text
Get started
Tell your AI assistant
“Run google/gemma-4-31B-it locally with the latest transformers (pip install -U transformers torch accelerate), load it with AutoProcessor and AutoModelForMultimodalLM (dtype="auto", device_map="auto"), put images before text, use temperature 1.0, top_p 0.95, top_k 64, and read answers through processor.parse_response.”
Install the libraries.
pip install -U transformers torch accelerateFrom huggingface.co/google/gemma-4-31B-it/raw/main/README.md
Load the model and its processor.
from transformers import AutoProcessor, AutoModelForMultimodalLM MODEL_ID = "google/gemma-4-31B-it" # Load model processor = AutoProcessor.from_pretrained(MODEL_ID) model = AutoModelForMultimodalLM.from_pretrained( MODEL_ID, dtype="auto", device_map="auto" )From huggingface.co/google/gemma-4-31B-it/raw/main/README.md
Send a chat with apply_chat_template and generate; add enable_thinking=True when you want step-by-step reasoning.
From huggingface.co/google/gemma-4-31B-it/raw/main/README.md
Model id to use
OpenAI-compatible: base URL https://openrouter.ai/api/v1
google/gemma-4-31b-itOpenAI-compatible: base URL https://router.huggingface.co/v1
google/gemma-4-31B-itA community GGUF build on Hugging Face; read its card before use.
ggml-org/gemma-4-31B-it-GGUFMistakes to avoid
The model card says Gemma 4 needs the latest Transformers and shows only this loading code.
The card says earlier thoughts must not be added before the next user turn.
Google recommends this order for the best results with images.
The card gives one standard setting for all uses.
With thinking on, the raw text holds the reasoning block before the answer.
Questions
Can I use Gemma 4 31B in a paid app?
Yes. It is under Apache 2.0, which allows commercial use; keep the license text with any copies of the files you share.
Does it understand images and audio?
Images and video frames, yes. Audio no; only the E2B, E4B and 12B sizes take audio.
How do I turn on thinking?
Set enable_thinking=True in apply_chat_template (or start the system prompt with the think token); parse_response then separates the reasoning from the answer.
What is the difference from Gemma 4 26B A4B?
31B is a dense model and scores higher in Google's table; 26B A4B uses only 3.8B active parameters per step and runs almost as fast as a 4B model.