Gemma 4 31B IT
Gemma 4 31B IT by Google DeepMind (30.7B parameters). At Q4_K_M with an 8K context it needs about 19.8 GiB of memory. Google's dense 30.7B with image input and a 256K context, under Apache-2.0 (Gemma 3 used Google's own terms); it fits a 20–24 GB card at 4-bit.
Last updated: 2026-10-13
Model facts
Run it
ollama run gemma4:31b
Memory needed
Weights + KV cache + runtime overhead, in GiB. Lower quantization = less memory, slightly lower quality.
| Quantization | 4K context | 8K context | 32K context |
|---|---|---|---|
| Q4_K_M | 19.6 GiB | 19.8 GiB | 20.7 GiB |
| Q5_K_M | 22.8 GiB | 22.9 GiB | 23.9 GiB |
| Q6_K | 26.2 GiB | 26.3 GiB | 27.3 GiB |
| Q8_0 | 33.3 GiB | 33.5 GiB | 34.4 GiB |
| FP16 | 61.5 GiB | 61.6 GiB | 62.6 GiB |
Which hardware runs it
Best quantization that fits each device with a 8K context. Estimates, not benchmarks. See the methodology.
Frequently asked questions
How much VRAM does Gemma 4 31B IT need?
With an 8K context, about 19.8 GiB at Q4_K_M and 33.5 GiB at Q8_0 (weights + KV cache + runtime overhead). Longer contexts need more memory for the KV cache.
Can Gemma 4 31B IT run on an GeForce RTX 4090?
Yes. Gemma 4 31B IT fits on the GeForce RTX 4090 (24 GB) at Q5_K_M with an 8K context, using about 22.9 GiB, at an estimated 32 tokens/s.
Can I run Gemma 4 31B IT on a Mac?
Yes. Gemma 4 31B IT fits on the M3 Ultra (96 GB) at FP16 with an 8K context, using about 61.6 GiB, at an estimated 8.7 tokens/s.
Can Gemma 4 31B IT be used commercially?
Gemma 4 31B IT is released under Apache-2.0. The licence allows commercial use (read its conditions).
Sources
- https://ai.google.dev/gemma/docs/releases
- https://ai.google.dev/gemma/docs/gemma_4_license
- https://huggingface.co/google/gemma-4-31B-it
- https://huggingface.co/google/gemma-4-31B-it/resolve/main/config.json
- https://huggingface.co/api/models/google/gemma-4-31B-it?expand[]=safetensors
- https://ollama.com/library/gemma4/tags