What hardware do you need to run Gemma 4 31B it?
Gemma 4 31B it at Q4_K_M is 20 GB of weights, with a context ceiling of 256k tokens. On the cheapest machine that runs it, a Framework Desktop, 32GB, it generates 8.3 tok/s at 32k of context, worked out from memory bandwidth.
How good is Gemma 4 31B it, really?
On the Artificial Analysis Intelligence Index v4.3 it scores 15 (reasoning mode; 14 without), which puts it in the Haiku-class band. In the same band as Anthropic's cheap, fast tier. Every current OpenAI model scores above this band. See the whole table.
Head to head with its neighbours on the leaderboard: vs Qwen3.5 122B-A10B above it, vs Granite 4.2 30B below. Also head to head: vs Gemma 3 27B it, the last-generation Gemma nearest it in size. One more model needs much the same memory at 32k of context: vs Qwen3.6 35B-A3B.
What Gemma 4 31B it costs either way
Renting the same model costs $0.1 per million input tokens and $0.34 per million output (OpenRouter, cheapest active endpoint, checked 2026-10-29). Buying a machine only beats that if you use it hard enough, for long enough, that the hardware price divides down below the rental bill. What a million tokens costs each way puts the two prices side by side.
Machines that run Gemma 4 31B it
Every machine here runs it, but not to the same length. The Strix Halo Framework Desktop, 32GB stops at 32k; the DGX Spark GB10 Grace Blackwell, 128GB takes it to 256k, which is this model's own ceiling and the longest the calculator offers. The weights are the same size on every machine; what differs is the memory left for the key-value cache, which grows with every token you keep.
| Machine | Price | Speed at 32k | Longest context | Pay-back | |
|---|---|---|---|---|---|
| Strix Halo Framework Desktop, 32GB | $1,269 | 8.3 tok/s estimated | 32k | Pays back in 103 years | Run the numbers |
| AMD Radeon AI PRO R9700, 32GB | $1,299card only | 24 tok/s estimated | 64k | Pays back in 91 years | Run the numbers |
| NVIDIA GeForce RTX 5090, 32GB | $1,999card only | 53 tok/s estimated | 64k | Pays back in 131 years | Run the numbers |
| Mac mini M5 Pro, 48GB | $2,299 | 10 tok/s estimated | 128k | Pays back in 171 years | Run the numbers |
| Mac Studio M5 Max, 36GB | $2,499 | 15 tok/s estimated | 64k | Pays back in 159 years | Run the numbers |
| MacBook Pro M5 Pro (16-inch), 48GB | $3,599 | 10 tok/s estimated | 128k | Pays back in 268 years | Run the numbers |
| DGX Spark GB10 Grace Blackwell, 128GB | $4,699 | 8.9 tok/s estimated | 256k | Pays back in 396 years | Run the numbers |
The table is the cheapest machine in each family, not the only one that runs it: 39 of the 56 machines on this site hold it at 32k. Within a family only memory decides, so that is every Mac Studio and Strix Halo box at any size, every NVIDIA card with 32GB or more, every Mac mini and MacBook Pro with 48GB or more, the Radeon AI PRO R9700, 32GB and the DGX Spark, 128GB. One table sets every machine against the others: price, the memory its GPU can use, what it holds and how long it takes to pay for itself.
One machine per family, cheapest first. Speeds are measured where a public benchmark exists and estimated from memory bandwidth otherwise; the calculator says which for any configuration. The longest context is the longest setting the calculator offers that the machine still holds this model at, cache included, and no machine is shown taking it past its own 256k limit. Each one opens the calculator on that machine at that length.
For scale, the calculator starts from 80 tok/s for a hosted API and times a local machine against it. Nothing above reaches it, and the quickest is 53 tok/s.
The cheapest machine that runs it is sold with 32 GB. There is a page on what 32 GB runs, machine by machine: it names the 6 machines here sold at that size, and the 32 current models the roomiest of them holds at 32k, this one among them.
Run Gemma 4 31B it at 256k on the DGX Spark GB10 Grace Blackwell, 128GB
How much memory does Gemma 4 31B it need at 256k?
Every figure above is priced at 32k of context. At 256k, which is this model's own ceiling and the longest the calculator offers, Gemma 4 31B it needs 41.9 GB rather than 23.1 GB. The weights are the same either way; the key-value cache goes from 3.5 GB to 22.3 GB.
28 of the 37 machines here still sold at a published price hold Gemma 4 31B it at 32k and 20 hold it at 256k. The cheapest still sold goes from the Framework Desktop, 32GB at $1,269 to the Corsair AI Workstation 300, 64GB at $1,700.
On the Corsair AI Workstation 300, 64GB it runs 8.3 tok/s estimated at 32k and 4.6 tok/s estimated at 256k. Every token generated reads the whole cache back, so a longer window is slower as well as bigger.
Two more machines, at a shorter window
The table above lists the machines that run it at 32k, the context the calculator starts on, where Gemma 4 31B it needs 23 GB. Two more machines hold it at a shorter window, because the weights are the same size either way and the key-value cache is not. None of them is cheaper than the table above, which starts at $1,269.
| Machine | Price | Longest window it fits | Needs there |
|---|---|---|---|
| Mac mini M6, 32GB | $1,299 | 4k | 21 GB |
| MacBook Pro M5 (14-inch), 32GB | $2,399 | 4k | 21 GB |
One machine per family, cheapest first, from the same list as the table above. Each window is the longest setting the calculator offers that the machine still holds this model at, and it opens the calculator on that machine at that length. What it needs there is the weights plus the key-value cache at that window, measured against the memory each machine's GPU can address, which that machine's own page gives.
The specifics
- Parameters
- 31.3B
- Quantisation
- Q4_K_M
- Weights on disk
- 20 GB
- KV cache
- 3.5 GB at 32k context — 10 of 60 layers grow with the context, at four KV heads by 512 wide; the other 50 stop at a 1,024-token window, at sixteen heads by 256. How weights and cache add up.
- Maximum context
- 256k tokens
- Licence
- Apache 2.0
- Sources
- bartowski/google_gemma-4-31b-it-GGUF, google/gemma-4-31b-it, google/gemma-4-31B-it