Gemma 4 26B-A4B VRAM requirements

Gemma 4 26B-A4B needs about 17.0 GB of VRAM at Q4_K_M with 8K context, so it fits a 24 GB card such as the RTX 3090 or the RTX 4090. Gemma 4 26B-A4B has 25.8B parameters, of which about 4B are used per token; all 128 experts still have to be in memory. With the same 8K context and one request it needs 27.4 GB at FP8 and 53.9 GB at FP16/BF16. The published weights take 48.1 GB (BF16). The smallest setup here that holds it at Q4_K_M with an 8K context is the RTX 3090 (24 GB), which runs it with its full 256K-token context.

17.0 GB at Q4_K_M, 8K context, one request

FP8
27.4 GB
FP16 / BF16
53.9 GB
Published weights
48.1 GB
Smallest setup, Q4_K_M
RTX 3090 (24 GB)
Open Gemma 4 26B-A4B in the calculator

Worked example: Gemma 4 26B-A4B with 32K tokens

Inputs: Gemma 4 26B-A4B · Q4_K_M weights · 32,768 tokens of context · one request · FP16 KV cache

Weights (25.8B at Q4_K_M)
14.5 GB
KV cache (20 KB per token)
940 MB
Buffers and runtime (0.5 GB + 10%)
2.05 GB
Total
17.5 GB

The smallest setup here that holds it is the RTX 3090 (24 GB), with about 6.50 GB to spare. Change the inputs in the calculator

Can I run Gemma 4 26B-A4B on…

What makes Gemma 4 26B-A4B's memory use different

Its 25 sliding-window layers keep only the last 1,024 tokens (llama.cpp gives them 1,536 cells: the window plus a 512-token batch, rounded up to 256): at its 256K limit they hold 300 MB of cache instead of the 50.0 GB they would need with full attention.

Per token of context it adds 20 KB of FP16 cache; Granite 4.2 30B (29.3B), the nearest-sized model here with plain full attention, adds 256 KB, so Gemma 4 26B-A4B needs 8% as much.

As a mixture-of-experts model it reads about 2.25 GB of its 14.5 GB Q4_K_M weights per generated token (16%), so it writes like a much smaller model while needing memory for all of them.

Running Gemma 4 26B-A4B with experts in system RAM

llama.cpp's --n-cpu-moe N keeps the experts of the first N layers in RAM. For the measured UD-Q4_K_M GGUF with 32K tokens of context, the smallest N that fits each card, and the speed with 89.6 GB/s of system RAM. Plan the offload for another GPU. The VRAM here can sit below the 17.5 GB of the worked example because it counts the file's measured bytes, keeps the input embedding (token_embd) in system RAM as llama.cpp does and adds a flat 1 GB of buffers, where the estimate above adds 0.5 GB plus 10% to the preset's weights.

GPU--n-cpu-moeVRAM usedIn system RAMTokens/s
RTX 5060 Ti 16GB 16 GB 3 15.6 GB 2.06 GB 32–54
RTX 4090 24 GB 0 (all on the GPU) 17.0 GB 748 MB 73–128
RTX 5090 32 GB 0 (all on the GPU) 17.0 GB 748 MB 120–217

In system RAM counts the offloaded experts plus the input embedding (token_embd), which stays in RAM even with --n-cpu-moe 0.

How much VRAM does Gemma 4 26B-A4B need?

Gemma 4 26B-A4B needs 17.0 GB at Q4_K_M, 29.1 GB at Q8_0 and 53.9 GB at FP16 with 8,192 tokens of context and one request. Each total below is the weights plus the FP16 KV cache and the runtime overhead (0.5 GB plus 10%), and each row opens the calculator with that setting. What the GGUF names mean.

