Gemma 4 31B IT
Data checked: 2026-11-25. Review interval shown below. Prices need review after 30 days; specifications and benchmark collections after 90 days. Dates describe the recorded check, not a live retailer quote.
- Verified Checked against the primary source (for example the model’s config.json on Hugging Face).
- Sourced Taken from a cited source; not yet independently checked.
- Estimate Calculated with the published formulas; not a measurement.
- Sample Placeholder data for layout; not a real figure.
- Not yet measured No public, citable score found for this benchmark yet. We never fill the gap with a guess.
Verified metadata is not a measured performance result. Only cited runs matching model, device, quant and recorded context can replace speed estimates. Estimates assume one stream and F16 KV cache, with a ±25% uncertainty band. A published run applies only to its recorded runtime and conditions; missing settings are unknown.
Evidence labels · Freshness policy · Calculation methodology
At a glance
The other Issue 001 24 GB model. Q4_K_M is 18.32 GB. Fifty of the sixty layers only look at the last 1,024 tokens, so the KV cache stays smaller as context grows.
At Q4_K_M and 8k context it needs about 21.1 GB: 18.3 GB of weights, 2.2 GB of KV cache and 0.6 GB of runtime overhead. It is dense, so every token reads all 18.3 GB of weights; speed scales with memory bandwidth. 50 of its 60 layers use a 1,024-token sliding window, which keeps the cache small at long context.
Estimated setup
Quant | Q4_K_M |
|---|---|
Smallest standard card size at 8k | 24 GB |
Max context, 24 GB card | 16k |
Runtimes | llama.cpp, Ollama, LM Studio, MLX |
Quantization options
Total memory = weights + KV cache (F16) + runtime overhead. File sizes marked Verified are the sum of GGUF files from unsloth/gemma-4-31B-it-GGUF on the Hugging Face API. KV cache costs 0.983 MB per token before sliding-window savings.
Quant | bpw | File | At 8k | At 32k | At 128k | KL-divergence | 24 GB card, 8k |
|---|---|---|---|---|---|---|---|
| Q3_K_M | 3.91 | 14.7 GBVerified | 17.5 GB | 21.7 GB | 38.6 GB | — | Fits |
| Q4_K_M | 4.85 | 18.3 GBVerified | 21.1 GB | 25.3 GB | 42.1 GB | — | Fits |
| Q5_K_M | 5.69 | 21.7 GBVerified | 24.4 GB | 28.6 GB | 45.5 GB | — | Needs offload |
| Q6_K | 6.56 | 25.2 GBVerified | 27.9 GB | 32.2 GB | 49.0 GB | — | Needs offload |
| Q8_0 | 8.50 | 32.6 GBVerified | 35.4 GB | 39.6 GB | 56.5 GB | — | Needs offload |
| F16 | 16.00 | 61.4 GBVerified | 64.2 GB | 68.4 GB | 85.2 GB | reference | Needs offload |
Why this matters: What is quantization? · What is a KV cache?
Decode speed by device
Q4_K_M, single stream, 8k context. Estimates use the decode formula (η × bandwidth ÷ bytes per token; see methodology) and are ±25% until measured.
Speed table
Device | Verdict | Decode, tok/s | Range | Runtime |
|---|---|---|---|---|
| GeForce RTX 5090 32 GB | Fits | 52.4Estimate | ±25% | llama.cpp (estimate) |
| 2× RTX 5090 64 GB | Fits | 52.4Estimate | ±25% | llama.cpp (estimate) |
| NVIDIA RTX PRO 6000 Blackwell 96 GB | Fits | 52.4Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 4090 24 GB | Fits | 29.5Estimate | ±25% | llama.cpp (estimate) |
| Radeon RX 7900 XTX 24 GB | Fits | 28.1Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 3090 24 GB (used) | Fits | 27.4Estimate | ±25% | llama.cpp (estimate) |
| 2× RTX 3090 (used) 48 GB | Fits | 27.4Estimate | ±25% | llama.cpp (estimate) |
| Mac Studio M5 Ultra (base) | Fits | 26.3Estimate | ±25% | llama.cpp (estimate) |
| Mac Studio M5 Ultra · 512 GB | Fits | 26.3Estimate | ±25% | llama.cpp (estimate) |
| Mac Studio M5 Max · 128 GB | Fits | 13.5Estimate | ±25% | llama.cpp (estimate) |
| Intel Arc Pro B60 24 GB | Fits | 13.3Estimate | ±25% | llama.cpp (estimate) |
| MacBook Pro M4 Max 40c · 128 GB | Fits | 12.0Estimate | ±25% | llama.cpp (estimate) |
| Mac Studio M5 Max (base) | Fits | 10.1Estimate | ±25% | llama.cpp (estimate) |
| MacBook Pro M5 Pro · 48 GB | Fits | 6.7Estimate | ±25% | llama.cpp (estimate) |
| Mac mini M4 Pro · 48 GB | Fits | 6.0Estimate | ±25% | llama.cpp (estimate) |
| NVIDIA DGX Spark FE 128 GB | Fits | 6.0Estimate | ±25% | llama.cpp (estimate) |
| Ryzen AI Max+ 395 mini PC 64 GB | Fits | 5.6Estimate | ±25% | llama.cpp (estimate) |
| Ryzen AI Max+ 395 mini PC 128 GB | Fits | 5.6Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 5080 16 GB | Needs offload | 5.0Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 5070 Ti 16 GB | Needs offload | 5.0Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 4080 Super 16 GB | Needs offload | 4.8Estimate | ±25% | llama.cpp (estimate) |
| Radeon RX 9070 XT 16 GB | Needs offload | 4.7Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 5060 Ti 16 GB | Needs offload | 4.4Estimate | ±25% | llama.cpp (estimate) |
| Radeon RX 9060 XT 16 GB | Needs offload | 4.0Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 4060 Ti 16 GB | Needs offload | 3.8Estimate | ±25% | llama.cpp (estimate) |
| Intel Arc Pro B50 16 GB | Needs offload | 3.5Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 5070 12 GB | Needs offload | 3.1Estimate | ±25% | llama.cpp (estimate) |
| Intel Arc B580 12 GB | Needs offload | 3.0Estimate | ±25% | llama.cpp (estimate) |
| GeForce RTX 3060 12 GB (used) | Needs offload | 2.9Estimate | ±25% | llama.cpp (estimate) |
| CPU only · Ryzen 9 9950X + 128 GB DDR5 | Fits | 2.2Estimate | ±25% | llama.cpp (estimate) |
Compare with similar-sized models
Model | Parameters | Quality score | Licence |
|---|---|---|---|
| Gemma 4 31B IT | 31.3 B | 1,443Sourced | Apache-2.0 |
| gpt-oss-20b | 20.9 B | 1,287Sourced | Apache-2.0 |
| Mistral Small 3.2 24B | 24.0 B | 1,338Sourced | Apache-2.0 |
LMArena text, overall, entry 'Gemma 4 31B': 1442.9 (95% CI 1435.5–1450.3, 6,118 votes), leaderboard published 2026-11-22. CC-BY-4.0. Dataset
llama-perplexity --kl-divergence on a fixed corpus. Speed and quality are never merged into one score. Sample values are illustrative and must not be used to select a model.Architecture
Parameters, total | 31.27 BVerifiedsafetensors.total from the HF API. The model card lists 30.7B for the text model and about 550M for the vision encoder; this total is the whole checkpoint. Source |
|---|---|
Parameters, active per token | 31.27 BVerifiedDense: all parameters active. Source |
Layers | 60VerifiedSource |
Query heads | 32VerifiedSource |
KV heads (GQA) | 16VerifiedSliding-window layers use this KV shape. Full-attention layers use num_global_key_value_heads (4) and global_head_dim 512. The fit formula applies this shape to every layer. Source |
Head dimension | 256VerifiedSource |
Hidden size | 5376VerifiedSource |
Sliding window | 1,024 tokensVerifiedLocal attention window. Source |
Sliding-window layers | 50 of 60VerifiedCount of layer_types entries equal to sliding_attention (50 of 60). The other 10 are full_attention. Source |
Operating conditions
Max context | 262,144 tokensVerifiedmax_position_embeddings. The model card calls this a 256K context. Source |
|---|---|
Licence | Apache-2.0VerifiedSource |
Weights | google/gemma-4-31B-it |
GGUF files | unsloth/gemma-4-31B-it-GGUF |
Usable memory, discrete | VRAM − 0.5 GB2 |
Usable memory, unified | RAM × 0.752 |
Fits when | total ≤ 90% of usable2 |
1 Estimates: decode ≈ η × bandwidth ÷ (active weights + KV cache), η 0.60 discrete / 0.45 unified / 0.50 CPU (see methodology). Not measurements.
2 Fit rules (see methodology), including the 0.75 unified-memory factor used by canirun.ai.
Flags: Verified = checked against config.json / HF API; Sourced = from a cited source; Estimate = formula; Sample = placeholder. Markdown · JSON · Report a problem