Skip to content

Gemma 2 9B VRAM Requirements

Google, United States · Released June 27, 2024

Gemma 2 9B has 9.24B parameters. In BF16 its weights alone take 17.2 GiB; quantized to 4-bit, about 5.37 GiB. Cheapest way to run it today: 1 × RTX A4000 (16 GB) at $0.072 per hour.

On your own machine, with a 32K context: the smallest card that holds it entirely is an RTX 4060 Ti (16 GB) in Q6_K, about 15 tokens/s; an RTX 4090 (24 GB) in Q8_0, about 45 tokens/s. A Mac needs 24 GB of memory (Q8_0, about 5.5 tokens/s on an M4). Without a graphics card it runs from 32 GB of RAM at about 3.7 tokens/s.

Does it run on your machine? Open the calculator →

Pick it once and every model page tells you whether it runs on it. Kept in this browser only.

Gemma 2 9B at a glance

Made by
Google, United States
Released
June 27, 2024
Parameters
9.24B
Context window
8K tokens
License
Gemma Terms of Use
Access
Gated: accept the license on Hugging Face (opens in a new tab) before downloading the weights
Reads
Text only
Training
4.3 × 1023 FLOP · 8.0 trillion tokens · 4,096 × Google TPU v4

Epoch AI (opens in a new tab), CC BY 4.0

Quality, measured by others
LMArena text score 1,207

Preference votes: 1,204 to 1,211 (95%), 55K votes, as “Gemma 2 9B IT”, 2026-11-22. LMArena (opens in a new tab), CC BY 4.0

Epoch Capabilities Index 113

Benchmarks combined, as “Gemma 2 9B”. Epoch AI (opens in a new tab), CC BY 4.0

Runs with
vLLM, SGLang, llama.cpp (Ollama, LM Studio), MLX (Mac)
On Ollama
ollama run gemma2:9b · Q4_0, 5.1 GiB 38M pulls (opens in a new tab)

VRAM by precision and context length

Weights plus the KV cache of one request (BF16 cache), in GiB. Add 1 to 3 GiB for the inference engine itself.

Weights formatWeights only+ 8K context
BF16 / FP1617.219.2
FP8 / INT89.4611.4
4-bit (GGUF Q4_K_M)5.377.33

Gemma 2 9B GGUF files

Exact size of each quantization in bartowski/gemma-2-9b-it-GGUF (opens in a new tab), and the smallest GPU that runs it with llama.cpp, Ollama or LM Studio and an 8K-token context. Quantizations marked * are not published there: they come from mradermacher/gemma-2-9b-it-i1-GGUF (opens in a new tab).

QuantizationFile sizeSmallest GPU
F169.95 GiBRTX 4080 / 4080 SUPER (16 GB)
Q8_09.15 GiBRTX 4080 / 4080 SUPER (16 GB)
Q6_K7.07 GiBRTX 4070 / 4070 SUPER (12 GB)
Q5_K_M6.19 GiBRTX 4070 / 4070 SUPER (12 GB)
Q4_K_M5.37 GiBRTX 4070 / 4070 SUPER (12 GB)
IQ4_XS4.83 GiBRTX 4070 / 4070 SUPER (12 GB)
Q3_K_M4.43 GiBRTX 4070 / 4070 SUPER (12 GB)
Q2_K3.54 GiBRTX 4060 (8 GB)
IQ1_S (from mradermacher/gemma-2-9b-it-i1-GGUF)2.22 GiBRTX 4060 (8 GB)
Show the other 22 files
QuantizationFile sizeSmallest GPU
F3234.4 GiBRTX 6000 Ada (48 GB)
Q8_0_L9.95 GiBRTX 4080 / 4080 SUPER (16 GB)
Q87.27 GiBRTX 4070 / 4070 SUPER (12 GB)
Q6_K_L7.27 GiBRTX 4070 / 4070 SUPER (12 GB)
Q5_K_L6.40 GiBRTX 4070 / 4070 SUPER (12 GB)
Q5_K_S6.04 GiBRTX 4070 / 4070 SUPER (12 GB)
Q4_K_L5.57 GiBRTX 4070 / 4070 SUPER (12 GB)
Q4_K_S5.10 GiBRTX 4070 / 4070 SUPER (12 GB)
Q4_0 (from mradermacher/gemma-2-9b-it-i1-GGUF)5.08 GiBRTX 4070 / 4070 SUPER (12 GB)
Q3_K_XL4.99 GiBRTX 4070 / 4070 SUPER (12 GB)
Q3_K_L4.78 GiBRTX 4070 / 4070 SUPER (12 GB)
IQ3_M4.19 GiBRTX 4070 / 4070 SUPER (12 GB)
IQ3_S (from mradermacher/gemma-2-9b-it-i1-GGUF)4.04 GiBRTX 4070 / 4070 SUPER (12 GB)
Q3_K_S4.04 GiBRTX 4070 / 4070 SUPER (12 GB)
IQ3_XS3.86 GiBRTX 4070 / 4070 SUPER (12 GB)
Q2_K_L3.75 GiBRTX 4060 (8 GB)
IQ3_XXS3.54 GiBRTX 4060 (8 GB)
IQ2_M3.20 GiBRTX 4060 (8 GB)
IQ2_S2.99 GiBRTX 4060 (8 GB)
IQ2_XS2.86 GiBRTX 4060 (8 GB)
IQ2_XXS (from mradermacher/gemma-2-9b-it-i1-GGUF)2.63 GiBRTX 4060 (8 GB)
IQ1_M (from mradermacher/gemma-2-9b-it-i1-GGUF)2.37 GiBRTX 4060 (8 GB)

