Overview

Gemma 4 on a Mac mini works when the model’s total memory is below the Mac’s installed unified memory: by the formulas on methodology, the 12B QAT build totals about 9.6 GB at 4096 context and fits a 16 GB Mac mini, the 26B A4B QAT build totals about 18.3 GB and needs 24 GB or more, and the 31B QAT build totals about 22.2 GB and is comfortable from 32 GB. The macOS reserve is unknown, so close fits are unconfirmed. Speed is unknown here and this site publishes no tokens-per-second figures; measure your own with measure-tokens-per-second-mac.

Which Gemma 4 sizes exist, and when were they released?

Google’s release notes list Gemma 4 in E2B, E4B, 31B and 26B A4B sizes on March 31, 2026, an MTP release for those four on April 16, 2026, and “Gemma 4 12B Unified” on June 3, 2026. Google’s Gemma 4 license page shows Apache License 2.0, and the 12B, 26B A4B and 31B cards each list apache-2.0.

ModelTotal parameters (card)Active / effectiveLayersContext
E2B5.1B with embeddings2.3B effective35128K
E4B8B with embeddings4.5B effective42128K
12B11.95Bnot listed48256K
26B A4B (MoE)25.2B3.8B active (8 of 128 experts, plus 1 shared)30256K
31B30.7Bnot listed60256K

Does a mixture-of-experts model need less RAM because only 3.8B is active?

No. Memory follows the total parameters, because every expert’s weights must be loaded even though only some run per token. The 26B A4B card lists 25.2B total and 3.8B active. The file sizes agree: the Ollama QAT tag for 26B A4B is 16GB, against 19GB for 31B and 7.2GB for 12B, so it is far closer to the 31B in size than to a 4B model. The active count may help speed, but how much is unknown here.

How much RAM does Gemma 4 12B, 26B A4B or 31B need on a Mac?

Use total_GB = weights_GB + kv_GB + 2 GB overhead from methodology, with the published file size standing in for weights. Pure arithmetic from the card’s parameters is weights_GB = params × bits / 8 / 1e9: at exactly 4.0 bits that is 5.975 GB for 12B (11.95B), 12.6 GB for 26B A4B (25.2B) and 15.35 GB for 31B (30.7B). Real files are larger because the 4.0-bit figure is not a measured bits-per-weight, so the table uses the Ollama QAT tag sizes from the tags page.

KV cache comes from each model’s config.json (12B, 26B A4B, 31B). These configs mix sliding-window layers (window 1024) and full-attention layers with a different head size, so this page uses:

kv_GB = 2 × (sliding_layers × kv_heads × head_dim × min(context, 1024) + full_layers × global_kv_heads × global_head_dim × context) × 2 bytes / 1e9

ModelSliding / full layerskv_heads, head_dimglobal_kv_heads, global_head_dim
12B40 / 88, 2561, 512
26B A4B25 / 58, 2562, 512
31B50 / 1016, 2564, 512

The configs also set attention_k_eq_v to true. This formula counts keys and values separately, so if a runtime shares them, the real KV cache is smaller; that is unknown here.

Model (QAT 4-bit, Ollama tag size)Context 4096Context 32768Context 262144
12B (7.2 GB)9.603 GB10.072 GB13.831 GB
26B A4B (16 GB)18.294 GB18.881 GB23.578 GB
31B (19 GB)22.174 GB24.523 GB43.314 GB

Each cell is file size plus KV plus 2 GB overhead. Ollama sizes are rounded as listed. The 31B QAT GGUF card lists 17.7 GB and the 12B QAT GGUF card lists 6.98 GB; why these differ from Ollama’s 7.2GB and 19GB is unknown (unit or packaging). E2B and E4B QAT tags are 4.3GB and 6.1GB on Ollama; their KV is not computed here because their configs were not read.

Does Gemma 4 12B fit a 16GB Mac mini?

Yes by this arithmetic: 9.603 GB at context 4096 and 13.831 GB at the full 262,144 context, both below 16 GB, with the reserve unknown. Apple’s Mac mini specs list the M6 at 16GB unified memory, configurable to 24GB or 32GB. The Ollama 12b-it-q8_0 tag is 13GB, so 8-bit plus 2 GB overhead is already 15 GB before KV: tight. Picks by tier are on best-llm-for-16gb-mac and mac-mini-llm.

