How to Deploy Gemma 4 12B Locally
Gemma 4 12B is a dense model with 12B parameters. At Q4 it needs at least 11GB of VRAM, and 16GB is the comfortable amount for an 8K context. The cheapest card that runs it today is the Tesla V100 16GB at about $131, at roughly 71.4 tokens/s.
Gemma 4 12B details
How much VRAM does Gemma 4 12B need for local deployment?
| Quantization | WeightsGB | Total at 8KGB | Total at 32KGB | Total at 128KGB |
|---|---|---|---|---|
| 1-bit | 2.8est. | 6.8 | 15.8 | 51.8 |
| 2-bit | 4.7GGUF | 8.4 | 17.4 | 53.4 |
| 3-bit | 6GGUF | 9.7 | 18.7 | 54.7 |
| 4-bit | 7.1GGUF | 10.7 | 19.7 | 55.7 |
| 5-bit | 8.4GGUF | 12.1 | 21.1 | 57.1 |
| 8-bit | 12.7GGUF | 16.4 | 25.4 | 61.4 |
| FP16 | 23.8GGUF | 27.4 | 36.4 | 72.4 |
Total = weights + KV cache (FP16) + 1GB runtime overhead. Weights marked GGUF are measured file sizes from the repository; the rest are estimated from bytes per parameter. Contexts beyond this model's 256K limit show a dash. Each tier takes whichever file of that bit width the repository has, preferring unsloth dynamic quants, so the exact file name varies by model.
Which GPUs can run Gemma 4 12B?
Xianyu
| Device | VRAMGB | Price | Est. t/s | Suggested context |
|---|---|---|---|---|
| 16 | $13113 listings | 71.4 | 8K | |
| 22 | $3873 listings | 49.8 | 32K | |
| 32 | $4054 listings | 58.7 | 32K | |
| 16 | $44613 listings | 33.7 | 8K | |
| 16 | $46111 listings | 36.4 | 8K | |
| 32 | $47611 listings | 71.4 | 32K | |
| 20 | $63916 listings | 46.3 | 32K | |
| 16 | $6974 listings | 36.6 | 8K | |
| 24 | $78410 listings | 24.2 | 32K | |
| 24 | $86217 listings | 55.2 | 32K | |
| 16 | $90712 listings | 37.3 | 8K | |
| 12 | $91810 listings | 54.1 | 8K | |
| 16 | $1,1529 listings | 57.6 | 8K | |
| 24 | $1,20415 listings | 74.1 | 32K | |
| 32 | $1,4656 listings | 32.1 | 32K | |
| 16 | $1,4723 listings | 71.1 | 8K | |
| 32 | $1,6438 listings | 37.3 | 32K | |
| 40 | $1,6804 listings | 118.8 | 32K | |
| 32 | $1,8443 listings | 33.7 | 32K | |
| 16 | $1,85112 listings | 75.9 | 8K | |
| 64 | $2,0898 listings | 114.2 | 128K | |
| 24 | $2,32718 listings | 54.1 | 32K | |
| 64 | $2,75112 listings | 91.3 | 128K | |
| 48 | $3,2715 listings | 49.9 | 32K | |
| 24 | $3,49416 listings | 79.4 | 32K | |
| 24 | $3,55414 listings | 103.7 | 32K | |
| 32 | $3,84416 listings | 71.1 | 32K | |
| 48 | $3,9553 listings | 79.4 | 32K | |
| 40 | $4,6024 listings | 118.5 | 32K | |
| Mac Studio M4 Max 128GB | 128 | $4,78813 listings | 35.1 | 128K |
| 128 | $4,83231 listings | 22.6 | 128K | |
| 32 | $4,89213 listings | 134.6 | 32K | |
| MacBook Pro M4 Max 128GB | 128 | $5,2644 listings | 35.1 | 128K |
| Mac Studio M5 Max 128GB | 128 | $5,8816 listings | 39.3 | 128K |
| 32 | $6,51313 listings | 134.6 | 32K | |
| 48 | $6,95915 listings | 103.7 | 32K | |
| MacBook Pro M5 Max 128GB | 128 | $8,1487 listings | 39.3 | 128K |
| 72 | $9,66517 listings | 103.7 | 128K | |
| 84 | $10,11117 listings | 119.4 | 128K | |
| 96 | $18,4226 listings | 134.6 | 128K | |
| Mac Studio M3 Ultra 512GB | 512 | $19,3156 listings | 51.9 | 128K |
| 32 | —No listings | 32.1 | 32K | |
| 32 | —No listings | 59 | 32K | |
| 32 | —No listings | 69.7 | 32K | |
| 128 | —No listings | 15.2 | 128K |
Fits when weights + KV cache + runtime overhead is at or below usable memory, single card. "Offload" on MoE models means it runs with expert weights in system RAM (only attention layers and KV cache stay in VRAM); that speed assumes 70 GB/s RAM bandwidth. The context column is the largest tier that fits.
Deploy Gemma 4 12B locally with Ollama, llama.cpp or vLLM
The Ollama library has no official tag for it yet.
llama.cpp pulls the GGUF straight from Hugging Face; -c sets the context length.
llama-server -hf unsloth/gemma-4-12b-it-GGUF:Q4_K_M -c 8192
vLLM serves the original-precision weights, which needs far more memory than GGUF and usually more than one GPU.
vllm serve google/gemma-4-12B-it
File names follow that week's model-library snapshot; the definitions are in the methodology. Methodology
FAQ
How much VRAM does Gemma 4 12B need?
At Q4_K_M with an 8K context Gemma 4 12B needs about 11GB of VRAM; 16GB leaves comfortable headroom.
What is the cheapest GPU that runs Gemma 4 12B?
The Tesla V100 16GB: 16GB of VRAM, currently about $131, at roughly 71.4 tokens/s.
Can you run Gemma 4 12B with Ollama?
Not yet: the Ollama library has no official tag for it. You can load the GGUF with llama.cpp instead.