Skip to content
Updated minutes ago
Google

Gemma 4 31B-IT

Google · dense · 31B parameters · 32,768 context

Quality
77.0

Parameters

31B

Context Window

32K tokens

Architecture

Dense

Best GPU

H20

Cheapest API

$0.30/M

Quality Score

77/100

Intelligence Brief

Gemma 4 31B-IT is a 31B parameter DENSE model from Google, featuring Grouped Query Attention (GQA) with 62 layers and 4,096 hidden dimensions. With a 32,768 token context window, it supports tools, vision, structured output, code, math, multilingual, reasoning. On standardized benchmarks, it achieves MMLU 83, HumanEval 68, GSM8K 89.5. The most cost-effective API deployment is via google at $0.30/M output tokens. For self-hosted inference, H20 delivers optimal throughput at $940/month.

Architecture Details

TypeDENSE
Total Parameters31B
Active Parameters31B
Layers62
Hidden Dimension4,096
Attention Heads32
KV Heads16
Head Dimension128
Vocab Size262,144

Memory Requirements

BF16 Weights

62.0 GB

FP8 Weights

31.0 GB

INT4 Weights

15.5 GB

KV-Cache per Token507904 bytes
Activation Estimate1.80 GB

GPU Compatibility Matrix

Gemma 4 31B-IT is compatible with 62% of GPU configurations across 41 GPUs at 3 precision levels.

BF16 (Full)
FP8 (Half)
INT4 (Quarter)
Blackwell(7 GPUs)
B200 NVL (pair)360GB
B300288GB
B100 SXM192GB
GB200 NVL72 (per GPU)192GB
Hopper(7 GPUs)
H100 NVL 94GB (per GPU pair)188GB
H200 SXM141GB
H2096GB
GH20096GB
Ada Lovelace(11 GPUs)
L40S48GB
L4048GB
RTX 6000 Ada48GB
L2048GB
Ampere(16 GPUs)
A100 80GB SXM80GB
A100 80GB PCIe80GB
A1664GB
RTX A600048GB
Legend:No fitVery tightTightModerateGoodExcellent

GPU Recommendations

H20optimal

FP8 · 1 GPU · tensorrt-llm

100/100

score

Throughput

1.1K tok/s

Latency (ITL)

1.0ms

Est. TTFT

0ms

Cost/Month

$940

Cost/M Tokens

$0.34

Use this config →
H200 SXMoptimal

FP8 · 1 GPU · tensorrt-llm

95/100

score

Throughput

1.1K tok/s

Latency (ITL)

1.0ms

Est. TTFT

0ms

Cost/Month

$2553

Cost/M Tokens

$0.93

Use this config →
H100 SXMoptimal

FP8 · 1 GPU · tensorrt-llm

95/100

score

Throughput

904.0 tok/s

Latency (ITL)

1.1ms

Est. TTFT

0ms

Cost/Month

$1794

Cost/M Tokens

$0.75

Use this config →

Deployment Options

API

API Deployment

google

$0.30/M

output tokens

Self-Hosted

Single GPU

H20

$940/mo

Min VRAM: 31 GB

Scale

Multi-GPU

A10G x4

172.7 tok/s

TP· $1139/mo

API Pricing Comparison

ProviderInput $/MOutput $/MBadges
google$0.15$0.30
Cheapest

Cost Analysis

ProviderInput $/MOutput $/M~Monthly Cost
googleBest Value$0.15$0.30$2

Cost per 1,000 Requests

Short (500 tok)

$0.14

via google

Medium (2K tok)

$0.54

via google

Long (8K tok)

$1.80

via google

Performance Estimates

Throughput by GPU

H20
1.1K tok/s
H200 SXM
1.1K tok/s
H100 SXM
904.0 tok/s

VRAM Breakdown (H20, FP8)

Weights
Act
Weights 31.0 GBKV-Cache 4.2 GBActivations 14.4 GBOverhead 1.6 GB

Precision Impact

bf16

62.0 GB

weights/GPU

fp8

31.0 GB

weights/GPU

~1.1K tok/s

int4

15.5 GB

weights/GPU

Quality Benchmarks

Above Average
83th percentile across all models
MMLU
83.0
Average (69th pctile)
HumanEval
68.0
Above Average (84th pctile)
GSM8K
89.5
Average (69th pctile)
MT-Bench
97.3
Bottom 25% (0th pctile)
HellaSwag
85.0
Top 10% (94th pctile)

Capabilities

Features

Tool Use Vision Code Math Reasoning Multilingual Structured Output

Supported Frameworks

vllmsglangtgitensorrt-llmollama

Supported Precisions

BF16 (default)FP8INT4

Where to Deploy Gemma 4 31B-IT

Similar Models

Larger context, Lower qualityCompare →
Smaller context, Lower qualityCompare →
Smaller context, Lower qualityCompare →

Qwen 2.5 32B

32.5B params · dense

Quality: 73

from $0.80/M

Larger context, More expensiveCompare →
Larger context, More expensiveCompare →

Frequently Asked Questions

How much VRAM does Gemma 4 31B-IT need for inference?

Gemma 4 31B-IT requires approximately 62.0 GB of VRAM at BF16 precision, 31.0 GB at FP8, or 15.5 GB at INT4 quantization. Additional VRAM is needed for KV-cache (507904 bytes per token) and activations (~1.80 GB).

What is the best GPU for Gemma 4 31B-IT?

The top recommended GPU for Gemma 4 31B-IT is the H20 using FP8 precision. It achieves approximately 1.1K tokens/sec at an estimated cost of $940/month ($0.34/M tokens). Score: 100/100.

How much does Gemma 4 31B-IT inference cost?

Gemma 4 31B-IT API inference starts from $0.15/M input tokens and $0.30/M output tokens. Self-hosted inference costs depend on your GPU configuration — use our ROI calculator for a detailed breakdown.