Gemma 4 31B
By Google · United States
Updated 2026-07-13
Overview
Google's dense 31B multimodal model with native text, image, and audio support across 140+ languages. Ranked #3 on Chatbot Arena's open leaderboard with a 256K context window.
When to pick this model
- Multilingual production apps spanning 100+ languages
- Native audio input and analysis workflows
- Long-context document and codebase analysis
- On-prem multimodal chat backends
- Replacing GPT-4o-class APIs with local weights
VRAM requirements by quantization
| Quantization | VRAM required |
|---|---|
| Q4_K_M (recommended) | 18 GB |
| Q5_K_M | 22 GB |
| Q8_0 | 33 GB |
| FP16 (no quantization) | 62 GB |
VRAM figures include model weights plus a typical 8k KV cache and ~600 MB runtime overhead (Ollama / llama.cpp baseline). Add headroom for higher context lengths.
In practice, Gemma 4 31B wants a 24 GB card at Q4_K_M (18 GB). Stepping up to Q8_0 nearly doubles the footprint to 33 GB, and unquantized FP16 weights take 62 GB — plan your GPU around the Q4 or Q5 figure unless you specifically need the higher fidelity.
Without a GPU, Gemma 4 31B needs roughly 32 GB of system RAM to run on CPU via llama.cpp or Ollama — workable for background jobs, but far slower than GPU inference. Throughput estimates from our compatibility engine: around 3 tokens/sec on entry-level GPUs, on the order of 12 tokens/sec on a mid-range card, and up to 30 tokens/sec on high-end hardware — assuming the chosen quantization fully fits in VRAM.
What hardware do you need
The table below matches Gemma 4 31B to common GPU memory tiers, using the highest-fidelity quantization that fully fits each card class. Spilling layers to system RAM works but costs most of the speed, so size your card to the quantization you actually want to run.
| GPU memory | Example cards | Best fit for Gemma 4 31B |
|---|---|---|
| 8 GB | RTX 5070 Laptop, RTX 5060, RTX 5060 Ti 8GB | Does not fit — needs 18 GB at Q4_K_M |
| 12 GB | RTX 5070, RTX 5070 Ti Laptop, RTX 4080 Laptop | Does not fit — needs 18 GB at Q4_K_M |
| 16 GB | RTX 5080, RTX 4080 Super, Radeon RX 9070 XT | Does not fit — needs 18 GB at Q4_K_M |
| 24 GB | RTX 4090, Radeon RX 7900 XTX, RTX 5090 Laptop | Q5_K_M (22 GB used) |
| 32 GB | RTX 5090 | Q5_K_M (22 GB used) |
Which GPU should you buy to run Gemma 4 31B?
To run Gemma 4 31B locally at Q4, you need ~18 GB of VRAM. The best value for this is a RTX 4090 (24 GB VRAM).
As an Amazon Associate, BestLLMfor earns from qualifying purchases, at no extra cost to you. It does not influence our independent rankings.
Strengths
- #3 on Chatbot Arena's open leaderboard
- Native audio understanding, not just text-to-image
- 256K context window in a dense 31B model
- Strong coverage across 140+ languages
- Backed by Google's training infrastructure
Limitations
- Gemma license is more restrictive than Apache 2.0
- 31B dense model needs ~20GB VRAM in Q4
- Audio quality trails purpose-built ASR models
Typical workloads
In our catalog grid, Gemma 4 31B is filed under Advanced Multimodal, Audio + Vision, Writing — the use cases where its size/quality trade-off makes the most sense. Its tags translate to concrete workloads: vision-language work — screenshots, charts, scanned documents; audio understanding; multilingual workloads.
The 250k-token context window is large enough to hold entire codebases' worth of files or long reports in a single prompt, which is what makes local RAG and document analysis practical. It ships under the Gemma license — commercial use is generally possible but read the specific terms before embedding it in a product.
Architecture & training
Architecture: Dense 31B · multimodal text+image+audio · 256k ctx
Training: 140+ languages.
The best open multimodal generalist of the Gemma line, assuming you can live with the Gemma license.
Quick start
ollama run gemma4:31bOr use the open-source MCP server to query this model from Claude Desktop, Cursor, or any MCP-compatible client.
Similar models worth comparing
Frequently asked questions
How much VRAM does Gemma 4 31B need?
At the recommended Q4_K_M quantization, Gemma 4 31B needs about 18 GB of VRAM. Q8_0 takes 33 GB, and unquantized FP16 weights take 62 GB.
Can Gemma 4 31B run without a GPU?
Yes — with roughly 32 GB of system RAM it runs CPU-only through llama.cpp or Ollama. Expect a fraction of GPU speed, which is fine for background or batch jobs but slow for interactive chat.
What context window does Gemma 4 31B support?
Gemma 4 31B supports a 250k-token context window (256,000 tokens).
Can I use Gemma 4 31B commercially?
Gemma 4 31B ships under the Gemma license. Commercial use is generally permitted subject to its terms — review the license text before shipping a product.
How fast is Gemma 4 31B on consumer hardware?
Our compatibility engine estimates on the order of 12 tokens/sec on a mid-range GPU and up to 30 tokens/sec on high-end cards, assuming the quantization fully fits in VRAM.
Which quantization of Gemma 4 31B should I download first?
Start with Q4_K_M (18 GB) — the standard size/quality sweet spot. Step up to Q5_K_M or Q8_0 only if you have VRAM headroom. On a 24 GB card you can run up to Q5_K_M.