What are the Gemma 4 26B A4B and 31B memory requirements?

Against installed memory at context 4096, before the reserve:

Mac memory12B QAT26B A4B QAT31B QAT
16 GBfitsdoes not fit (18.294)does not fit (22.174)
24 GBfitsfitstight (22.174; over at 32768)
32 GBfitsfitsfits (24.523 at 32768)
48 GBfitsfitsfits (43.314 at 262144)

The 31B at 262,144 context (43.314 GB) is over 32 GB. See best-llm-for-32gb-mac for the 32 GB tier and long-context-on-mac for context cost.

What is Gemma 4 QAT, and is it better than a normal 4-bit?

Google’s QAT cards describe the release as optimized with Quantization-Aware Training, “preserving similar quality to bfloat16 while dramatically reducing the memory requirements”. That is Google’s claim; the cards give no accuracy figures for the quantized files, so the quality gap against Q4_K_M is unknown. On size, Ollama lists 12B at 7.2GB (QAT) vs 8.0GB (q4_K_M), 26B A4B 16GB vs 18GB, and 31B 19GB vs 20GB.

Gemma 4 MLX vs GGUF: which should you pull?

Ollama lists both for each size. Sizes: 12B 12b-mlx 7.7GB (GGUF q4_K_M 8.0GB); 26B 26b-mlx 18GB (q4_K_M 18GB); 31B 31b-mlx 19GB (q4_K_M 20GB); bf16 and 8-bit variants are far larger (31B bf16 63GB, q8_0 34GB). Which is faster on a given Mac is unknown here; no primary source read gives a Gemma 4 comparison. Format background is on mlx-vs-gguf and mlx-quantization; test with measure-tokens-per-second-mac.

Is Mac unified memory the same as VRAM for Gemma 4?

On a Mac the GPU uses the same unified memory as the CPU, so the totals above are compared with installed memory, not a separate VRAM pool (unified-memory-vs-vram). The discrete-GPU view is on the sister site: LLM VRAM requirements.

Questions

Can a Mac mini run Gemma 4?

Yes if the model total is below its memory. A 16GB M6 Mac mini (Apple spec page) is above the 12B QAT total of 9.603 GB at context 4096; 26B A4B (18.294 GB) needs the 24GB option or more. The macOS reserve is unknown.

Does Gemma 4 12B run on a 16GB Mac mini?

By the arithmetic above, yes: 9.603 GB at context 4096 and 13.831 GB at 262,144, using the 7.2GB Ollama QAT tag. The 8-bit tag (13GB) is tight. Real headroom is unknown.

What are the Gemma 4 26B A4B RAM requirements?

The QAT tag is 16GB on Ollama, so the total is 18.294 GB at context 4096 and 23.578 GB at 262,144. Only 3.8B parameters are active per token, but all 25.2B must be loaded, so it needs a 24GB Mac or larger.

What are the Gemma 4 31B requirements on a Mac?

Using the 19GB Ollama QAT tag, 22.174 GB at context 4096, 24.523 GB at 32768 and 43.314 GB at 262,144. That is comfortable at 32GB for normal contexts and at 48GB for the full window; the reserve is unknown.

Is Gemma 4 faster in MLX or GGUF on a Mac?

Unknown. This site cites no measured Gemma 4 speed figure. File sizes are similar across the two formats; see mlx-vs-gguf and measure on your own Mac.

Does Gemma 4 QAT need less RAM?

Slightly less than Q4_K_M by Ollama sizes: 7.2GB vs 8.0GB (12B), 16GB vs 18GB (26B A4B), 19GB vs 20GB (31B). Google says QAT preserves similar quality to bfloat16; no figure is given.

Why does Gemma 4 fail to load in LM Studio?

The cause is unknown without the error text; no LM Studio source was read for this page. Check first that the model total in the table above is under your installed memory, then see lm-studio-on-mac.

Is Gemma 4 free to use?

The 12B, 26B A4B and 31B cards list Apache 2.0, and Google’s Gemma 4 license page shows Apache License 2.0.

Sources read on 2026-10-13