Can I Run Gemma 4 31B on Apple M4?

Autor: Jakub Rusinowski · Ostatnia aktualizacja: 12 lipca 2026

Yes. Gemma 4 31B needs 21.3 GB at 8K context (18.7 GB weights + 2.6 GB KV cache/overhead) at Q4_K_M and the Apple M4 has 24 GB usable, leaving about 2.7 GB of headroom, at roughly 3 tok/s (estimated) with room for up to 16K of context.

See what else this hardware can run →

The numbers

ModelGemma 4 31B
Parameters31B
QuantizationQ4_K_M
VRAM needed (8K context)21.3 GB
Apple M4 usable memory24 GB
VerdictRuns
Max context16K
Estimated speed~3 tok/s

Gemma 4 31B on the Apple M4: VRAM by quantization

QuantVRAM neededFits 32 GB?Max contextWhole PC
F1664.6 GB✗ No——
Q8_035.5 GB✗ No—Build for this
Q6_K28 GB✗ No——
Q5_K_M24.6 GB✗ No—Build for this
Q4_K_M21.3 GB✓ Yes16KBuild for this
Q3_K_M15.8 GB✓ Yes32K—
Q2_K12.8 GB✓ Yes32K—

Assumes an 8K-token context with an f16 KV cache, on an estimated architecture — this model publishes no config we can read. A longer window needs more; a quantized KV cache needs less. “Max context” is the largest window that still fits in 32 GB of unified memory. Figures are estimates from parameter count, quantization and memory bandwidth — the analyzer lets you tune KV-cache quant and context.

Context costs VRAM too. At Q4_K_M on the Apple M4: 8K 21.3 GB · 32K 26.8 GB ✗ · 128K 48.5 GB ✗. Past 32K it no longer fits 32 GB — a q8_0 KV cache buys roughly half of that back, which the calculator will price for you.

What to do next

Nothing to change — run it at Q4_K_M. If you want more capability, check whether the next size up also fits.

No compatible GPU? Gemma 4 31B on 32 GB of system RAM, CPU only: runs comfortably.

Ujawnienie afiliacyjne: Niektóre odnośniki na tej stronie to linki afiliacyjne — jeśli dokonasz zakupu za ich pośrednictwem, LLM Configurator może otrzymać prowizję bez dodatkowych kosztów dla Ciebie. Jako uczestnik programu Amazon Associates, LLM Configurator zarabia na kwalifikujących się zakupach.

Running Gemma 4 31B on this card:

Apple Mac mini M4 (16GB)
16 GB unified memory · 120 GB/s
Ceny w 2026 są niestabilne — sprawdź aktualną ofertę.
Sprawdź cenę na Amazon

Won't fit — rent Gemma 4 31B instead

Gemma 4 31B needs ~21 GB but this GPU has 32 GB. Rent a RTX 4090 (24 GB)-class GPU by the hour instead of buying one:

Affiliate links — we may earn a commission if you sign up, at no extra cost to you.

RunPod $0.34/hr
Rent on RunPod →
Vast.ai $0.35/hr · typical low · varies
Rent on Vast.ai →

Cloud rates verified 2026-07 — estimates, and marketplace prices vary. Buying price is GPU MSRP only, not a full PC.

Other Gemma 4 sizes on the Apple M4

Gemma 4 31B on nearby hardware

All Gemma 4 sizes on the Apple M4 | Gemma 4 31B model page | Apple M4 GPU page | VRAM calculator | Check your hardware