Run Gemma 3 4B on a VPS.

Prices checked

The cheapest VPS that runs Gemma 3 4B is Leaseweb VPS 2 at $9.04 a month, with 16 GB of RAM for the 5.1 GB it needs, checked .

Best plans for Gemma 3 4B

Most tokens per second for your money, comfortable fits first.

  1. 1

    VPS 2 · 6 vCPU / 16 GB · Europe

    Leaseweb · 6C · 16 GB · ~5.5–11 tok/s

    $9.04/mo
  2. 2

    VPS 2 · 6 vCPU / 16 GB · UK

    Leaseweb · 6C · 16 GB · ~5.5–11 tok/s

    $9.63/mo
    View
  3. 3

    VPS 2 · 6 vCPU / 16 GB · US

    Leaseweb · 6C · 16 GB · ~5.5–11 tok/s

    $9.89/mo
    View
  4. 4

    VPS 3 · 8 vCPU / 24 GB · Europe

    Leaseweb · 8C · 24 GB · ~7.4–15 tok/s

    $14.07/mo
    View
  5. 5

    VPS 2 · 6 vCPU / 16 GB · Singapore

    Leaseweb · 6C · 16 GB · ~5.5–11 tok/s

    $11.18/mo
    View
  6. 6

    CX43

    Hetzner · 8C · 16 GB · ~7.4–15 tok/s

    not available now
    $17.86/mo
    View

What it needs

RAM needed

5.1 GB

CPU inference at Q4_K_M

Weights

2.5 GB

Q4_K_M

KV cache

1.1 GB

8K context

OS and runtime

1.5 GB

headroom

Multimodal (image + text) at 4B, 140 languages; a strong small generalist.

Size
4.3B parameters
Context
128K tokens
Kind
chat, vision
Released
2025-03
License
Gemma Terms of Use

Facts from Hugging Face: exact GGUF file sizes, KV geometry from the GGUF header, 959,740 downloads.

ollama run gemma3:4bmodel card Google

Or rent it as an API

every price for Gemma 3 4B

12 providers sell Gemma 3 4B.

Google's own price

$0.06per M tokens

Cheapest price

$0.04per M tokens

Kilo Gateway

What the VPS price buys

213M tokens a month

at $9.04 a month

Or rent a GPU

every GPU price

1 provider rents the RTX A5000, with 24 GB of GPU memory against the 5.1 GB Gemma 3 4B needs.

Cheapest board that fits

RTX A5000

24 GB of GPU memory

On demand

$0.16per GPU an hour

RunPod

Held for a month

$116.80

730 hours of RTX A5000 · Community Cloud

At 24 million tokens a month, what this box generates in 730 hours at its estimated rate, the API costs you $1.03, this VPS $9.04 and the GPU $116.80. Above about 213 million tokens a month the VPS costs less than the API, which is more than this box generates in a month.

Or buy hardware

all machines

14 reference machines fit Gemma 3 4B.

  1. Raspberry Pi 5 (16 GB)

    Approximate

    16 GB · 17 GB/s · ~1.7–2.6 tok/s

    $305= 34 mo of VPS
  2. GeForce RTX 5060 Ti 16 GB (card only)

    Approximate

    16 GB · 448 GB/s · ~90–138 tok/s

    $456= 50 mo of VPS
  3. Mac mini (M6, 16 GB)

    16 GB · 153 GB/s · ~31–47 tok/s

    $899= 99 mo of VPS
  4. GeForce RTX 5070 Ti 16 GB (card only)

    Approximate

    16 GB · 896 GB/s · ~100+ tok/s

    $1,190= 10+ yrs of VPS
  5. Mac mini (M6, 32 GB)

    32 GB · 153 GB/s · ~31–47 tok/s

    $1,299= 10+ yrs of VPS
  6. GeForce RTX 5080 16 GB (card only)

    Approximate

    16 GB · 960 GB/s · ~100+ tok/s

    $1,650= 10+ yrs of VPS

Buy · per month

$8.78

$8.47 hardware + $0.31 power

Rent · per month

$9.04

Leaseweb VPS 2 · 6 vCPU / 16 GB · Europe

Break-even

The Raspberry Pi 5 (16 GB) pays for itself after 35 months of replacing the VPS, and it streams an estimated 1.7–2.6 tok/s against the VPS's CPU-only pace.

How we count

On a CPU-only VPS Gemma 3 4B needs about 5.1 GB of RAM: 2.5 GB of Q4_K_M weights, 1.1 GB of KV cache for an 8,192-token context and 1.5 GB for the OS and runtime. 260 of the 527 plans in the index fit and include a disk. A plan runs it comfortably with 20% headroom over the total, and is a tight fit with exactly enough.

Other quants: Q8_0 weights take 4.1 GB (near-lossless, about half of F16); F16 takes 7.8 GB.

The plans are ranked by estimated tokens per second per dollar, comfortable fits first. Speed is effective memory bandwidth divided by active weight bytes (4 GB/s per shared vCPU, 6 per dedicated), shown as a band. Real numbers depend on the host CPU generation, AVX-512 and AMX support and how noisy the neighbours are, so treat them as an order of magnitude.

Token prices are per million, blended 3 in : 1 out, before tax. A price below the maker's is listed only when the provider says why. A rented box costs the same whether or not you use it and runs whatever else you put on it; an API charges for what you send and nothing when you stop.

A GPU rate is per GPU for an hour, and the monthly figure is 730 hours of the whole instance at it, tax excluded. The token price is $0.04 per million, blended 3 in : 1 out, the cheapest price (Kilo Gateway), and the box is assumed busy every second of the month, which nothing is.

A machine tagged approximate is priced at the typical US street price in August 2026 rather than its maker's own price. Local speed is peak bandwidth times 0.7 efficiency (0.35 on CPU-only boards) divided by active weight bytes; unified-memory machines are assumed to give models 75% of their RAM. GPU cards need a host PC that is not in the price.

Frequently asked

How much RAM does Gemma 3 4B need?
About 5.1 GB for CPU inference at Q4_K_M: 2.5 GB of weights, 1.1 GB of KV cache at 8,192 tokens of context, and 1.5 GB of headroom. Longer contexts need more KV cache (136 KB per token for this model).
What is the cheapest VPS that can run Gemma 3 4B?
Leaseweb VPS 2 · 6 vCPU / 16 GB · Europe (16 GB RAM, 6 vCPU) at $9.04/mo excl. VAT runs it comfortably as of 31 Oct 2026. Leaseweb VPS 1 · 4 vCPU / 6 GB · Europe at $5.02/mo is a tight fit.
How fast will Gemma 3 4B run on a VPS without a GPU?
Roughly 5.5–11 tok/s on the top pick. Token generation is limited by memory bandwidth, because each new token reads all of the weights once. More vCPUs help, dedicated ones most, but a GPU or an Apple silicon machine is 10 to 50 times faster.

Same lineup

Same size class