Google Cloud logo

Gemma 3 4B

A compact Gemma 3 model for local and edge deployment.

Params
4.3B
Context
128K tokens
Max output
128K
Cutoff
Released
License
Gemma Terms of Use

Hosted API price

Cheapest via DeepInfra · per 1M tokens

USD
Input
$0.05 /1M
Output
$0.10 /1M
Hosted by
DeepInfra Google Cloud 2 providers

Hosted API pricing

How we price

Order

Providers are listed cheapest input rate first, then by output rate, a tie going to the creator's own listing. A provider that lists the model without a published rate sits at the end.

Prices

Base-tier, on-demand rates in USD per 1M tokens, converted at ECB reference rates where a provider publishes in another currency. Cached-input and batch rates show only where a provider publishes them. "Cheapest" marks the one provider with the lowest input and output pair; a tie wears no badge.

Cost

Input rate times the input tokens plus output rate times the output tokens, at the monthly volume set above the table. Cached-input, batch, long-context and reasoning-token billing are not modelled.

Transparency and funding

  • Affiliates: Affiliate links are marked. We may earn a commission if you click them, but commissions never affect the order.

Every provider serving Gemma 3 4B, cheapest input first. Set your monthly volume to see what each would bill.

Every provider serving Gemma 3 4B, with its price per 1M input and output tokens and what the volume above would cost
Provider Input /1M Output /1M Cost at 10M in + 2M out Link
DeepInfra logo DeepInfra $0.05 $0.10 $0.70 Visit website
Google Cloud logo Google Cloud Creator Open weights, no hosted price Visit website

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 3 4B needs about 5 GB of GPU memory at 4-bit with 32K context. The cheapest rental that fits is 1× RTX 3060 at about $65 a month.

That costs the same as roughly 1B tokens a month on DeepInfra's API. Self-hosting is more expensive below that volume.

Fits on 1
What it costs to self-host Gemma 3 4B at each precision: the memory it needs, the cheapest rental that holds it, that rental's month and the API volume it pays off at
Precision Memory Cheapest fit (32K context) Cost /mo Break-even vs API
4-bit INT4 / FP4 5 GB Nvidia logo 1× RTX 3060 $65 1B tokens /mo
8-bit FP8 / INT8 7 GB Nvidia logo 1× RTX 3060 $65 1B tokens /mo
16-bit FP16 / BF16 11 GB Nvidia logo 1× RTX 4060 Ti $94 2B tokens /mo

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. Pricing methodology.

Similarly priced models

The models nearest Gemma 3 4B by blended rate, each at its own cheapest provider.

Models priced nearest Gemma 3 4B per 1M tokens, each at its cheapest provider
Model Blended /1M Input /1M Output /1M Context Cutoff vs Gemma 3 4B
DeepSeek DeepSeek OCR-2 DeepSeek $0.03 $0.03 $0.03 8K −49%
Alibaba Cloud Qwen3.7-Flash Alibaba Cloud $0.047 $0.03 $0.13 1M −20%
OpenAI GPT-OSS-20B OpenAI $0.048 $0.03 $0.14 131K Jun 2024 −17%
Meta Llama 3.2 1B Meta $0.056 $0.027 $0.20 128K Dec 2023 −4%
Cohere Command R7B Cohere $0.056 $0.038 $0.15 128K −4%
Google Cloud Gemma 3 4B This model Google Cloud $0.058 $0.05 $0.10 128K Aug 2024
OpenAI GPT-OSS-120B OpenAI $0.059 $0.037 $0.17 131K Jun 2024 +1%
Google Cloud Gemma 3 12B Instruct Google Cloud $0.067 $0.05 $0.15 128K Aug 2024 +14%
Nvidia Nemotron 3 Nano 30B A3B Nvidia $0.075 $0.05 $0.20 262K Jun 2025 +29%
Nvidia Nemotron 3.5 Lightning 30B A3B Nvidia $0.082 $0.05 $0.24 1M Sep 2025 +40%
Meta Llama 3 8B Meta $0.083 $0.05 $0.25 8K Mar 2023 +43%

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.

Capabilities

What Gemma 3 4B accepts and can do, as published by Google Cloud.

  • Text Accepts and generates natural-language text.
  • Image Accepts images as input alongside text.
  • Function calling Connect to external tools, APIs, and systems.

Common questions

What is Gemma 3 4B good for?

Local and edge deployments taking text and images. Open weights under the Gemma Terms of Use, small enough for a single consumer GPU.

When is Gemma 3 4B not a good fit?

Video or audio input, and structured output. The Gemma Terms of Use are a custom license rather than Apache 2.0, and the Gemma 4 family knows more recent events.

What is the cheapest way to run Gemma 3 4B?

Hosted, unless you push serious volume. DeepInfra charges $0.05 in / $0.10 out per 1M tokens. The cheapest rental that fits is 1x RTX 3060 at $65 a month, which costs the same as about 1B tokens a month on that API.

Can I self-host Gemma 3 4B?

Yes. The weights are released under the Gemma Terms of Use. At 4-bit it needs about 5 GB of GPU memory, which starts at roughly $65 a month on the cheapest rental that fits.

More from Google Cloud

  • Gemma 3 12B Instruct Open weights 128K context · cutoff Aug 2024
    From $0.05 / $0.15 /1M in / out at the cheapest provider
  • Gemma 4 26B A4B Open weights 256K context · cutoff Jan 2025
    From $0.05 / $0.29 /1M in / out at the cheapest provider
  • Gemma 3 27B Instruct Open weights 128K context · cutoff Aug 2024
    From $0.08 / $0.16 /1M in / out at the cheapest provider
  • Gemini 2.5 Flash-Lite 1M context · cutoff Jan 2025
    From $0.10 / $0.40 /1M in / out at the cheapest provider
  • Gemma 4 31B Open weights 256K context · cutoff Jan 2025
    From $0.13 / $0.37 /1M in / out at the cheapest provider
  • Gemini 3.1 Flash-Lite 1M context · cutoff Jan 2025
    From $0.25 / $1.50 /1M in / out at the cheapest provider
  • Gemini 3.5 Flash-Lite 1M context · cutoff Mar 2026
    From $0.30 / $2.50 /1M in / out at the cheapest provider
  • Gemini 2.5 Flash 1M context · cutoff Jan 2025
    From $0.30 / $2.50 /1M in / out at the cheapest provider