PrecisionWeightsTotalSmallest setup
As published (BF16) 48.1 GB 53.9 GB 2× RTX 5090 (64 GB)
FP16 / BF16 48.1 GB 53.9 GB 2× RTX 5090 (64 GB)
FP8 / INT8 24.0 GB 27.4 GB RTX 5090 (32 GB)
INT4 (AWQ / GPTQ) 12.8 GB 15.0 GB RTX 4060 Ti 16GB
GGUF Q8_0 25.5 GB 29.1 GB RTX 5090 (32 GB)
GGUF Q6_K 19.7 GB 22.7 GB RTX 3090 (24 GB)
GGUF Q5_K_M 17.0 GB 19.7 GB RTX 3090 (24 GB)
GGUF Q4_K_M 14.5 GB 17.0 GB RTX 3090 (24 GB)
GGUF IQ4_XS 13.1 GB 15.4 GB RTX 4060 Ti 16GB
GGUF Q3_K_M 11.7 GB 13.9 GB RTX 4060 Ti 16GB
GGUF IQ3_XXS 9.91 GB 11.9 GB RTX 3060 12GB
GGUF Q2_K 10.1 GB 12.1 GB RTX 4060 Ti 16GB

Fine-tuning Gemma 4 26B-A4B? Gemma 4 26B-A4B VRAM for LoRA, QLoRA and full training.

Gemma 4 26B-A4B GGUF files on Hugging Face

The 8 GGUF files llama.cpp picks for Gemma 4 26B-A4B with -hf <repo>:<QUANT>, with the bytes the Hugging Face file list reported on 2026-09-29. Each total is that file plus the FP16 KV cache and 0.5 GB + 10%, one request. "vs estimate" compares the file with the bits-per-weight size the table above uses.

QuantFileSizevs estimate 8K32K128K
Q2_K bartowski/google_gemma-4-26B-A4B-it-GGUF 10.2 GB10,951,927,936 bytes +1% 12.2 GB12.7 GB14.8 GB
Q3_K_M unsloth/gemma-4-26B-A4B-it-GGUF 11.9 GB12,728,497,888 bytes +1% 14.0 GB14.5 GB16.6 GB
IQ4_XS unsloth/gemma-4-26B-A4B-it-GGUF 12.7 GB13,597,177,568 bytes −3% 14.9 GB15.4 GB17.5 GB
Q4_K_M unsloth/gemma-4-26B-A4B-it-GGUF 15.8 GB16,947,541,728 bytes +9% 18.4 GB18.9 GB20.9 GB
Q5_K_M unsloth/gemma-4-26B-A4B-it-GGUF 19.7 GB21,150,365,408 bytes +16% 22.7 GB23.2 GB25.2 GB
Q6_K unsloth/gemma-4-26B-A4B-it-GGUF 21.6 GB23,172,478,688 bytes +10% 24.7 GB25.2 GB27.3 GB
Q8_0 ggml-org/gemma-4-26B-A4B-it-GGUF 25.0 GB26,859,860,992 bytes −2% 28.5 GB29.0 GB31.1 GB
BF16 ggml-org/gemma-4-26B-A4B-it-GGUF 47.0 GB50,505,137,152 bytes −2% 52.7 GB53.2 GB55.3 GB

GB here is GiB (1024³ bytes), as everywhere on this site; Hugging Face shows the Q4_K_M file as 16.9 GB, in 10⁹ bytes.

Which Gemma 4 26B-A4B GGUF fits a 16, 24, 32, 48 or 80 GB GPU or a Mac

From the file sizes above: the largest file that fits each machine with an 8K context and 0.5 GB left free, the longest context it then has room for, and the longest context for Q4_K_M (15.8 GB). One request, FP16 KV cache, -np 1. Where nothing fits, the --n-cpu-moe table above keeps experts in system RAM.

HardwareLargest GGUF, 8KIts longest contextQ4_K_M, longest context
RTX 5060 Ti 16GB IQ4_XS, 12.7 GB 34K No
RTX 4090 (24 GB) Q5_K_M, 19.7 GB 46K 247K
RTX 5090 (32 GB) Q8_0, 25.0 GB 146K 256K (full)
L40S (48 GB) Q8_0, 25.0 GB 256K (full) 256K (full)
H100 SXM (80 GB) BF16, 47.0 GB 256K (full) 256K (full)
M4 Pro Mac (64 GB, 48 GB usable) Q8_0, 25.0 GB 256K (full) 256K (full)
M4 Max Mac (128 GB, 96 GB usable) BF16, 47.0 GB 256K (full) 256K (full)

