Can I run it?
Can I run gemma 4 31B it on Apple M5 Pro?
Tight fit
Tight fit fully in unified memory on your Apple M5 Pro at IQ4_XS, 4K context, about 8.3–11 tok/s. Weights 15.2 GB plus 1.41 GB of KV cache — 17.1 GB of 18.0 GB usable.
Best quantIQ4_XS
Working context4K
Max that fits4K
Speed8.3–11 tok/sEstimate from memory bandwidth, not a benchmark. Method.
Weights15.2 GB
KV cache1.41 GB
Total17.1 GB
Usable18.0 GB
gemma 4 31B it details · Apple M5 Pro page · How this estimate is made
Run commands
llama.cpp
llama-server -hf unsloth/gemma-4-31B-it-GGUF:IQ4_XS -c 4096 -ngl 60
Ollama
ollama run gemma
LM Studio
lms get unsloth/gemma-4-31B-it-GGUF # Then load quant IQ4_XS
Assumptions
- Estimate from memory bandwidth, not a benchmark. Decode speed uses 55–75% of peak bandwidth.
- KV cache is FP16. Engine overhead assumes llama.cpp (0.3 GB + 1% of the weights). Ollama is closer to 0.9 GB + 3%, LM Studio closer to 1 GB + 3%.
- IQ4_XS size is the real GGUF file size from Hugging Face.
- Unified memory uses 75% for the GPU by default, and always leaves about 5 GB for the OS.
- Speed is quoted at 4K context, not at the maximum context that still fits.
Larger models that also fit
- Can I run Qwen3.6 35B A3B on Apple M5 Pro? — Tight fit, UD-IQ4_XS, 23–31 tok/s (estimate)
- Can I run Qwen3.8 35B A3B Distill on Apple M5 Pro? — Tight fit, Q3_K_M, 23–31 tok/s (estimate)
- Can I run Qwen3.5 35B A3B on Apple M5 Pro? — Tight fit, UD-IQ4_XS, 23–32 tok/s (estimate)
Updated 2026-10-24. Profile on this page is the device default.