Skip to content
AI Dev Toolkit.
Esc
  • Loading…

VRAM · Local model

Gemma 3 4B VRAM requirements: can you run it locally?

Yes: Gemma 3 4B runs on an 8 GB GPU such as the GeForce RTX 4060 at Q4_K_M (about 3.7 GB with an 8K context), with room for about 128K tokens of context. At 8-bit (Q8_0) it needs about 5.5 GB, which fits an 8 GB card. Estimates from the model’s official config.json, checked 2026-10-08.

Parameters
4.3B
Layers
34
Max context
131,072
Experts
Dense

Attention: 5 full-attention layers, 29 sliding-window layers (last 1,024 tokens).

Requirements

How much VRAM does Gemma 3 4B need?

Quantisation8K context32K context128K context
FP16 / BF169.3 GB9.7 GB12 GB
Q8_0 (8-bit)5.5 GB6.0 GB7.9 GB
Q6_K4.6 GB5.0 GB6.9 GB
Q5_K_M4.1 GB4.6 GB6.5 GB
Q4_K_M3.7 GB4.2 GB6.1 GB
Q3_K_M3.3 GB3.7 GB5.6 GB
Q2_K2.9 GB3.3 GB5.2 GB

Weights + FP16 KV cache + overhead, batch 1; the VRAM calculator shows the formula.

GPUs

Which GPUs can run Gemma 3 4B?

MemoryExample cardBest quality at 8KLongest context at that qualityLongest context at Q4_K_M
8 GBGeForce RTX 4060Q8_0 (8-bit) · 5.5 GB128K128K
12 GBGeForce RTX 5070FP16 / BF16 · 9.3 GB128K128K
16 GBGeForce RTX 5080FP16 / BF16 · 9.3 GB128K128K
24 GBRadeon RX 7900 XTXFP16 / BF16 · 9.3 GB128K128K
32 GBGeForce RTX 5090FP16 / BF16 · 9.3 GB128K128K
48 GBL40SFP16 / BF16 · 9.3 GB128K128K
80 GBH100 80GBFP16 / BF16 · 9.3 GB128K128K
96 GBRTX PRO 6000 BlackwellFP16 / BF16 · 9.3 GB128K128K

The smallest card that holds Gemma 3 4B at Q4_K_M with an 8K context has 8 GB, such as the GeForce RTX 4060; there it has room for about 128K tokens. For 8-bit or better you need an 8 GB card, and full 16-bit precision (9.3 GB) fits from 12 GB.

Apple Silicon

Can you run Gemma 3 4B on a Mac?

Mac memoryGPU can useBest quality at 8KLongest context
16 GB11 GBFP16 / BF16 · 9.3 GB79K
24 GB16 GBFP16 / BF16 · 9.3 GB128K
32 GB21 GBFP16 / BF16 · 9.3 GB128K
36 GB27 GBFP16 / BF16 · 9.3 GB128K
48 GB36 GBFP16 / BF16 · 9.3 GB128K
64 GB48 GBFP16 / BF16 · 9.3 GB128K
96 GB72 GBFP16 / BF16 · 9.3 GB128K
128 GB96 GBFP16 / BF16 · 9.3 GB128K
192 GB144 GBFP16 / BF16 · 9.3 GB128K
256 GB192 GBFP16 / BF16 · 9.3 GB128K
512 GB384 GBFP16 / BF16 · 9.3 GB128K

At Q4_K_M and an 8K context, Gemma 3 4B needs a Mac with at least 16 GB of unified memory; 8-bit fits the same Mac and so does full precision. By default macOS lets the GPU use about two thirds of memory on Macs with 32 GB or less and about three quarters on larger ones; the table uses that limit. You can raise it with sudo sysctl iogpu.wired_limit_mb, leaving at least 8 GB for macOS.

Context

How much memory does Gemma 3 4B’s context use?

ContextKV cache, FP16KV cache, 8-bitTotal at Q4_K_M
8,1920.3 GB0.1 GB3.7 GB
32,7680.7 GB0.4 GB4.2 GB
131,0722.6 GB1.4 GB6.1 GB

Gemma 3 4B’s FP16 cache grows by about 20 MB for every 1,000 tokens once its windowed layers are full. At 8K tokens that is 0.3 GB, 7% of the total at Q4_K_M; at its full 131,072-token context it is 2.6 GB, 1.1× the size of the 2.4 GB of Q4_K_M weights. 29 of its 34 layers use a sliding window of 1,024 tokens, so their cache is full after 1,024 tokens; only the 5 full-attention layers keep growing. On a 24 GB card at Q4_K_M, the longest context is about 128K tokens with an FP16 cache, its full context.

Download

How big is the Gemma 3 4B download?

GGUF quantisationBits per weightApproximate size
FP16 / BF1616.008.0 GB
Q8_0 (8-bit)8.504.3 GB
Q6_K6.563.3 GB
Q5_K_M5.702.9 GB
Q4_K_M4.892.4 GB
Q3_K_M4.002.0 GB
Q2_K3.161.6 GB

A 4.3B-parameter model takes about 2.4 GB of disk at Q4_K_M and 8.0 GB as 16-bit weights, so the quantised file saves about 5.6 GB. Sizes are parameters × bits per weight; real GGUF files differ by a few per cent because some tensors stay at higher precision.

Compare

How does Gemma 3 4B compare with other Gemma models?

ModelParametersTypeQ4 at 8KSmallest GPUContext on 24 GB
Gemma 3 4B4.3BDense3.7 GB8 GB128K
Gemma 3 12B12.2BDense8.8 GB12 GB128K
Gemma 4 26B-A4B25.8BDense17 GB24 GB256K
Gemma 3 27B27.4BDense18 GB24 GB74K
Gemma 4 31B31.3BDense21 GB24 GB41K

Gemma 3 4B is number 1 by size of the 5 Gemma models we cover. The next larger, Gemma 3 12B, needs about 8.8 GB.

FAQ

Frequently asked questions

How much VRAM does Gemma 3 4B need?

With an 8K context, about 3.7 GB at Q4_K_M, 5.5 GB at 8-bit (Q8_0) and 9.3 GB at full 16-bit precision. That covers the weights, the KV cache and runtime overhead.

Can Gemma 3 4B run on a 24 GB GPU like the RTX 4090?

Yes: the best quality that fits with an 8K context is FP16 / BF16, at about 9.3 GB, and at that setting it has room for about 128K tokens.

Can I run Gemma 3 4B on a Mac?

Yes: at Q4_K_M and an 8K context it fits a Mac with 16 GB of unified memory using macOS’s default GPU memory limit (about 11 GB for the GPU).

Can Gemma 3 4B run on 8 GB?

Best quality with an 8K context: 8 GB: Q8_0 (8-bit) at about 5.5 GB, with up to 128K tokens.

How big is the Gemma 3 4B download?

About 2.4 GB for a Q4_K_M GGUF, 4.3 GB at Q8_0 and 8.0 GB for the 16-bit weights.

What is the longest context Gemma 3 4B can use on 24 GB?

About 128K tokens at Q4_K_M with an FP16 cache. Its maximum is 131,072 tokens.

Related

Try other settings in the VRAM calculator

Updated 2026-10-08

Architecture from config.json (a public copy of google/gemma-3-4b-it); parameter count from the published weights; bits per weight from llama.cpp. GPU memory sizes from NVIDIA and AMD product pages.

Keep exploring