Run Gemma 4 26B-A4B with llama.cpp or Ollama

llama-server -hf unsloth/gemma-4-26B-A4B-it-GGUF:Q4_K_M -c 252928 -np 1

gemma-4-26B-A4B-it-UD-Q4_K_M.gguf, 16.9 GB, from unsloth/gemma-4-26B-A4B-it-GGUF (checked 2026-09-29). On a 24 GB RTX 3090 / 4090, Q4_K_M with -c 252928 takes 23.5 GB and leaves 521 MB. The file is 1.24 GB over the Q4_K_M estimate, so -c counts the file. -np 1: one slot, so one 1,024-token window.

ollama run gemma4:26b

Ollama library tag gemma4:26b; its quant is Ollama's choice. Same context: /set parameter num_ctx 252928.

Gemma 4 26B-A4B at 8K, 32K, 128K and 256K (full) tokens of context

5 of its 30 layers use full attention and 25 keep a sliding window of 1,024 tokens. Each extra token of context adds 20 KB of FP16 cache per request once the sliding windows are full. The last column is the smallest setup here, one card or a group, that holds it at Q4_K_M. How the KV cache works.

ContextKV cache, FP16Total at Q4_K_MTotal at Q8_0Smallest setup, Q4_K_M
8K tokens 460 MB 17.0 GB 29.1 GB RTX 3090 (24 GB)
32K tokens 940 MB 17.5 GB 29.6 GB RTX 3090 (24 GB)
128K tokens 2.79 GB 19.6 GB 31.7 GB RTX 3090 (24 GB)
256K tokens 5.29 GB 22.3 GB 34.4 GB RTX 3090 (24 GB)

How fast Gemma 4 26B-A4B writes

Tokens per second for one request with 8,192 tokens of context, estimated from memory bandwidth and the parameters read per token. 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 ——
RTX 4090 1,008 GB/s 90–160—
RTX 5090 1,792 GB/s 145–267102–182
M4 Max Mac (128 GB) 546 GB/s 52–9035–59
M3 Ultra Mac Studio (512 GB) 819 GB/s 75–13251–87
H100 SXM 3,350 GB/s 228–448168–315
H200 4,800 GB/s 284–585217–422

Longest context on one GPU

How many tokens of context Gemma 4 26B-A4B fits on a single card with one request, an FP16 KV cache and 0.5 GB left free. "Full" means the model's whole context window fits.

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

Model details

Parameters
25.8B (25,805,936,206)
Experts
128 routed experts, all loaded
Active per token
4B
Layers
5 of its 30 layers use full attention and 25 keep a sliding window of 1,024 tokens
Attention cache
2 KV heads × 512 (values come from the key projection but are cached separately)
Sliding-window layers
8 KV heads × 256
Context length
262,144 tokens
Published weights
48.1 GB (BF16)
On Hugging Face
google/gemma-4-26B-A4B-it
Reported benchmarks
GPQA Diamond 82.3 · MMLU-Pro 82.6 · LiveCodeBench v6 77.1. Vendor-reported: from the maker’s own model card, not rerun here; read 2026-09-30.

Why this estimate looks this way

At Q4_K_M and an 8K-token context, Gemma 4 26B-A4B uses 14.5 GB for weights, 460 MB for its FP16 KV cache and 2.00 GB for estimated runtime overhead, totaling 17.0 GB. The overhead is a 0.5 GB base plus 10% of weights and cache.

This is a mixture-of-experts model: all 128 experts contribute to the 25.8B parameters held in memory, even though only about 4B parameters run per token. Using only active parameters would understate VRAM.

Its attention layout matters for long context: 5 of its 30 layers use full attention and 25 keep a sliding window of 1,024 tokens. The FP16 cache grows by about 20 KB per additional token per request once the sliding windows are full.

