How to Deploy Gemma 4 12B Locally
Gemma 4 12B is a 12B dense model that Google added to the lineup in June 2026, and it understands both images and audio. Its 4-bit version runs on a 12GB card. Even the full 256K context needs only about 12.8 GB, which a 16GB card handles with room to spare. What sets it apart is that it has no separate vision or audio encoder: images and sound go straight into the main model. Google says it scores close to the 26B MoE while using less than half the memory.
Gemma 4 12B details
- Min VRAM at 4-bit9 GB · 8K
- Parameters12B
- Max context256K
- Architecture
- Dense
- License
- Apache-2.0
- Launch date
- Jun 3, 2026
- Vendor
- Google DeepMind
- Hugging Face repo
- google/gemma-4-12B-it
- GGUF repo
- unsloth/gemma-4-12b-it-GGUF
- NVFP4 repo (Blackwell)
- RedHatAI/gemma-4-12B-it-NVFP4
- MLX repo (Apple)
- mlx-community/gemma-4-12B-it-4bit
- Ollama tag
- gemma4:12b
- Layers
- 48
- Hidden size
- 3,840
- KV heads
- 8
- Head dim
- 256
How much VRAM does Gemma 4 12B need for local deployment?
| Quantization | WeightsGB | 8K contextGB | 32K contextGB | 128K contextGB | 256K context (max)GB |
|---|---|---|---|---|---|
| 1-bit | 3est. | 4.6 | 5 | 6.6 | 8.7 |
| 2-bit | 4.7GGUF | 6.2 | 6.6 | 8.3 | 10.4 |
| 3-bit | 6GGUF | 7.5 | 7.9 | 9.6 | 11.7 |
| 4-bit | 7.1GGUF | 8.6 | 9 | 10.7 | 12.8 |
| 5-bit | 8.4GGUF | 9.9 | 10.3 | 12 | 14.1 |
| 8-bit | 12.7GGUF | 14.2 | 14.6 | 16.3 | 18.4 |
| BF16/FP16 | 23.8GGUF | 25.3 | 25.7 | 27.4 | 29.5 |
Full calculation rules are on the Methodology page.
Can a single GPU run Gemma 4 12B?
Yes, and 12GB of VRAM is enough. Most of its layers only look at the latest 1,024 tokens, so memory grows slowly with context: at 4-bit, going from 8K to 256K adds only about 4 GB. That lets a 12GB RTX 3060 run 4-bit with the full context at about 36 tokens/s. On a 16GB card, 8-bit is the better pick: closer to the original and still roomy on context, though the RTX 5060 Ti 16GB slows to about 26 tokens/s. A 24GB card handles it easily, but it can also hold the family's MoE 26B A4B, which reads fewer parameters per token and runs faster, so try that first.
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $37024 listings | 117 | 256K | |
| $86958 listings | 63.5 | 256K | |
| $89518 listings | 117 | 256K | |
| Radeon RX 7900 XTX24 GB | $1,25029 listings | 123.5 | 256K |
| $1,799107 listings | 120.9 | 256K | |
| $3,75868 listings | 128.5 | 256K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 37.7 | 256K |
| $4,89916 listings | 102.3 | 256K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 150.7 | 256K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 84.2 | 256K |
| $8,24022 listings | 40.1 | 256K | |
| $8,395123 listings | 200.4 | 256K | |
| $22,50011 listings | 200.4 | 256K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $37024 listings | 83.2 | 256K | |
| $86958 listings | 44 | 256K | |
| $89518 listings | 83.2 | 256K | |
| Radeon RX 7900 XTX24 GB | $1,25029 listings | 88 | 256K |
| $1,799107 listings | 86.1 | 256K | |
| $3,75868 listings | 91.9 | 256K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 25.8 | 256K |
| $4,89916 listings | 72.2 | 256K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 108.9 | 256K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 58.9 | 256K |
| $8,24022 listings | 27.5 | 256K | |
| $8,395123 listings | 148.5 | 256K | |
| $22,50011 listings | 148.5 | 256K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $37024 listings | 49.6 | 183K | |
| $86958 listings | 25.6 | 183K | |
| $89518 listings | 49.6 | 256K | |
| Radeon RX 7900 XTX24 GB | $1,25029 listings | 52.7 | 256K |
| $1,799107 listings | 51.5 | 256K | |
| $3,75868 listings | 55.1 | 256K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 14.9 | 256K |
| $4,89916 listings | 42.8 | 256K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 66.1 | 256K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 34.6 | 256K |
| $8,24022 listings | 15.8 | 256K | |
| $8,395123 listings | 92.5 | 256K | |
| $22,50011 listings | 92.5 | 256K |
Only common GPUs and systems are listed, one set for models under 50B and another for larger ones, sorted by price from low to high.
What to know before running Gemma 4 12B locally
What having no encoder means
Other multimodal models first use a separate encoder to turn images and sound into vectors, then hand those to the language model. Gemma 4 12B skips that step: images go through one simple projection into the main model, audio is projected directly into the same dimensions as text, and everything runs through the same decoder. Google says this lowers latency and lets the whole model be fine-tuned in one go. Audio is likewise limited to 30 seconds.
Which quantization to pick
On a 12GB card, use 4-bit (7.1 GB of weights) or 5-bit (8.4 GB); on a 16GB card, use 8-bit (12.7 GB). The original FP16 with 8K already needs 25.3 GB, twice as much as 8-bit, so it can't take much context; you're better off running 8-bit with a long context.
Thinking toggle and multi-turn chat
Adding
<|think|>at the start of the system prompt turns thinking on. With it off, the model still outputs an empty thinking block, which your parser needs to filter out. In multi-turn chats, don't put earlier thinking back into the history; keep only the final answers, except for turns with tool calls. Google usestemperature1.0,top_p0.95 andtop_k64 for every use case.Why long context is so light
Most of its layers only look at the most recent 1024 tokens, and just a few layers see the full context, so VRAM grows slowly as context gets longer: at 4-bit, going from 8K to 256K adds only about 4.2 GB.
Launch commands
Ollama
- Windows
- macOS
- Linux
ollama run gemma4:12bllama.cpp
- NVIDIA
- AMD
- Mac
- CPU
llama-server -hf unsloth/gemma-4-12b-it-GGUF:Q4_K_M -c 8192
vLLM
- Linux
- NVIDIA
- AMD
vllm serve google/gemma-4-12B-itBlackwell GPUs (RTX 50 series, RTX PRO 6000, B200) run NVFP4 weights natively, at about 30% of the original size.
vllm serve RedHatAI/gemma-4-12B-it-NVFP4MLX
- Apple Silicon
Vision models run on mlx-vlm: on a Mac, pip install mlx-vlm first; this command downloads the MLX weights from Hugging Face and starts a server.
mlx_vlm.server --model mlx-community/gemma-4-12B-it-4bitFile names follow that week's model-library snapshot; the definitions are in the methodology. Methodology
Other models in the Gemma family
| Model | Total params | Active params | 4-bit size |
|---|---|---|---|
| 8B | 8B | 5 GB | |
| 25.2B | 3.8B | 16.9 GB | |
| 30.7B | 30.7B | 18.3 GB |