Gemma 4 12B

Gemma 4 12B needs 8.2 GB of VRAM at Q4_K_M with 8k context, computed from its config.json as checked on 3 November 2026. The smallest card that holds it has 12 GB, and the fastest desktop card that runs it, the RTX 5090, generates at most 180 tokens per second.

Updated

Parameters
12B
Context
262,144 tokens
Licence
Apache 2.0
Released
May 2026
Config checked
3 November 2026
Needs
8.2 GB
At Q4_K_M with 8k context and an FP16 KV cache: 7 GB of weights, 0.5 GB of KV cache and 0.8 GB of runtime overhead.
Computed 3 November 2026
Smallest card
12 GB
Any 12 GB card holds it (RTX 3060 12 GB, 4070). 3.2 GB left at this setting.
Computed 3 November 2026
Fastest desktop card that fits
RTX 5090
At most 180 tokens per second, single stream: real runtimes land well below a figure this high. From memory bandwidth, not measured.
Computed 3 November 2026
Cloud hour for that card
$0.50 an hour
One RTX 5090 on SaladCloud, on demand before tax, or $1.19 on RunPod, which runs its own data centres. Every provider compared.
Read 19 October 2026

Open Gemma 4 12B in the LLM checker

Which card size runs it

8.2 GB against each memory size. A model may use 95% of a card, and only what is left over, or missing, is coloured; tight means above 85%, with little room for a longer conversation.

  • 8 GB
    RTX 3070, 4060, most gaming laptops
    No
    Short by 0.6 GB
  • 12 GB
    RTX 3060 12 GB, 4070
    Yes
    3.2 GB left
  • 16 GB
    RTX 4060 Ti 16 GB, RTX 5060 Ti 16 GB
    Yes
    7.0 GB left
  • 24 GB
    RTX 3090, RTX 4090
    Yes
    14.6 GB left
  • 32 GB
    RTX 5090
    Yes
    22.2 GB left
  • 48 GB
    RTX 6000 Ada, L40S, A6000
    Yes
    37.4 GB left
  • 80 GB
    A100 80 GB, H100
    Yes
    67.8 GB left
  • 96 GB
    RTX PRO 6000 Blackwell
    Yes
    83.0 GB left

Other quantisations, context lengths or a Q8 KV cache: the VRAM calculator.

Computed 3 November 2026

Which GPU to pick

The smallest card here that loads it at Q4_K_M with 8k of context is the RTX 3060 (12 GB): 8.2 GB needed, an estimated 36 tokens per second. The same card still has room at 32,768 tokens of context (8.6 GB), so there is no reason to buy above it for this model.

At Q8_0, which is near-lossless, the card is the RTX 4060 Ti (16 GB), needing 14.2 GB. On Apple silicon, a Mac mini M4 Pro holds it with 32,768 tokens of context at an estimated 27 tokens per second; prompt processing is slower than on Nvidia, which long documents make obvious. Among unified-memory desktops, the Ryzen AI Max+ 395 holds it at 32,768 tokens in 8.6 GB, at an estimated 26 tokens per second.

Speed on each card

GPUFitsEst. tokens/sFeels likeMemoryBandwidth
H100 SXM Yes ≤ 337 faster than you can read 80 GB 3,350 GB/s
A100 Yes ≤ 205 faster than you can read 80 GB 2,039 GB/s
RTX 5090 Yes ≤ 180 faster than you can read 32 GB 1,792 GB/s
RTX PRO 6000 Blackwell Yes ≤ 180 faster than you can read 96 GB 1,792 GB/s
RTX PRO 5000 Blackwell Yes ≤ 135 faster than you can read 48 GB 1,344 GB/s
RTX 4090 Yes ≤ 101 faster than you can read 24 GB 1,008 GB/s
RTX 5080 Yes 97 faster than you can read 16 GB 960 GB/s
RX 7900 XTX Yes 97 faster than you can read 24 GB 960 GB/s
RTX 6000 Ada Yes 97 faster than you can read 48 GB 960 GB/s
RTX 3090 Yes 94 faster than you can read 24 GB 936 GB/s
RTX 5070 Ti Yes 90 faster than you can read 16 GB 896 GB/s
RTX 5090 Laptop GPU Yes 90 faster than you can read 24 GB 896 GB/s
RTX PRO 4500 Blackwell Yes 90 faster than you can read 32 GB 896 GB/s
L40S Yes 87 faster than you can read 48 GB 864 GB/s
RX 7900 XT Yes 80 faster than you can read 20 GB 800 GB/s
RTX A6000 Yes 77 faster than you can read 48 GB 768 GB/s
RTX 4080 SUPER Yes 74 faster than you can read 16 GB 736 GB/s
RTX 5070 Yes 68 faster than you can read 12 GB 672 GB/s
RTX PRO 4000 Blackwell Yes 68 faster than you can read 24 GB 672 GB/s
RX 9070 XT Yes 64 faster than you can read 16 GB 640 GB/s
Radeon AI PRO R9700 Yes 64 faster than you can read 32 GB 640 GB/s
Arc Pro B70 Yes 61 faster than you can read 32 GB 608 GB/s
RTX 4070 Yes 51 comfortable for chat 12 GB 504 GB/s
Arc B580 Yes 46 comfortable for chat 12 GB 456 GB/s
Arc Pro B60 Yes 46 comfortable for chat 24 GB 456 GB/s
RTX 5060 Ti Yes 45 comfortable for chat 16 GB 448 GB/s
RTX PRO 4000 Blackwell SFF Yes 43 comfortable for chat 24 GB 432 GB/s
RTX 3060 Yes 36 comfortable for chat 12 GB 360 GB/s
RX 9060 XT Yes 32 comfortable for chat 16 GB 320 GB/s
RTX Spark Yes 30 comfortable for chat 128 GB (102 for the GPU) 300 GB/s
RTX 4060 Ti Yes 29 comfortable for chat 16 GB 288 GB/s
DGX Spark Yes 27 comfortable for chat 128 GB (126 for the GPU) 273 GB/s
Ryzen AI Max+ 395 Yes 26 comfortable for chat 128 GB (96 for the GPU) 256 GB/s

