Run Gemma 4 31B on M5 Ultra

Gemma 4 31B runs at 31 tok/s on a 256 GB M5 Ultra, a community run reported by bohemiansilicon.com (MLX, QAT, 512-token random prompt, 128 generated, empty context, mean of 2). It needs about 24 GB of unified memory. It is Google's 31B dense model, released under the Apache 2.0 licence.

Speed
community31
tok/s
First Token
—
seconds
RAM Needed
24
GB minimum
Engine
MLX
of this figure
Want to run Gemma 4 31B faster — or step up to bigger models? Find your Mac →

The figure

This is a community run: a real run, reported by its source and linked below. The index records it as given and never adjusts it.

MetricValue
Tokens per secondcommunity31 tok/s
Provenancecommunity run · bohemiansilicon.com
QuantizationQAT
EngineMLX
Context512-token random prompt, 128 generated, empty context, mean of 2
Figure dated2026-10-15
Minimum RAM24 GB
Parameters31B
Chip bandwidth1228 GB/s

Every figure for Gemma 4 31B on the M5 Ultra

Each row as the index holds it, with its source. “Mac RAM” is the memory of the Mac a run used, not the model’s requirement (24 GB). The headline figure follows the reference rule: the lower-median measured plain-decode run at 5 bits or fewer (a run whose quant was not stated counts only when no stated-quant run qualifies), else the estimate; a run marked “not used to anchor estimates” is listed here but never becomes the headline.

SpeedQuantEngineMac RAMContextSourceNote
community31 tok/sQATMLX256 GB512-token random prompt, 128 generated, empty context, mean of 2bohemiansilicon.comMac Studio, mlx-lm 0.32 on macOS 27.0.1, mlx-community QAT 4-bit build. 27 tok/s at 8K and 21 at 32K. Published by Bohemian Silicon, which rents out this Mac.
Provenance key
sourced
Published figure — vendor or press review
estimated
community
Linked individual run — blog, forum or submission

Setup: run Gemma 4 31B on a Mac

Ollama — install it (brew install ollama or the app from ollama.com), then pull the model by its tag, checked on ollama.com on 2026-10-24:

ollama run gemma4:31b

MLX — pick a build from Hugging Face’s MLX listings, then run it with its repo id:

pip install -U mlx-lm
mlx_lm.generate --model <repo-id> --prompt "Hello"

Downloads: Search the Ollama library → · model card →

The 31 tok/s figure above came from MLX at QAT; other runtimes and quants run at different speeds.

Prefer a GUI? LM Studio downloads GGUF and MLX builds in one click. Step by step: install Ollama on a Mac.

Gemma 4 31B on other Apple Silicon chips

ChipSpeedQuantEngineBandwidth
M5 Maxestimated26 tok/sQ4_K_MMLX614 GB/s
M4 Maxestimated23 tok/sQ4_K_MMLX546 GB/s
M4 Proestimated12 tok/sQ4_K_MOllama273 GB/s
M6community8 tok/sQATLM Studio170 GB/s

About Gemma 4 31B

Google's dense 31B Gemma 4 with 256K context, Apache 2.0. Needs a 24 GB+ Mac at 4-bit; a community run measured ~8 tok/s on a 32 GB Mac mini M6 (QAT).

Apache 2.0 licence · 31B · 256K context · LLMCheck capability 40/50 · see its leaderboard rank →

System requirements

Macs with the M5 Ultra

🛒 Get a Mac that runs Gemma 4 31B

Gemma 4 31B needs about 24 GB of unified memory. These current Apple Silicon Macs have the headroom to run it comfortably:

As an Amazon Associate, LLMCheck earns from qualifying purchases. These affiliate links cost you nothing extra and help keep the LLMCheck index free.

Compare More Models

See how Gemma 4 31B stacks up against other models on your specific Mac hardware.

Open Compare Tool Full Leaderboard