Can I run it?
Can I run gemma 4 31B it on Apple M1 Max?
Tight fit
Tight fit fully in unified memory on your Apple M1 Max at UD-Q5_K_XL, 8K context, about 7.3–10 tok/s. Weights 20.4 GB plus 2.03 GB of KV cache — 22.9 GB of 24.0 GB usable.
Best quantUD-Q5_K_XL
Working context8K
Max that fits8K
Speed7.3–10 tok/sEstimate from memory bandwidth, not a benchmark. Method.
Weights20.4 GB
KV cache2.03 GB
Total22.9 GB
Usable24.0 GB
gemma 4 31B it details · Apple M1 Max page · How this estimate is made
Run commands
llama.cpp
llama-server -hf unsloth/gemma-4-31B-it-GGUF:UD-Q5_K_XL -c 8192 -ngl 60
Ollama
ollama run gemma
LM Studio
lms get unsloth/gemma-4-31B-it-GGUF # Then load quant UD-Q5_K_XL
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%.
- UD-Q5_K_XL 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 8K context, not at the maximum context that still fits.
Larger models that also fit
- Can I run Qwen3.6 35B A3B on Apple M1 Max? — Tight fit, UD-Q4_K_XL, 24–32 tok/s (estimate)
- Can I run Qwen3.8 35B A3B Distill on Apple M1 Max? — Tight fit, Q4_K_M, 24–33 tok/s (estimate)
- Can I run Qwen3.5 35B A3B on Apple M1 Max? — Tight fit, UD-Q4_K_XL, 24–33 tok/s (estimate)
Updated 2026-10-24. Profile on this page is the device default.