Skip to content
Llama Builds

Hardware guide · October 2026

What GPU do you need to run Gemma 4 E4B?

Gemma 4 E4B is a 8B dense model. Here is exactly how much memory it needs and which GPUs and Macs run it well.

By Updated

The short answer

To run Gemma 4 E4B at Q4_K_M with 8K tokens of context you need about 6.3GB of VRAM (5.4GB of weights plus KV cache and overhead). The cheapest way in is a 8GB card like the RTX 5060 (~$450). On a Mac or other unified-memory system, the Ryzen AI Max+ 395 runs it at ~20 tokens/sec.

VRAM at Q4_K_M
~6.3GB
GPUs that run it
36
Parameters
8B
CPU only (est.)
~8.1 tok/s

Our recommendations

The best GPUs for Gemma 4 E4B

Minimum

RTX 5060

8GB · ~$450

Quant
Q4_K_M
Speed (est.)
~62 tok/s
Runs well

The smallest card that runs it at Q4_K_M with 8K context.

Fastest

RTX 5090

32GB · ~$4,300

Quant
Q8_0
Speed (est.)
~130 tok/s
Runs well

The fastest single GPU in our database for this model.

Mac / unified memory

Ryzen AI Max+ 395

128GB unified · ~$3,300

Quant
Q8_0
Speed (est.)
~20 tok/s
Runs well

Lots of memory per dollar and silent, but slower than a GPU with the same capacity.

We may earn a commission when you buy through links on this page. It never changes what we recommend. How we make money

Memory

Gemma 4 E4B VRAM requirements

Memory needed at each quantization level. Q4_K_M is the best balance of size and quality for most people; move up to Q5 or Q6 if you have the room.

Memory needed for Gemma 4 E4B at each quantization level
QuantizationQualityWeightsTotal @ 8K ctxTotal @ 32K ctx
Q2_KRough3.3 GB4.2 GB4.6 GB
Q3_K_MUsable4.3 GB5.2 GB5.6 GB
Q4_K_MRecommendedDefault5.4 GB6.3 GB6.7 GB
Q5_K_MVery good6.3 GB7.3 GB7.7 GB
Q6_KNear-lossless7.3 GB8.3 GB8.7 GB
Q8_0Practically lossless9.5 GB10 GB11 GB
BF16Full precision18 GB19 GB19 GB

Context

How context length changes the memory you need

Every token in the context window is stored in the KV cache. At Q4_K_M, with a 16-bit KV cache, Gemma 4 E4B needs:

ContextKV cacheTotal memoryWith 8-bit KV
4K tokens0.1 GB6.2 GB6.2 GB
8K tokens0.1 GB6.3 GB6.2 GB
16K tokens0.3 GB6.4 GB6.3 GB
32K tokens0.5 GB6.7 GB6.4 GB
64K tokens1.1 GB7.2 GB6.7 GB
128K tokens2.1 GB8.3 GB7.2 GB

42 layers, but 18 reuse the KV cache of earlier layers and most of the rest use a 512-token sliding window. Only 4 global layers grow with context: 2 x 4 x 2 KV heads x 512 dims x 2 bytes = 16,384 bytes per token (llama.cpp reports 2,048 MiB for them at 131,072 tokens). The sliding layers add a small fixed buffer.

Compatibility

Every GPU that runs Gemma 4 E4B

Each GPU at the highest-quality quantization that fits with 8K context, fastest first. Speeds are single-user estimates.

