How much VRAM Gemma 4 31B needs, and what it costs to run
This page has referral links: we earn a commission if you buy, at no cost to you.
Trying to decide what to buy? The best GPU for Gemma 4 31B ↓ · Got a card already? See what your PC can run →
Cheapest way to rent it right now
$0.05/hr
NVIDIA GeForce RTX 4060 Ti 16GB · Q2_K · on-demand · ≈ $12/mo at 8h/day
Live price captured Wed, 25 Nov 2026 00:20:07 GMT.It never changes which card is cheapest.
Just want to use it? Per-token API
$0.14in·$0.40out
per 1M tokens · Gemma 4 31B on Novita AI · read Oct 29, 2026
No GPU to manage: you pay per token, which suits occasional use. Your prompts run on Novita's servers, not your own machine.
Price as listed on Novita's pricing page on Oct 29, 2026; it may have changed.
Rent a GPU or pay per token?
A per-token API charges for every token, so it is cheapest when you use Gemma 4 31B a little. A rented GPU charges by the hour whether it is busy or idle, so it only pays off once you push enough tokens through it. Set your daily volume and see where the line falls for this model, using the cheapest live rental that fits and that we have a memory-bandwidth figure for (RTX 4060 Ti, Q2_K, $0.049/hr on-demand) and Novita AI's published rate.
- Pay per token · Novita AI$6.15/mo
$0.21/day · $0.21 per 1M tokens blended at 3:1
- Rent RTX 4060 Ti · Vast.ai$8.39/mo
$0.28/day · 5.7 GPU-hours needed
At 1M tokens/day the API is cheaper. The API is cheaper at every volume: at our estimated speed, renting the RTX 4060 Ti works out to about $0.28 per 1M tokens against the API's $0.21.
At a glance · 3:1 input:output
| Tokens/day | API /mo | Rent /mo |
|---|---|---|
| 100K | $0.61 | $1.47 |
| 1M | $6.15 | $8.39 |
| 10M | $61.50 | $83.91 |
| 100M | $615 | $839 |
Cheaper option in green. 30-day month. Break-even: none, the API stays cheaper.
How we work it out. API cost = input tokens × $0.14 + output tokens × $0.40 per 1M. Rent cost = the hourly price × the GPU time needed, with at least 1 hour billed per day (spin-up, model load and idle time cost money too). GPU time assumes the RTX 4060 Ti writes ~16 output tokens/sec for Gemma 4 31B at Q2_K (our estimate: its 288 GB/s memory bandwidth from the spec sheet, not yet confirmed by a second source ÷ the bytes of weights read per token, × 75% efficiency, one request at a time) and reads prompt tokens 10× faster than it writes. Above 24 GPU-hours a day you would need more than one card.
These are estimates: the tokens/sec figure is our model, not a benchmark, and batching many requests (vLLM, SGLang) can raise a rented card's throughput a lot, which moves the break-even lower. Rental price captured Wed, 25 Nov 2026 05:20:08 GMT. API price as listed by Novita AI on Oct 29, 2026; API prices change.
Memory needed, by quantisation
At 16k context. Weights + KV cache + ~0.8 GB overhead. Memory is in binary GB (1,024³ bytes), the unit GPU memory is sold in; Hugging Face and Ollama list downloads in decimal GB, about 7% more.
| Quant | Weights | KV cache | Total | Quality |
|---|---|---|---|---|
| F16 | 58.3 GB | 1.3 GB | 60.3 GB | Full precision. Reference quality, twice the size of Q8 for no practical gain in most chat use. |
| Q8_0 | 30.9 GB | 1.3 GB | 33.0 GB | Effectively lossless. Use when VRAM is not the constraint. |
| Q6_K | 23.9 GB | 1.3 GB | 25.9 GB | Very close to Q8 at meaningfully less memory. A safe high-quality pick. |
| Q5_K_M | 20.7 GB | 1.3 GB | 22.7 GB | Small, hard-to-notice quality loss. Good balance. |
| Q5_0 | 20.2 GB | 1.3 GB | 22.2 GB | Older-style 5-bit. Q5_K_M is usually the better pick at the same size. |
| Q4_K_M | 17.7 GB | 1.3 GB | 19.7 GB | The community default. Best quality-per-gigabyte for most people. |
| Q4_0 | 16.6 GB | 1.3 GB | 18.6 GB | Older-style 4-bit, measurably worse than Q4_K_M at a similar size. Avoid unless required. |
| IQ4_XS | 15.5 GB | 1.3 GB | 17.5 GB | Newer 4-bit, smaller than Q4_K_M with comparable quality. Needs a recent llama.cpp. |
| Q3_K_M | 14.2 GB | 1.3 GB | 16.3 GB | Noticeable degradation. Use to fit a larger model that would otherwise not run. |
| Q2_K | 12.2 GB | 1.3 GB | 14.2 GB | Heavy degradation. Almost always better to run a smaller model at Q4_K_M instead. |
| IQ3_XS | 12.0 GB | 1.3 GB | 14.0 GB | Aggressive. Usually better than a smaller model at Q4, but test before trusting it. |
Cards that can run it
Best quantisation each card fits at 16k context, with live rental price where we track one.
The best GPU for Gemma 4 31B
Ranked from live rental prices and computed VRAM fit, not opinion. Every card is judged at Q4_K_M with a 8K context, so the comparison is fair; a card that could only run a crushed version isn't listed.
Best value
NVIDIA RTX A5000
Best throughput per dollar among cards that fit.
Cheapest that runs it
NVIDIA RTX A5000
Lowest hourly rental that fits it — $0.068/hr, Q4_K_M.
No compromise
—
Most headroom and highest throughput.
Every card that runs it, ranked
Sorted by tokens/sec per rental dollar. Throughput is a bandwidth-derived estimate.
| GPU | VRAM | VRAM used | ~tok/s | Cheapest rental | tok/s per $ |
|---|---|---|---|---|---|
| NVIDIA RTX PRO 6000 Blackwell Workstation Edition | 96 GB | 19 GB20% | — | $0.467 | — |
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | 96 GB | 19 GB20% | — | $0.243 | — |
| NVIDIA RTX 6000 Ada Generation | 48 GB | 19 GB40% | — | $0.280 | — |
| NVIDIA RTX PRO 5000 Blackwell | 48 GB | 19 GB40% | — | $0.200 | — |
| NVIDIA RTX A6000 | 48 GB | 19 GB40% | — | $0.107 | — |
| AMD Radeon PRO W7900 | 48 GB | 19 GB40% | — | — | — |
| NVIDIA RTX PRO 4500 Blackwell | 32 GB | 19 GB60% | — | $0.267 | — |
| NVIDIA GeForce RTX 5090 | 32 GB | 19 GB60% | — | $0.117 | — |
| NVIDIA RTX 5000 Ada Generation | 32 GB | 19 GB60% | — | $0.265 | — |
| NVIDIA GeForce RTX 3090 Ti | 24 GB | 19 GB79% | — | $0.128 | — |
| AMD Radeon RX 7900 XTX | 24 GB | 19 GB79% | — | — | — |
| NVIDIA RTX PRO 4000 Blackwell | 24 GB | 19 GB79% | — | $0.160 | — |
The value column ranks renting, because that's what we can price precisely (prices captured Wed, 25 Nov 2026 00:20:07 UTC). Buying a card? The fit and throughput columns are what you need; we don't publish a purchase-price ranking because we don't hold verified street prices. Tokens/sec is an estimate, not a benchmark. Got a card already? See everything your PC can run.
gemma-4-31bHow these numbers are produced
- Model shape comes from the model's own config.json — 10 layers, 32 attention heads, 4 KV heads.
- Weight size is parameters × effective bits-per-weight. Those constants are checked against real published quantised file sizes — median error 0.7% across 40 measurements.
- KV cache is 2 × layers × KV-heads × head-dim × context × 2 bytes. Using KV-heads rather than attention heads is what makes this correct for grouped-query attention; treating a GQA model as multi-head overstates the cache by up to 8×.
- Tokens/sec is an estimate, not a benchmark. Generation is memory-bandwidth-bound, so this is bandwidth ÷ weight-bytes derated to 75%. Real throughput depends on your runtime, batch size and kernels. We don't run our own hardware tests — see our editorial policy.
- Some memory-bandwidth figures are not yet independently verified.Where that's the case we show no tokens/sec at all rather than a number we can't stand behind.
- Rental prices are pulled hourly from provider APIs (last updated Wed, 25 Nov 2026 00:20:07 GMT). Spot/interruptible pricing can change or vanish without notice.
Try it interactively
Drag the context slider and watch the KV cache fill the card
Running Gemma 4 31B: common questions
How much VRAM do you need to run Gemma 4 31B?
Can an RTX 4090 run Gemma 4 31B?
Can an RTX 3090 run Gemma 4 31B?
Can an RTX 4060 Ti 16GB run Gemma 4 31B?
What's the cheapest way to run Gemma 4 31B?
Worth reading before you buy
Which Gemma 4 size fits your GPU? Match E4B up to 31B to your VRAM
8GB gets E4B, 12GB gets 12B, 16GB gets 12B at Q8 (or 26B-A4B with Google's own 4-bit file), and 24GB gets 26B-A4B or 31B. The VRAM for each size and quant, the exact Ollama tag (the bare one pulls a small model), the 4K-context default that catches Ollama users on cards under 24GB, and when Qwen3.8 27B is the better pick.
How much VRAM do you need?
About 0.57 GB per billion parameters at 4-bit, plus room for context: the rule behind the numbers on this page, with worked examples.
The best GPU for local AI right now
The card with enough VRAM for your model at the lowest price, budget by budget.
Rent a cloud GPU or buy one?
Rent, unless you'll pass about 2,000 hours of use: the break-even and the costs people forget on both sides.