Read every day from Hugging Face. Split files are added together; vision projectors are left out.

How many GPUs to run Gemma 2 9B

Fewest GPUs that fit the weights plus one 8K-token request. Data-center GPUs use vLLM (90% of memory usable), the others llama.cpp. Several GPUs split the model with tensor or pipeline parallelism.

GPUBF16 / FP168-bit4-bit
GeForce RTX 4090 24 GB111
GeForce RTX 5090 32 GB111
RTX PRO 6000 Blackwell 96 GB111
Mac M5 Max 128 GB 107.5 GB usable111
Ryzen AI Max+ 395 128 GB 96 GB usable111
DGX Spark (GB10) 128 GB111
NVIDIA H100 80 GB111
NVIDIA H200 141 GB111
NVIDIA B200 (HGX) 180 GB111

8-bit: FP8 with vLLM (INT8 on GPUs without FP8), Q8_0 with llama.cpp. 4-bit: AWQ / GPTQ with vLLM, Q4_K_M with llama.cpp, both counted at the Q4_K_M size.

Cheapest way to run Gemma 2 9B today

For each GPU: the fewest cards that fit Gemma 2 9B with one 8K-token request, the most faithful weight format at that count, and the cheapest on-demand price (2026-12-05).

On-demand prices from AWS, Google Cloud, Azure, RunPod, Vast.ai, Oracle Cloud, OVHcloud, Scaleway, Verda, Akash and UpCloud, checked every hour. Serving many users needs more KV cache, so more memory: size it in the calculator. Some links are affiliate links: StudioTV may earn a commission, at no extra cost to you.

AWS, Google Cloud and UpCloud prices: Spare Cores (opens in a new tab), CC BY-SA 4.0 (opens in a new tab), shared under the same license.

KV cache: how memory grows with context

Architecture: 21 full-attention layers + 21 sliding-window layers (4096 tokens), GQA 8 KV × 256. Its KV cache is 1.8× smaller than if every layer used full attention, because most layers only keep a short window of recent tokens.

Context per requestBF16 cacheFP8 cache
8K tokens1.97 GiB0.98 GiB

Gemma 2 9B VRAM FAQ

How much VRAM does Gemma 2 9B need?

In BF16 the weights alone take 17.2 GiB (18 GB). In FP8 that is 9.46 GiB, and about 5.37 GiB with 4-bit quantization (Q4_K_M). Each request then adds KV cache: 1.97 GiB at 8K tokens (BF16 cache).

Can Gemma 2 9B run on an 8 GB, 12 GB or 16 GB graphics card?

With a 32K context and llama.cpp: 8 GB (RTX 4060): only with part of the model in system RAM, about 5.8 tokens/s in Q5_K_M; 12 GB (RTX 3060): only with part of the model in system RAM, about 13 tokens/s in Q4_K_M; 16 GB (RTX 4060 Ti): yes, in Q6_K, about 15 tokens/s. Counted with 32 GB of system RAM. A shorter context needs less memory.

How fast is Gemma 2 9B on an RTX 4090 or an RTX 5090?