GPUMemoryQuantSpeedFitPrice
RTX PRO 600096GBQ8_0~130 tok/sRuns well~$16,000
RTX 509032GBQ8_0~130 tok/sRuns well~$4,300
RTX PRO 5000 72GB72GBQ8_0~100 tok/sRuns well~$9,100
RTX 409024GBQ8_0~79 tok/sRuns well~$2,500 used
RTX 6000 Ada48GBQ8_0~75 tok/sRuns well~$4,750 used
RTX 508016GBQ8_0~75 tok/sRuns well~$1,600
RTX 5070 Ti16GBQ8_0~70 tok/sRuns well~$1,200
RTX 309024GBQ8_0~66 tok/sRuns well~$1,050 used
M5 Ultra 512GB512GB unifiedQ8_0~64 tok/sRuns well—
M5 Ultra 256GB256GB unifiedQ8_0~64 tok/sRuns well~$9,499
RTX 50608GBQ4_K_M~62 tok/sRuns well~$450
RX 7900 XTX24GBQ8_0~60 tok/sRuns well~$1,050 used
RTX 4080 Super16GBQ8_0~59 tok/sRuns well~$1,150 used
V100 32GB32GBQ8_0~58 tok/sRuns well~$700 used
RTX A600048GBQ8_0~55 tok/sRuns well~$4,400 used
RTX 4070 Ti Super16GBQ8_0~54 tok/sRuns well~$900 used
RTX 507012GBQ8_0~54 tok/sRuns well~$800
M3 Ultra 512GB512GB unifiedQ8_0~44 tok/sRuns well$9,499
MI50 32GB32GBQ8_0~44 tok/sRuns well~$600 used
R970032GBQ8_0~41 tok/sRuns well~$1,800
RX 9070 XT16GBQ8_0~41 tok/sRuns well~$800
RTX 407012GBQ8_0~41 tok/sRuns well~$560 used
M5 Max 128GB128GB unifiedQ8_0~40 tok/sRuns well~$5,100
RTX 5060 Ti 16GB16GBQ8_0~36 tok/sRuns well~$620
M4 Max 128GB128GB unifiedQ8_0~36 tok/sRuns well$3,499
Arc Pro B7032GBQ8_0~33 tok/sRuns well~$1,300
RTX 4000 Ada20GBQ8_0~30 tok/sRuns well$1,250
RTX 3060 12GB12GBQ8_0~27 tok/sRuns well~$270 used
Arc Pro B6024GBQ8_0~25 tok/sRuns well~$650
Arc B58012GBQ8_0~25 tok/sRuns well~$330
RTX 4060 Ti 16GB16GBQ8_0~24 tok/sRuns well~$380 used
RX 9060 XT 16GB16GBQ8_0~21 tok/sRuns well~$470
Ryzen AI Max+ PRO 495192GB unifiedQ8_0~21 tok/sRuns well~$6,800
DGX Spark128GB unifiedQ8_0~21 tok/sRuns well~$6,950
Ryzen AI Max+ 395128GB unifiedQ8_0~20 tok/sRuns well~$3,300
Tesla P4024GBQ8_0~20 tok/sRuns well~$230 used

Tips

Getting the most out of Gemma 4 E4B

  • Start at Q4_K_M. It keeps nearly all of the quality at about a third of the 16-bit size. Step up to Q5_K_M or Q6_K only if it still fits with the context you need.
  • Budget memory for context. The KV cache grows with every token. Quantizing it to 8-bit roughly halves that cost with little quality loss.
  • Avoid heavy CPU offload. For a dense model, every token reads every weight. Once a large share of the model sits in system RAM, speed falls off a cliff. A second GPU usually beats offloading.
  • Pick the right runtime. Ollama and LM Studio are easiest. llama.cpp gives the most control. vLLM or SGLang are best when several people or agents share one machine.

Want to try different quantizations, context lengths, or GPU counts? Use our VRAM calculator, or read the Gemma 4 E4B overview for setup commands and benchmarks.

Frequently asked questions

How much VRAM do I need to run Gemma 4 E4B?

About 6.3GB at Q4_K_M with an 8K context window. At Q8_0 (near-lossless) it needs about 10GB, and at Q3_K_M about 5.2GB with some quality loss. Longer contexts add 0.02GB per 1K tokens with a 16-bit KV cache.

Can I run Gemma 4 E4B on a 8GB GPU?

Yes. A 8GB card like the RTX 5060 runs it at Q4_K_M at ~62 tokens/sec.

Can I run Gemma 4 E4B on a Mac?

Yes. With 128GB of unified memory or more (for example the Ryzen AI Max+ 395), macOS can give the GPU enough memory to run it at Q8_0, at about ~20 tokens/sec. MLX builds are usually fastest on Apple silicon.

Can I run Gemma 4 E4B on CPU only, without a GPU?

Yes, if you have at least 16GB of system RAM. On a desktop with dual-channel DDR5, expect roughly 8.1 tokens/sec. A GPU is recommended for interactive use.