Gemma 4 31B

Google's current dense multimodal model, distributed with quantization-aware-trained 4-bit weights that hold quality better than a post-hoc quantization. Fits a 24 GB card. Note the Gemma licence is not an OSI open-source licence and carries use restrictions.

Google DeepMindDensegeneral24 machines can run it
Run locally →
Total parameters
31.273B
Official spec sets memory need
Active parameters
31.273B
Official spec sets decode speed
Context
256K
Official spec tokens
4-bit weights
17 GB
Calculated before KV cache
Model specification
Publisher
Google DeepMind Official spec
Architecture
Dense transformer Official spec
Total parameters
31.273B Official spec
Context length
262,144 tokens Official spec
Attention ⓘ
GQA · 16 KV heads × 256 dim × 60 layers Official spec
Licence
Gemma Terms of Use Official spec source
Specification confidence ⓘ
High · verified 2026-10-19 Official spec source
Released
1 Mar 2026 Official spec
Official source
Quantizations and memory
QuantizationFormatBits/weightResidentDownloadQuality kept
MLX 4-bitmlx4.517.0 GB17.0 GB98.0%
Q4_K_Mdefaultgguf4.8518.2 GB18.2 GB98.5%
Q5_K_Mgguf5.6921.3 GB21.3 GB99.3%
Q8_0gguf8.531.6 GB31.6 GB99.9%
BF16safetensors1658.3 GB58.3 GB100.0%
Generic weight sizes are computed from the parameter count and bits per weight plus a format-specific overhead. Runtime-specific artifacts use their published resident and download footprints; streamed models can therefore require much more disk than memory. Quality retention is an assumption, not a measured evaluation.
Coding & quality benchmarksCompare coding results →

No published benchmark results have been imported for this model yet. This is missing evidence, not a score of zero.

