Skip to content
AI Dev Toolkit.
Esc
  • Loading…

VRAM · Local model

Gemma 4 26B-A4B VRAM requirements: can you run it locally?

Yes, on one 24 GB GPU such as the Radeon RX 7900 XTX, or a Mac with 32 GB of unified memory. At Q4_K_M and an 8K context it needs about 17 GB. At 8-bit (Q8_0) it needs about 28 GB, which fits a 32 GB card. Estimates from the model’s official config.json, checked 2026-10-08.

Parameters
25.8B
Layers
30
Max context
262,144
Experts
Dense

Attention: 5 full-attention layers, 25 sliding-window layers (last 1,024 tokens).

Requirements

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

Quantisation8K context32K context128K context256K context
FP16 / BF1653 GB54 GB56 GB59 GB
Q8_0 (8-bit)28 GB29 GB31 GB34 GB
Q6_K22 GB23 GB25 GB27 GB
Q5_K_M19 GB20 GB22 GB25 GB
Q4_K_M17 GB17 GB19 GB22 GB
Q3_K_M14 GB14 GB16 GB19 GB
Q2_K11 GB11 GB13 GB16 GB

Weights + FP16 KV cache + overhead, batch 1; the VRAM calculator shows the formula.

GPUs

Which GPUs can run Gemma 4 26B-A4B?

MemoryExample cardBest quality at 8KLongest context at that qualityLongest context at Q4_K_M
8 GBGeForce RTX 4060Doesn’t fit——
12 GBGeForce RTX 5070Q2_K · 11 GB62K—
16 GBGeForce RTX 5080Q3_K_M · 14 GB119K—
24 GBRadeon RX 7900 XTXQ6_K · 22 GB98K256K
32 GBGeForce RTX 5090Q8_0 (8-bit) · 28 GB172K256K
48 GBL40SQ8_0 (8-bit) · 28 GB256K256K
80 GBH100 80GBFP16 / BF16 · 53 GB256K256K
96 GBRTX PRO 6000 BlackwellFP16 / BF16 · 53 GB256K256K

The smallest card that holds Gemma 4 26B-A4B at Q4_K_M with an 8K context has 24 GB, such as the Radeon RX 7900 XTX; there it has room for about 256K tokens. For 8-bit or better you need a 32 GB card, and full 16-bit precision (53 GB) fits from 80 GB. Cards with 8 GB can’t hold it at any quantisation with an 8K context; the smallest file, Q2_K, needs about 11 GB.

Apple Silicon

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

Mac memoryGPU can useBest quality at 8KLongest context
16 GB11 GBDoesn’t fit—
24 GB16 GBQ3_K_M · 14 GB119K
32 GB21 GBQ5_K_M · 19 GB106K
36 GB27 GBQ6_K · 22 GB237K
48 GB36 GBQ8_0 (8-bit) · 28 GB256K
64 GB48 GBQ8_0 (8-bit) · 28 GB256K
96 GB72 GBFP16 / BF16 · 53 GB256K
128 GB96 GBFP16 / BF16 · 53 GB256K
192 GB144 GBFP16 / BF16 · 53 GB256K
256 GB192 GBFP16 / BF16 · 53 GB256K
512 GB384 GBFP16 / BF16 · 53 GB256K

At Q4_K_M and an 8K context, Gemma 4 26B-A4B needs a Mac with at least 32 GB of unified memory; 8-bit needs 48 GB and full precision needs 96 GB. By default macOS lets the GPU use about two thirds of memory on Macs with 32 GB or less and about three quarters on larger ones; the table uses that limit. You can raise it with sudo sysctl iogpu.wired_limit_mb, leaving at least 8 GB for macOS.

Context

How much memory does Gemma 4 26B-A4B’s context use?

ContextKV cache, FP16KV cache, 8-bitTotal at Q4_K_M
8,1920.4 GB0.2 GB17 GB
32,7680.8 GB0.4 GB17 GB
131,0722.7 GB1.4 GB19 GB
262,1445.2 GB2.8 GB22 GB

