Gemma 4 31B
The largest dense model in Google's Gemma 4 family at 30.7B parameters, tuned for consumer GPUs. Apache 2.0 license.
Key Specifications
- Context window
- 256K tokens
- Knowledge cutoff
- Released
- Parameters
- 30.7B
- Inputs
- Text, image
- Capabilities Show details
- Reasoning Thinks before it answers, always on or as a switchable mode. Function calling Connect to external tools, APIs, and systems. Structured output Return responses in structured formats like JSON.
Hosted API pricing
| Provider | Input / 1M tokens | Output / 1M tokens | Cost at 10M in + 2M out | |
|---|---|---|---|---|
|
|
$0.13 | $0.37 | $2.04 | View |
|
|
$0.14 | $0.40 | $2.20 | View |
|
|
$0.39 | $0.97 | $5.84 | View |
|
|
$0.50 | $0.50 | $6.00 | View |
|
|
Open weights, no hosted price | View | ||
Heads up: Base-tier, on-demand rates per 1M tokens; cached, batch and long-context tiers excluded. A provider may serve a shorter context or a quantized build than the creator's release. Verify before provisioning. More on how we price.
Estimated cost to self-host
Gemma 4 31B needs about 22 GB of GPU memory at 4-bit with 32K context. The cheapest rental that fits is 2× RTX 4070 at about $130 a month.
That costs the same as roughly 762M tokens a month on Geodd's API. Self-hosting is more expensive below that volume.
| Precision | Cheapest, 32K context | Cheapest, full 256K context |
|---|---|---|
| 4-bitINT4 / FP4 |
|
|
| 8-bitFP8 / INT8 |
|
|
| 16-bitFP16 / BF16 |
|
|
Estimates based on median on-demand rates for Nvidia GPUs. Memory is weights plus KV cache for one request, using FP8 KV cache where supported and FP16/BF16 otherwise. Break-even assumes a 5:1 input-to-output ratio. No guarantee of runtime support, usable performance, or that a matching quantized build exists. How we estimate costs.
Similarly priced models
The models nearest Gemma 4 31B by blended rate, each at its own cheapest provider.
| Model | Blended / 1M | Input / 1M | Output / 1M | Context | Cutoff | vs Gemma 4 31B |
|---|---|---|---|---|---|---|
|
|
$0.15 | $0.15 | $0.15 | 256K | −12% | |
|
|
$0.15 | $0.10 | $0.40 | 1M | −12% | |
|
|
$0.155 | $0.05 | $0.68 | 128K | Dec 2023 | −9% |
|
|
$0.1583 | $0.09 | $0.50 | 1M | Jun 2025 | −7% |
|
|
$0.1633 | $0.14 | $0.28 | 1M | −4% | |
|
|
$0.17 | $0.13 | $0.37 | 256K | Jan 2025 | |
|
|
$0.1717 | $0.09 | $0.58 | 262K | +1% | |
|
|
$0.175 | $0.13 | $0.40 | 128K | Dec 2023 | +3% |
|
|
$0.1967 | $0.13 | $0.53 | 262K | +16% | |
|
|
$0.20 | $0.20 | $0.20 | 256K | +18% | |
|
|
$0.2033 | $0.15 | $0.47 | 1M | +20% |
Prices are USD per 1M tokens at each model's cheapest listed provider. Blended is the cost of 10M input plus 2M output tokens, spread over the 12M.
Frequently Asked Questions
What is Gemma 4 31B good for?
Self-hosted text and image work at the heavy end of the Gemma 4 dense models. Apache 2.0 weights, tuned to fit a single consumer GPU.
When is Gemma 4 31B not a good fit?
Audio or video input, and hosted tools like web search or code execution. It is the heaviest Gemma 4 model to serve, and no maximum output is published.
What is the cheapest way to run Gemma 4 31B?
Hosted, unless you push serious volume. Geodd charges $0.13 in / $0.37 out per 1M tokens. The cheapest rental that fits is 2x RTX 4070 at $130 a month, which costs the same as about 762M tokens a month on that API.
Can I self-host Gemma 4 31B?
Yes. The weights are Apache 2.0 licensed. At 4-bit it needs about 22 GB of GPU memory, which starts at roughly $130 a month on the cheapest rental that fits.
More from Google Cloud
| Model | Context | Input / 1M | Output / 1M |
|---|---|---|---|
|
|
1M | $0.10 | $0.40 |
|
|
256K | $0.10 | $0.30 |
|
|
128K | $0.10 | $0.30 |
|
|
1M | $0.25 | $1.50 |
|
|
128K | $0.05 | $0.10 |
|
|
1M | $0.30 | $2.50 |
|
|
1M | $0.30 | $2.50 |
|
|
1M | $0.50 | $3.00 |