Gemma 4 E4B VRAM requirements

Gemma 4 E4B has 8.0B parameters. With an 8K-token context and one request it needs about 5.61 GB of GPU memory at Q4_K_M, 8.85 GB at FP8 and 17.0 GB at FP16/BF16. The published weights take 14.9 GB (BF16). On one 24 GB RTX 3090 / 4090 it runs at Q4_K_M with its full 128K-token context.

Open Gemma 4 E4B in the calculator

VRAM by quantization

Weights plus the KV cache for 8,192 tokens in FP16 and the runtime overhead (0.5 GB plus 10%). Each row opens the calculator with that setting. What the GGUF names mean.

PrecisionWeightsTotalSmallest setup
As published (BF16) 14.9 GB 17.0 GB RTX 3090 / 4090
FP16 / BF16 14.9 GB 17.0 GB RTX 3090 / 4090
FP8 / INT8 7.45 GB 8.85 GB RTX 3060
INT4 (AWQ / GPTQ) 3.96 GB 5.01 GB RTX 3060
GGUF Q8_0 7.91 GB 9.36 GB RTX 3060
GGUF Q6_K 6.11 GB 7.38 GB RTX 3060
GGUF Q5_K_M 5.28 GB 6.46 GB RTX 3060
GGUF Q4_K_M 4.51 GB 5.61 GB RTX 3060
GGUF Q3_K_M 3.64 GB 4.66 GB RTX 3060
GGUF Q2_K 3.12 GB 4.09 GB RTX 3060

KV cache at long context

4 of its 42 layers use full attention, 20 keep a sliding window of 512 tokens and 18 reuse the cache of earlier layers. Each extra token of context adds 16 KB of FP16 cache per request once the sliding windows are full. How the KV cache works.

ContextKV cache, FP16KV cache, FP8Total at Q4_K_M
4K tokens 84 MB 42 MB 5.55 GB
32K tokens 532 MB 266 MB 6.03 GB
128K tokens 2.02 GB 1.01 GB 7.68 GB

Which GPUs can run Gemma 4 E4B

With 8,192 tokens of context. Several GPUs means one tensor-parallel group of 2, 4 or 8 cards.

GPUMemoryQ4_K_MFP8
RTX 3060 12 GB Fits on one Fits on one
RTX 4060 Ti 16GB 16 GB Fits on one Fits on one
RTX 3090 / 4090 24 GB Fits on one Fits on one
RTX 5090 32 GB Fits on one Fits on one
A100 40GB 40 GB Fits on one Fits on one
Mac, 64 GB unified memory about 75% of it is usable by the GPU by default 48 GB Fits on one Fits on one
L40S / RTX 6000 Ada 48 GB Fits on one Fits on one
A100 / H100 80GB 80 GB Fits on one Fits on one
Mac, 128 GB unified memory about 75% of it is usable by the GPU by default 96 GB Fits on one Fits on one
H200 141 GB Fits on one Fits on one
B200 180 GB Fits on one Fits on one

How fast Gemma 4 E4B writes

Tokens per second for one request with 8,192 tokens of context, estimated from memory bandwidth. A dash means it does not fit on one card. Try other settings in the speed calculator.

HardwareBandwidthQ4_K_MFP8
RTX 3060 12GB 360 GB/s 37–53 23–33
RTX 4090 1,008 GB/s 95–141 62–89
RTX 5090 1,792 GB/s 152–237 102–152
M4 Max Mac (128 GB) 546 GB/s 55–79 35–49
M3 Ultra Mac Studio (512 GB) 819 GB/s 79–116 51–73
H100 SXM 3,350 GB/s 238–402 169–267
H200 4,800 GB/s 295–530 218–362

Longest context on one GPU

How many tokens of context fit on a single card with one request and an FP16 KV cache. "Full" means the model's whole context window fits.

GPUMemoryQ4_K_MQ8_0FP8
RTX 3060 12 GB 128K (full) 128K (full) 128K (full)
RTX 4060 Ti 16GB 16 GB 128K (full) 128K (full) 128K (full)
RTX 3090 / 4090 24 GB 128K (full) 128K (full) 128K (full)
RTX 5090 32 GB 128K (full) 128K (full) 128K (full)
A100 40GB 40 GB 128K (full) 128K (full) 128K (full)
Mac, 64 GB unified memory 48 GB 128K (full) 128K (full) 128K (full)
L40S / RTX 6000 Ada 48 GB 128K (full) 128K (full) 128K (full)
A100 / H100 80GB 80 GB 128K (full) 128K (full) 128K (full)
Mac, 128 GB unified memory 96 GB 128K (full) 128K (full) 128K (full)
H200 141 GB 128K (full) 128K (full) 128K (full)
B200 180 GB 128K (full) 128K (full) 128K (full)

Model details

Parameters
8.0B (7,996,156,490)
Layers
4 of its 42 layers use full attention, 20 keep a sliding window of 512 tokens and 18 reuse the cache of earlier layers
Attention cache
2 KV heads × 512
Sliding-window layers
2 KV heads × 256
Context length
131,072 tokens
Published weights
14.9 GB (BF16)
On Hugging Face
google/gemma-4-E4B-it

Other models

Numbers read from the model files on Hugging Face on .