We show source metrics rather than deriving one opaque quality number. Different benchmarks measure genuinely different things, and collapsing them into a single score would hide exactly the disagreements worth seeing.
Recommendations
Cheapest that can run it
~1.1–1.6 t/s · $1,531
Lowest purchase price among configurations where the model fits at some quantization in our catalogue. Speed is not considered.
Cheapest above 20 t/s
~25.8–37.1 t/s · $2,521
20 tokens/second is roughly the point at which generation keeps pace with reading. Below it, interactive use feels like waiting.
Cheapest above 40 t/s
67.3 t/s · $3,332
40 tokens/second is the threshold most people describe as comfortable for coding agents, where output arrives faster than you can review it.
Fastest with real measurements
67.54 t/s measured at Q4_K_M · $3,332
Highest throughput among configurations with an actual published measurement rather than our estimate.
Best throughput per purchase-price unit
67.3 t/s · $3,332
Highest decode tokens/second per 1,000 units of the displayed purchase currency. Ignores running costs and resale — see the economics section for the full picture.
Hardware that runs Gemma 4 31B1 measured, 23 estimated
24 of 24 rows
Hardware↕QuantMemory↕Decode▼Prefill↕ContextPrice↕FitConfidence↕
NVIDIA DGX H200 (8x H200, 1,128 GB)
NVIDIA · 1,128 GB · 38,400 GB/s
Q8_0
recommended
43.8 GB~313–451 t/s~85560–177690 t/s256K$359,430ComfortableEstimated
Quad RTX 5090 workstation (4x 32 GB)
NVIDIA · 128 GB · 7,168 GB/s
Q8_0
recommended
42.2 GB~68.1–98 t/s~3200–6650 t/s64K$12,611ComfortableEstimated
Lenovo ThinkStation PX (4x RTX PRO 6000, 384 GB)
Lenovo · 384 GB · 7,168 GB/s
Q8_0
recommended
42.2 GB~59.4–85.5 t/s~4110–8530 t/s256K$58,553ComfortableEstimated
RTX 5090 workstation (1x 32 GB)
NVIDIA · 32 GB · 1,792 GB/s
Q4_K_M
recommended
27.2 GB67.3 t/s—8K$3,332BorderlineHigh
Dual RTX 5090 workstation (2x 32 GB)
NVIDIA · 64 GB · 3,584 GB/s
Q8_0
recommended
41.4 GB~45.2–65.1 t/s~1600–3330 t/s16K$5,854ComfortableEstimated
Dell Precision 7960 Rack (2x RTX PRO 6000, 192 GB)
Dell · 192 GB · 3,584 GB/s
Q8_0
recommended
41.4 GB~41.4–59.6 t/s~2050–4270 t/s128K$36,663ComfortableEstimated
Dual used RTX 4090 workstation (48 GB)
NVIDIA · 48 GB · 2,016 GB/s
Q5_K_M
recommended
30.9 GB~38–54.6 t/s~1780–3700 t/s16K$3,692ComfortableEstimated
RTX PRO 6000 Blackwell workstation (96 GB)
NVIDIA · 96 GB · 1,792 GB/s
Q8_0
recommended
41.0 GB~31.8–45.8 t/s~1040–2160 t/s32K$10,359ComfortableEstimated
RTX PRO 6000 Max-Q workstation (96 GB, 300 W)
NVIDIA · 96 GB · 1,792 GB/s
Q8_0
recommended
41.0 GB~31.8–45.8 t/s~852–1770 t/s32K$10,809ComfortableEstimated
Radeon AI PRO R9700 workstation (32 GB)
AMD · 32 GB · 644 GB/s
Q4_K_M
recommended
27.2 GB~25.8–37.1 t/s~786–1630 t/s8K$2,521BorderlineEstimated
NVIDIA DGX Station GB300 (748 GB)
NVIDIA · 748 GB · 7,100 GB/s
Q8_0
recommended
41.0 GB~25.5–36.6 t/s~11430–23740 t/s256K$90,082ComfortableEstimated
Mac Studio M5 Ultra 512 GB
Apple · 512 GB · 1,200 GB/s
Q8_0
recommended
41.0 GB~25.2–36.2 t/s~928–1930 t/s256K$11,350ComfortableEstimated
Mac Studio M5 Ultra 256 GB
Apple · 256 GB · 1,200 GB/s
Q8_0
recommended
41.0 GB~25.2–36.2 t/s~928–1930 t/s128K$8,647ComfortableEstimated
Mac Studio M5 Ultra 96 GB
Apple · 96 GB · 1,200 GB/s
Q8_0
recommended
41.0 GB~25.2–36.2 t/s~742–1540 t/s32K$5,945ComfortableEstimated
Mac Studio M5 Max 36 GB
Apple · 36 GB · 614 GB/s
Q4_K_M
recommended
27.2 GB~22.6–32.6 t/s~371–771 t/s8K$2,702FitsEstimated
Mac Studio M3 Ultra 512 GB
Apple · 512 GB · 819 GB/s
Q8_0
recommended
41.0 GB~14.1–20.2 t/s~224–465 t/s256K$8,287ComfortableEstimated
Mac Studio M3 Ultra 256 GB
Apple · 256 GB · 819 GB/s
Q8_0
recommended
41.0 GB~14.1–20.2 t/s~224–465 t/s128K$5,674ComfortableEstimated
Mac Studio M5 Max 128 GB
Apple · 128 GB · 614 GB/s
Q8_0
recommended
41.0 GB~13.1–18.8 t/s~464–964 t/s64K$4,323ComfortableEstimated
Mac Studio M5 Max 64 GB
Apple · 64 GB · 614 GB/s
Q8_0
recommended
41.0 GB~13.1–18.8 t/s~464–964 t/s16K$3,512ComfortableEstimated
Mac mini M4 Pro 64 GB
Apple · 64 GB · 273 GB/s
Q8_0
recommended
41.0 GB~4.7–6.7 t/s~38.9–80.7 t/s16K$2,251ComfortableEstimated
NVIDIA DGX Spark 128 GB
NVIDIA · 128 GB · 273 GB/s
Q8_0
recommended
41.0 GB~4.5–6.4 t/s~399–830 t/s64K$3,873ComfortableEstimated
Framework Desktop (Ryzen AI Max+ 395, 128 GB)
AMD · 128 GB · 256 GB/s
Q8_0
recommended
41.0 GB~3–4.4 t/s~110–229 t/s64K$2,161ComfortableEstimated
GMKtec EVO-X2 (Ryzen AI Max+ 395, 128 GB)
AMD · 128 GB · 256 GB/s
Q8_0
recommended
41.0 GB~2.6–3.8 t/s~110–229 t/s64K$1,711ComfortableEstimated
CPU-only workstation (Ryzen 9950X, 192 GB DDR5)
Generic · 192 GB · 90 GB/s
Q8_0
recommended
41.0 GB~1.1–1.6 t/s~13.3–27.6 t/s128K$1,531ComfortableEstimated
Submit a benchmarkContributions are reviewed before publication.
Similar models