Skip to content
Updated minutes ago
Google

Gemma 3 4B

Google · dense · 4.3B parameters · 131,072 context

Quality
54.0

Parameters

4.3B

Context Window

128K tokens

Architecture

Dense

Best GPU

A4000

Cheapest API

$0.10/M

Quality Score

54/100

Intelligence Brief

Gemma 3 4B is a 4.3B parameter DENSE model from Google, featuring Grouped Query Attention (GQA) with 34 layers and 2,560 hidden dimensions. With a 131,072 token context window, it supports tools, vision, structured output, code, math, multilingual. On standardized benchmarks, it achieves MMLU 60, HumanEval 32, GSM8K 58. The most cost-effective API deployment is via google at $0.10/M output tokens. For self-hosted inference, A4000 delivers optimal throughput at $161/month.

Architecture Details

TypeDENSE
Total Parameters4.3B
Active Parameters4.3B
Layers34
Hidden Dimension2,560
Attention Heads32
KV Heads8
Head Dimension128
Vocab Size262,144

Memory Requirements

BF16 Weights

8.6 GB

FP8 Weights

4.3 GB

INT4 Weights

2.1 GB

KV-Cache per Token139264 bytes
Activation Estimate0.50 GB

GPU Compatibility Matrix

Gemma 3 4B is compatible with 98% 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

A4000optimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

281.3 tok/s

Latency (ITL)

3.6ms

Est. TTFT

1ms

Cost/Month

$161

Cost/M Tokens

$0.22

Use this config →
RTX 4080optimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

450.2 tok/s

Latency (ITL)

2.2ms

Est. TTFT

0ms

Cost/Month

$304

Cost/M Tokens

$0.26

Use this config →
RTX 4070 Tioptimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

316.4 tok/s

Latency (ITL)

3.2ms

Est. TTFT

1ms

Cost/Month

$237

Cost/M Tokens

$0.29

Use this config →

Deployment Options

API

API Deployment

google

$0.10/M

output tokens

Self-Hosted

Single GPU

A4000

$161/mo

Min VRAM: 4 GB

Scale

Multi-GPU

RTX 3070 x2

408.6 tok/s

TP· $171/mo

API Pricing Comparison

ProviderInput $/MOutput $/MBadges
google$0.05$0.10
Cheapest

Cost Analysis

ProviderInput $/MOutput $/M~Monthly Cost
googleBest Value$0.05$0.10$1

Cost per 1,000 Requests

Short (500 tok)

$0.05

via google

Medium (2K tok)

$0.18

via google

Long (8K tok)

$0.60

via google

Performance Estimates

Throughput by GPU

A4000
281.3 tok/s
RTX 4080
450.2 tok/s
RTX 4070 Ti
316.4 tok/s

VRAM Breakdown (A4000, BF16)

Weights
Act
Weights 8.6 GBKV-Cache 2.3 GBActivations 4.0 GBOverhead 0.7 GB

Precision Impact

bf16

8.6 GB

weights/GPU

~281.3 tok/s

fp8

4.3 GB

weights/GPU

int4

2.1 GB

weights/GPU

Quality Benchmarks

Average
60th percentile across all models
MMLU
60.0
Bottom 25% (19th pctile)
HumanEval
32.0
Bottom 25% (14th pctile)
GSM8K
58.0
Bottom 25% (24th pctile)
MT-Bench
72.0
Bottom 25% (0th 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 3 4B

Similar Models

Smaller context, Lower quality, Smaller modelCompare →

Gemma 3 12B

12B params · dense

Quality: 71

from $0.10/M

Higher quality, Larger modelCompare →

Minitron 4B

4B params · dense

Quality: 50

from $0.06/M

Smaller context, CheaperCompare →

Nemotron Mini 4B

4B params · dense

Quality: 48

from $0.06/M

Smaller context, Lower quality, CheaperCompare →

Frequently Asked Questions

How much VRAM does Gemma 3 4B need for inference?

Gemma 3 4B requires approximately 8.6 GB of VRAM at BF16 precision, 4.3 GB at FP8, or 2.1 GB at INT4 quantization. Additional VRAM is needed for KV-cache (139264 bytes per token) and activations (~0.50 GB).

What is the best GPU for Gemma 3 4B?

The top recommended GPU for Gemma 3 4B is the A4000 using BF16 precision. It achieves approximately 281.3 tokens/sec at an estimated cost of $161/month ($0.22/M tokens). Score: 100/100.

How much does Gemma 3 4B inference cost?

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