Gemma 4 26B-A4B’s FP16 cache grows by about 20 MB for every 1,000 tokens once its windowed layers are full. At 8K tokens that is 0.4 GB, 2% of the total at Q4_K_M; at its full 262,144-token context it is 5.2 GB, 35% of the 15 GB of Q4_K_M weights. 25 of its 30 layers use a sliding window of 1,024 tokens, so their cache is full after 1,024 tokens; only the 5 full-attention layers keep growing. On a 24 GB card at Q4_K_M, the longest context is about 256K tokens with an FP16 cache, its full context.

Download

How big is the Gemma 4 26B-A4B download?

GGUF quantisationBits per weightApproximate size
FP16 / BF1616.0048 GB
Q8_0 (8-bit)8.5026 GB
Q6_K6.5620 GB
Q5_K_M5.7017 GB
Q4_K_M4.8915 GB
Q3_K_M4.0012 GB
Q2_K3.169.5 GB

A 25.8B-parameter model takes about 15 GB of disk at Q4_K_M and 48 GB as 16-bit weights, so the quantised file saves about 33 GB. Sizes are parameters × bits per weight; real GGUF files differ by a few per cent because some tensors stay at higher precision.

Offload

Can you run Gemma 4 26B-A4B with less VRAM by offloading to RAM?

GPU VRAMIn system RAMRAM to have
8 GB8.5 GB16 GB
16 GB0.5 GB16 GB

Yes: llama.cpp can keep part of Gemma 4 26B-A4B in system RAM and run it on the CPU, so the GPU and RAM together need about 17 GB at Q4_K_M and an 8K context. On an 8 GB card that leaves 8.5 GB in RAM. As a dense model, every token reads all 25.8B parameters, so each layer moved to RAM (fewer --n-gpu-layers) is limited by RAM bandwidth and generation slows as more of it leaves the GPU.

Compare

How does Gemma 4 26B-A4B compare with other Gemma models?

ModelParametersTypeQ4 at 8KSmallest GPUContext on 24 GB
Gemma 3 4B4.3BDense3.7 GB8 GB128K
Gemma 3 12B12.2BDense8.8 GB12 GB128K
Gemma 4 26B-A4B25.8BDense17 GB24 GB256K
Gemma 3 27B27.4BDense18 GB24 GB74K
Gemma 4 31B31.3BDense21 GB24 GB41K

Gemma 4 26B-A4B is number 3 by size of the 5 Gemma models we cover. The next smaller, Gemma 3 12B, needs about 8.8 GB at Q4 with an 8K context. The next larger, Gemma 3 27B, needs about 18 GB.

FAQ

Frequently asked questions

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

With an 8K context, about 17 GB at Q4_K_M, 28 GB at 8-bit (Q8_0) and 53 GB at full 16-bit precision. That covers the weights, the KV cache and runtime overhead.

Can Gemma 4 26B-A4B run on a 24 GB GPU like the RTX 4090?

Yes: the best quality that fits with an 8K context is Q6_K, at about 22 GB, and at that setting it has room for about 98K tokens. At Q4_K_M the context can reach 256K.

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

Yes: at Q4_K_M and an 8K context it fits a Mac with 32 GB of unified memory using macOS’s default GPU memory limit (about 21 GB for the GPU).

Can Gemma 4 26B-A4B run on 16, 12 or 8 GB?

Best quality with an 8K context: 16 GB: Q3_K_M at about 14 GB, with up to 119K tokens; 12 GB: Q2_K at about 11 GB, with up to 62K tokens; 8 GB: no (even Q2_K needs 11 GB).

How big is the Gemma 4 26B-A4B download?

About 15 GB for a Q4_K_M GGUF, 26 GB at Q8_0 and 48 GB for the 16-bit weights.

What is the longest context Gemma 4 26B-A4B can use on 24 GB?

About 256K tokens at Q4_K_M with an FP16 cache. Its maximum is 262,144 tokens.

Related

Try other settings in the VRAM calculator

Keep exploring