Can I run Gemma 3 4B locally?
Gemma 3 4B has 4.30 billion parameters (Hugging Face). At the popular Q4_K_M quantization it needs roughly 3.5 GB of GPU memory ESTIMATE. It has been on Hugging Face since 2025-02-20. This is an older model; see the current list for newer options.
Memory needed by quantization
| Quant | Weights | Total needed (est.) |
|---|---|---|
| IQ1_S | 0.8 GB | 1.7 GB |
| IQ2_XXS | 1.1 GB | 2.0 GB |
| IQ2_M | 1.5 GB | 2.3 GB |
| Q2_K | 1.7 GB | 2.6 GB |
| IQ3_XXS | 1.6 GB | 2.5 GB |
| Q3_K_S | 2.0 GB | 2.9 GB |
| IQ3_M | 2.0 GB | 2.9 GB |
| Q3_K_M | 2.2 GB | 3.1 GB |
| IQ4_XS | 2.3 GB | 3.2 GB |
| Q4_0 | 2.4 GB | 3.3 GB |
| Q4_K_M | 2.6 GB | 3.5 GB |
| MXFP4 | 2.5 GB | 3.4 GB |
| Q5_K_M | 3.1 GB | 4.0 GB |
| Q6_K | 3.5 GB | 4.5 GB |
| Q8_0 | 4.6 GB | 5.6 GB |
| F16 | 8.6 GB | 9.8 GB |
KV cache by context length ESTIMATE
| Context | f16 | q8_0 | q4_0 |
|---|---|---|---|
| 4k | 0.21 GB | 0.11 GB | 0.06 GB |
| 8k | 0.29 GB | 0.15 GB | 0.08 GB |
| 16k | 0.46 GB | 0.24 GB | 0.13 GB |
| 32k | 0.79 GB | 0.42 GB | 0.22 GB |
| 64k | 1.46 GB | 0.78 GB | 0.41 GB |
| 128k | 2.81 GB | 1.49 GB | 0.79 GB |
From config.json: 5 KV-caching attention layers, 4 KV heads × 256 head dim, plus 29 sliding-window layers (1024 tokens). Max context 128k. The tables above assume 4k context.
Which GPUs and Macs can run it?
✅ fits · ⚠️ fits with little headroom · ❌ doesn't fit on this one device (multiple GPUs or RAM offload may work; check your setup). Apple Silicon assumes macOS lets the GPU use ~67–75% of unified memory. All fit verdicts are estimates.
Get the weekly "new models & what it takes to run them" email
Free. One email a week. Unsubscribe anytime.