Single-stream decode, from memory bandwidth at 70% efficiency. Prompt processing and batching not included. These are ceilings, not measurements: Gemma 4 12B reads only 7 GB of weights per token at Q4, so little that the per-token costs the formula leaves out decide much of the real speed. The 6 figures marked ≤ are where a real runtime falls furthest below the number shown. See the speed estimator for other quantisations and Apple hardware, or every card compared if you are choosing hardware rather than a model.

Computed 3 November 2026

Memory by quantisation and context

Quant4,096 ctx8,192 ctx32,768 ctx
Q8_014.1 GB · fits 16 GB14.2 GB · fits 16 GB14.6 GB · fits 16 GB
Q5_K_M9.8 GB · fits 12 GB9.8 GB · fits 12 GB10.2 GB · fits 12 GB
Q4_K_M8.1 GB · fits 12 GB8.2 GB · fits 12 GB8.6 GB · fits 12 GB

Weights at this quant: 7 GB at Q4. Every extra 1,000 tokens of context adds about 0.016 GB of KV cache at FP16, on top of a fixed 0.336 GB that the sliding-window layers hold once their window is full. Try other settings in the VRAM calculator.

Computed 3 November 2026

About the model

Gemma 4 12B has 12B parameters. It has 48 layers: 40 use sliding-window attention and only remember the last 1,024 tokens (8 KV heads of dimension 256), and 8 are global layers with a single KV head of dimension 512. Google DeepMind's Gemma 4 12B "Unified", May 2026. Unified means encoder-free: image patches and raw audio are projected straight into the language model instead of passing through separate encoders, so one 12B checkpoint handles text, images, audio and video.

Text, images, audio and video 262,144-token window Apache 2.0 May 2026

Reasoning. Configurable thinking modes, per the model card.

A runtime without a sliding-window cache stores every layer at full length and needs far more than this at long context.

Native context window: 262,144 tokens. Licence: Apache 2.0, a permissive licence. Weights published in May 2026. It follows Gemma 3 12B.

Good at

  • The most modalities per gigabyte of any model here: it is the only one at this size that takes audio.
  • A 12 GB card with real context to spare, because 40 of its 48 layers only remember the last 1,024 tokens.
  • Commercial use without reading custom terms: Gemma 4 moved to Apache 2.0.

Watch out for

  • The sliding-window saving depends on the runtime. One that stores every layer at full length needs far more memory at long context.
  • Audio and video input need a runtime that supports them; many local ones handle text and images first.

Similar models

The models that need about the same memory as Gemma 4 12B at Q4_K_M and 8k, which makes them the real alternatives on whatever card you have. The context column is what each extra 1,000 tokens costs, and it is where models of the same size differ most.

ModelSizeNeedsPer 1k contextWindowReleased
Gemma 4 12B12B8.2 GB0.016 GB256k2026-05
Gemma 3 12B12.2B8.7 GB0.066 GB128k2025-03
Granite 4.2 8B8.8B7.2 GB0.164 GB128k2026-08
Qwen3.5 9B9.7B6.7 GB0.033 GB256k2026-02
Qwen3 8B8.2B6.7 GB0.147 GB40k2025-04

See every model compared, which models fit on 8 to 96 GB, or the cheapest hour of every cloud card.

Questions

Can I run Gemma 4 12B on a 24 GB card?
Yes, at Q4_K_M and 8k context it needs about 8.2 GB, which fits a 24 GB card with room.
How much VRAM does Gemma 4 12B need at Q8?
About 14.2 GB at 8k context, or 14.6 GB at 32k. Q8 is near-lossless; use it when it fits.
What is the context length of Gemma 4 12B?
262,144 tokens natively. Holding all of it at Q4_K_M takes about 12.4 GB, of which 4.6 GB is context.
Why does Gemma 4 12B need so little memory for long context?
Because most of its layers do not keep a cache that grows. It has 48 layers: 40 use sliding-window attention and only remember the last 1,024 tokens (8 KV heads of dimension 256), and 8 are global layers with a single KV head of dimension 512. At 32k tokens the context costs about 0.9 GB; if all 48 layers kept a conventional full-length cache, the same conversation would cost about 12.9 GB. That saving depends on the runtime implementing the sliding-window cache. llama.cpp and vLLM do; a build that does not will use far more.
Is Gemma 4 12B open source?
The weights are released under Apache 2.0, a permissive licence. That is a change from Gemma 3, which used Google's own Gemma Terms of Use with its own conditions.
How fast is Gemma 4 12B on an RTX 4090?
At most about 101 tokens per second at Q4, single stream, which is faster than you can read. That is a ceiling worked out from the card's memory bandwidth, not a measurement, and at a figure this high real runtimes land well below it, because the costs the formula leaves out take a growing share of each token.
  • Architecture values from config.json in google/gemma-4-12B-it on Hugging Face, checked 3 November 2026. Every figure on this page is computed from those values; check them before buying hardware for this model.
  • Estimates assume a single conversation on a card that is otherwise free. A desktop on the same GPU takes 0.5 to 2 GB.