About 45 tokens/s on an RTX 4090 in Q8_0. About 54 tokens/s on an RTX 5090 in BF16. These are estimates for one request at a 32K context; against 19 published llama.cpp measurements on consumer and workstation GPUs, our estimates are 8% off at the median.

Can Gemma 2 9B run without a graphics card?

Yes, slowly: about 3.7 tokens/s in Q5_K_M on a processor with 32 GB of dual-channel DDR5 RAM (llama.cpp, 32K context).

Can Gemma 2 9B run a coding agent on an RTX 4090 or an RTX 5090?

Not well: its context stops at 8K tokens, and coding agents need at least 64K (Ollama's guidance for agents and coding tools).

Can Gemma 2 9B run on a single RTX 4090 (24 GB)?

Yes. In BF16 it fits on one RTX 4090 with an 8K-token context (19.2 GiB including the cache, with llama.cpp).

Can Gemma 2 9B run on an RTX 5090 (32 GB)?

Yes. In BF16 (19.2 GiB with an 8K-token context) it fits on one RTX 5090, with llama.cpp.

Can Gemma 2 9B run on a Mac?

Yes. In 4-bit (Q4_K_M with llama.cpp) it needs a Mac with 16 GB of unified memory or more, of which macOS gives the GPU about 12 GB, for one request with an 8K-token context. In 8-bit (Q8_0) it needs 18 GB or more.

Can Gemma 2 9B run on a DGX Spark or a Ryzen AI Max+ 395 (128 GB)?

Yes. In BF16 (19.2 GiB with an 8K-token context) it fits on a DGX Spark (128 GB) and on a Ryzen AI Max+ 395 with 128 GB, whose GPU gets up to 96 GB, with llama.cpp and one request.

What is the cheapest way to run Gemma 2 9B?

On 2026-12-05, the cheapest on-demand setup is 1 × RTX A4000 (16 GB) with Q8_0 weights on Vast.ai, at $0.072 per hour (about $52.56 per month). Next: 1 × GeForce RTX 3090 (24 GB) with BF16 weights on Vast.ai, at $0.100 per hour. Sized for one 8K-token request; prices are checked every hour.

How many H100 GPUs does Gemma 2 9B need?

With one request and an 8K-token context: 1 in BF16, 1 in FP8 and 1 in 4-bit (vLLM, 90% of memory usable). Serving many users at once needs more memory for their KV caches: the calculator sizes that for you.

Gemma 2 9B VRAM badge

For a model card or a README: the 4-bit size and the smallest GPU it fits on, linked to this page. Data as JSON: /api/models/gemma-2-9b.json.

Gemma 2 9B VRAM badge

[![Gemma 2 9B VRAM](https://studiotvai.com/badge/gemma-2-9b.svg)](https://studiotvai.com/vram-requirements/gemma-2-9b)

Other models

Same family (sliding-window attention): Gemma 3 4B · Gemma 3 12B · Gemma 3 27B · Unlimited-OCR · Gemma 4 12B · Gemma 4 31B · Gemma 4 26B-A4B · gpt-oss 20B · gpt-oss 120B · Llama 4 Scout 17B-16E · Llama 4 Maverick 17B-128E · Bienenelfe-1 · Bienenelfe-1.1 · Recursive Flint · Nemotron Labs Dory 1.0 4B · Step 3.5 Flash · Step 3.7 Flash · Laguna S 2.1 · Laguna XS 2.1 · Command A+ · Inkling Small · Muse Glimmer 30B · Inkling 2 Mini · Caveling 2 Mini · MedGemma 2 26B-A4B · Humanizer · Mellum2.1 12B-A2.5B · Spark-X2.5 4B · Ministral 8B · Gemma 4 E4B · Gemma 4 E2B · Spark-X2.6 4B · Spark-X2.6 1.7B · Laguna XS.2 · Qwen3.8 27B-DSpine-b16 · Aion-1.0 2.3B · cellgemma-e4b · flint-v1.1

Similar size: Qwen3.5 4B-Qwenputer · MiniCPM-o-4_5 · Sage-Interaction · Clef Flash · Ministral 3 8B · Nemotron Nano 9B v2 · Qwen3.5 9B · Ornith 1.5 9B · SenseNova Loop 9B · Granite 4.2 8B

Browse all 264 models →

Estimates, not guarantees: computed from the official config.json with the same engine as the LLM VRAM Calculator. Real usage depends on your engine version and settings.