Will it fit? · prices checked 2026-11-19
How much GPU memory does Gemma 2 9B need?
Gemma 2 9B needs about 21.3 GB of GPU memory to run in BF16 with an 8K context (18.5 GB of weights, 2.8 GB of key-value cache), 12.1 GB in INT8 and 7.4 GB in INT4. The cheapest machine that holds it in BF16 today: 1 x RTX 4090 at $0.34 an hour (RunPod).
Memory, 8K context, batch 1
By precision
| Precision | Weights GB | KV cache GB | Total GB |
|---|---|---|---|
| BF16 | 18.5 | 2.8 | 21.3 |
| INT8 | 9.2 | 2.8 | 12.1 |
| INT4 | 4.6 | 2.8 | 7.4 |
Gemma 2 9B: 9.24 billion parameters, 42 layers, 8 key-value heads of size 256, from its published configuration. Try other settings on the calculator.
Machines that hold it · 2026-11-19
The cheapest ones that fit (BF16)
One machine of up to 8 GPUs, each provider's cheapest listed price; running across several GPUs splits the model between them.
| Machine | On-demand $/hour | Interruptible $/hour |
|---|---|---|
| 1 x RTX 409024 GB each | $0.34RunPod | |
| 1 x RTX A600048 GB each | $0.35Thunder Compute | $0.46 |
| 1 x L424 GB each | $0.44RunPod | $0.10 |
| 1 x RTX 509032 GB each | $0.60Salad | |
| 1 x L40S48 GB each | $0.79RunPod | from $0.74 |
| 2 x T416 GB each | $0.80Hugging Face | $0.14 |
| 1 x A100 40GB40 GB each | $0.89Jarvislabs | $0.72 |
| 1 x A10G24 GB each | $1.00Hugging Face | $0.42 |
| 1 x A100 80GB80 GB each | $1.09Thunder Compute | $0.68 |
| 1 x RTX PRO 600096 GB each | $1.80Nebius | from $0.79 |
Questions
Gemma 2 9B, answered
How much GPU memory does Gemma 2 9B need?
Gemma 2 9B needs about 21.3 GB of GPU memory to run in BF16 with an 8K context (18.5 GB of weights, 2.8 GB of key-value cache), 12.1 GB in INT8 and 7.4 GB in INT4. The cheapest machine that holds it in BF16 today: 1 x RTX 4090 at $0.34 an hour (RunPod).
Can I fine-tune Gemma 2 9B on one GPU?
With QLoRA (4-bit weights) it needs at least 8 GB plus activations; a full fine-tune needs at least 150.7 GB, which takes several GPUs.
How is this worked out?
Weights: parameters times bytes per parameter (BF16 2, INT8 1, INT4 0.5). The key-value cache: 2 x layers x key-value heads x head size x 2 bytes x context x batch. LoRA adds about 4% of the weights; a full fine-tune adds 14 bytes a parameter (gradients, Adam's two moments, 32-bit master weights). A GPU can use about 90% of its memory. Activations during training come on top, so treat a fine-tune's number as the least it needs.
Other models: Llama 3.1 8B · Llama 3.1 70B · Llama 3.1 405B · Qwen2.5 7B · Qwen2.5 72B · Mistral 7B · Mixtral 8x7B · Gemma 2 27B · Phi-3 mini