The architecture and published checkpoint size come from the model's config.json and weight files. These are estimates rather than measured peak memory; inference engines can reserve extra buffers or preallocate the full configured cache.

Gemma 4 26B-A4B next to similar-sized models

The three models here closest to it in parameter count, at Q4_K_M with 8,192 tokens of context.

ModelParametersTotalKV per tokenSmallest setup
Gemma 4 26B-A4B 25.8B, 4B active 17.0 GB 20 KB RTX 3090 (24 GB)
Hemmingway-1 27B 27.3B 18.0 GB 64 KB RTX 3090 (24 GB)
ThinkingCap Qwen3.8 27B 27.8B 18.3 GB 64 KB RTX 3090 (24 GB)
Qwen3.6 27B 27.8B 18.3 GB 64 KB RTX 3090 (24 GB)

Gemma 4 26B-A4B VRAM questions

How much VRAM do I need to run Gemma 4 26B-A4B locally?

About 17.0 GB at Q4_K_M with an 8K context and one request, by the bits-per-weight estimate, and 53.9 GB at BF16. The Q4_K_M GGUF gemma-4-26B-A4B-it-UD-Q4_K_M.gguf in unsloth/gemma-4-26B-A4B-it-GGUF is 16,947,541,728 bytes (15.8 GB); with an 8K context it needs 18.4 GB. The smallest setup listed here that holds Q4_K_M is the RTX 3090 (24 GB).

Can I run Gemma 4 26B-A4B on a 24 GB GPU?

Yes. On the RTX 4090 (24 GB), the largest listed GGUF that fits with an 8K context and 0.5 GB free is Q5_K_M (19.7 GB), with up to 46K tokens of context. Q4_K_M (15.8 GB) runs with up to 247K tokens of context.

Which quantization of Gemma 4 26B-A4B fits in 16 GB of VRAM?

On the RTX 5060 Ti 16GB, the largest listed GGUF that fits with an 8K context and 0.5 GB free is IQ4_XS (12.7 GB), with up to 34K tokens of context.

Can I run Gemma 4 26B-A4B on a Mac?

On the M4 Pro Mac (64 GB, 48 GB usable), the largest listed GGUF that fits with an 8K context and 0.5 GB free is Q8_0 (25.0 GB), with its full 256K-token context. On the M4 Max Mac (128 GB, 96 GB usable), the largest listed GGUF that fits with an 8K context and 0.5 GB free is BF16 (47.0 GB), with its full 256K-token context. By default macOS lets the GPU use about 75% of unified memory.

How much more VRAM does Gemma 4 26B-A4B need for 32K or 128K tokens of context?

Its FP16 KV cache is 460 MB at 8K, 940 MB at 32K, 2.79 GB at 128K for one request, so 128K adds 2.34 GB over 8K, plus 10% overhead. A q8_0 cache (-ctk q8_0 -ctv q8_0) takes 1.48 GB at 128K. Its 25 sliding-window layers stop growing at 1,024 tokens, so only 5 layers keep adding cache.

Why does Gemma 4 26B-A4B use more VRAM than its GGUF file size?

The file holds only the weights. At Q4_K_M with an 8K context: 15.8 GB of weights (the file's 16,947,541,728 bytes) + 460 MB of FP16 KV cache + 2.12 GB of compute buffers and runtime (0.5 GB + 10%) = 18.4 GB.

Does Gemma 4 26B-A4B need less VRAM because only 4B parameters are active?

No. All 128 experts stay loaded, so the Q4_K_M file takes 15.8 GB. The active parameters decide speed: each generated token reads about 2.25 GB of them.

Badge for your model card

Paste it into a Hugging Face or GitHub README; it shows the Q4_K_M total above and links to this page. Q8_0 and FP16 badges.

Gemma 4 26B-A4B VRAM: 17.0 GB at Q4_K_M, 8K context

Numbers read from the model files on Hugging Face on . Compare it with other models in the reproducible model and GPU report.