VRAM · Local model
Gemma 3 12B VRAM requirements: can you run it locally?
Yes, on one 12 GB GPU such as the GeForce RTX 5070, or a Mac with 16 GB of unified memory. At Q4_K_M and an 8K context it needs about 8.8 GB. At 8-bit (Q8_0) it needs about 14 GB, which fits a 16 GB card. Estimates from the model’s official config.json, checked 2026-10-08.
- Parameters
- 12.2B
- Layers
- 48
- Max context
- 131,072
- Experts
- Dense
Attention: 8 full-attention layers, 40 sliding-window layers (last 1,024 tokens).
Requirements
How much VRAM does Gemma 3 12B need?
| Quantisation | 8K context | 32K context | 128K context |
|---|---|---|---|
| FP16 / BF16 | 26 GB | 28 GB | 34 GB |
| Q8_0 (8-bit) | 14 GB | 16 GB | 22 GB |
| Q6_K | 11 GB | 13 GB | 19 GB |
| Q5_K_M | 9.9 GB | 11 GB | 18 GB |
| Q4_K_M | 8.8 GB | 10 GB | 17 GB |
| Q3_K_M | 7.5 GB | 9.0 GB | 15 GB |
| Q2_K | 6.3 GB | 7.8 GB | 14 GB |
Weights + FP16 KV cache + overhead, batch 1; the VRAM calculator shows the formula.
GPUs
Which GPUs can run Gemma 3 12B?
| Memory | Example card | Best quality at 8K | Longest context at that quality | Longest context at Q4_K_M |
|---|---|---|---|---|
| 8 GB | GeForce RTX 4060 | Q3_K_M · 7.5 GB | 16K | — |
| 12 GB | GeForce RTX 5070 | Q6_K · 11 GB | 20K | 58K |
| 16 GB | GeForce RTX 5080 | Q8_0 (8-bit) · 14 GB | 34K | 116K |
| 24 GB | Radeon RX 7900 XTX | Q8_0 (8-bit) · 14 GB | 128K | 128K |
| 32 GB | GeForce RTX 5090 | FP16 / BF16 · 26 GB | 97K | 128K |
| 48 GB | L40S | FP16 / BF16 · 26 GB | 128K | 128K |
| 80 GB | H100 80GB | FP16 / BF16 · 26 GB | 128K | 128K |
| 96 GB | RTX PRO 6000 Blackwell | FP16 / BF16 · 26 GB | 128K | 128K |
The smallest card that holds Gemma 3 12B at Q4_K_M with an 8K context has 12 GB, such as the GeForce RTX 5070; there it has room for about 58K tokens. Every extra gigabyte goes to context: on a 16 GB card the limit rises to 116K. For 8-bit or better you need a 16 GB card, and full 16-bit precision (26 GB) fits from 32 GB.
Apple Silicon
Can you run Gemma 3 12B on a Mac?
| Mac memory | GPU can use | Best quality at 8K | Longest context |
|---|---|---|---|
| 16 GB | 11 GB | Q5_K_M · 9.9 GB | 20K |
| 24 GB | 16 GB | Q8_0 (8-bit) · 14 GB | 34K |
| 32 GB | 21 GB | Q8_0 (8-bit) · 14 GB | 112K |
| 36 GB | 27 GB | FP16 / BF16 · 26 GB | 24K |
| 48 GB | 36 GB | FP16 / BF16 · 26 GB | 128K |
| 64 GB | 48 GB | FP16 / BF16 · 26 GB | 128K |
| 96 GB | 72 GB | FP16 / BF16 · 26 GB | 128K |
| 128 GB | 96 GB | FP16 / BF16 · 26 GB | 128K |
| 192 GB | 144 GB | FP16 / BF16 · 26 GB | 128K |
| 256 GB | 192 GB | FP16 / BF16 · 26 GB | 128K |
| 512 GB | 384 GB | FP16 / BF16 · 26 GB | 128K |
At Q4_K_M and an 8K context, Gemma 3 12B needs a Mac with at least 16 GB of unified memory; 8-bit needs 24 GB and full precision needs 36 GB. 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. With the limit raised that way, 24 GB is enough for Gemma 3 12B at Q4_K_M, instead of 16 GB.
Context
How much memory does Gemma 3 12B’s context use?
| Context | KV cache, FP16 | KV cache, 8-bit | Total at Q4_K_M |
|---|---|---|---|
| 8,192 | 0.8 GB | 0.4 GB | 8.8 GB |
| 32,768 | 2.3 GB | 1.2 GB | 10 GB |
| 131,072 | 8.3 GB | 4.4 GB | 17 GB |
Gemma 3 12B’s FP16 cache grows by about 63 MB for every 1,000 tokens once its windowed layers are full. At 8K tokens that is 0.8 GB, 9% of the total at Q4_K_M; at its full 131,072-token context it is 8.3 GB, 1.2× the size of the 6.9 GB of Q4_K_M weights. 40 of its 48 layers use a sliding window of 1,024 tokens, so their cache is full after 1,024 tokens; only the 8 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 12B download?
| GGUF quantisation | Bits per weight | Approximate size |
|---|---|---|
| FP16 / BF16 | 16.00 | 23 GB |
| Q8_0 (8-bit) | 8.50 | 12 GB |
| Q6_K | 6.56 | 9.3 GB |
| Q5_K_M | 5.70 | 8.1 GB |
| Q4_K_M | 4.89 | 6.9 GB |
| Q3_K_M | 4.00 | 5.7 GB |
| Q2_K | 3.16 | 4.5 GB |
A 12.2B-parameter model takes about 6.9 GB of disk at Q4_K_M and 23 GB as 16-bit weights, so the quantised file saves about 16 GB. Sizes are parameters × bits per weight; real GGUF files differ by a few per cent because some tensors stay at higher precision.
Offload
Can you run Gemma 3 12B with less VRAM by offloading to RAM?
| GPU VRAM | In system RAM | RAM to have |
|---|---|---|
| 8 GB | 0.8 GB | 16 GB |
Yes: llama.cpp can keep part of Gemma 3 12B in system RAM and run it on the CPU, so the GPU and RAM together need about 8.8 GB at Q4_K_M and an 8K context. On an 8 GB card that leaves 0.8 GB in RAM. As a dense model, every token reads all 12.2B parameters, so each layer moved to RAM (fewer --n-gpu-layers) is limited by RAM bandwidth and generation slows as more of it leaves the GPU.
Compare
How does Gemma 3 12B compare with other Gemma models?
| Model | Parameters | Type | Q4 at 8K | Smallest GPU | Context on 24 GB |
|---|---|---|---|---|---|
| Gemma 3 4B | 4.3B | Dense | 3.7 GB | 8 GB | 128K |
| Gemma 3 12B | 12.2B | Dense | 8.8 GB | 12 GB | 128K |
| Gemma 4 26B-A4B | 25.8B | Dense | 17 GB | 24 GB | 256K |
| Gemma 3 27B | 27.4B | Dense | 18 GB | 24 GB | 74K |
| Gemma 4 31B | 31.3B | Dense | 21 GB | 24 GB | 41K |
Gemma 3 12B is number 2 by size of the 5 Gemma models we cover. The next smaller, Gemma 3 4B, needs about 3.7 GB at Q4 with an 8K context. The next larger, Gemma 4 26B-A4B, needs about 17 GB.
FAQ
Frequently asked questions
How much VRAM does Gemma 3 12B need?
With an 8K context, about 8.8 GB at Q4_K_M, 14 GB at 8-bit (Q8_0) and 26 GB at full 16-bit precision. That covers the weights, the KV cache and runtime overhead.
Can Gemma 3 12B run on a 24 GB GPU like the RTX 4090?
Yes: the best quality that fits with an 8K context is Q8_0 (8-bit), at about 14 GB, and at that setting it has room for about 128K tokens.
Can I run Gemma 3 12B 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 12B run on 12 or 8 GB?
Best quality with an 8K context: 12 GB: Q6_K at about 11 GB, with up to 20K tokens; 8 GB: Q3_K_M at about 7.5 GB, with up to 16K tokens.
How big is the Gemma 3 12B download?
About 6.9 GB for a Q4_K_M GGUF, 12 GB at Q8_0 and 23 GB for the 16-bit weights.
What is the longest context Gemma 3 12B 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
Try other settings in the VRAM calculator
- Guide: How much VRAM do you need to run an LLM locally?
- Glossary: Quantisation, GGUF, KV cache
Keep exploring