Yes: Gemma 4 31B runs on 43 of the 54 Macs in the LLMCheck index. It needs about 24 GB at a 4K context, 30 GB at 64K. Smallest current Mac: Mac mini M6 24 GB (raised GPU limit); cheapest at 15+ tok/s: Mac Studio M5 Max 36 GB, $2,499. Best measured figure: 31 tok/s on an M5 Ultra (community).
One row per Mac configuration, grouped by product line. The build is the one each speed is for; the context column is the longest prompt that fits inside macOS’s default GPU memory limit with a 16-bit KV cache (“raised” where the limit has to be raised first; “full” when the whole window fits). Speeds are decode tok/s from the LLMCheck index, each with its provenance mark. For dense models, the formula’s typical error is about 9% (the median gap to 75 measured plain-decode runs; it tends to undershoot (median −6%), and an estimate scaled from the model’s own measured run is usually closer; method).
| Mac | Verdict | Build | Speed | Max context | Model page |
|---|---|---|---|---|---|
| MacBook Air | |||||
| MacBook Air M5 16 GB | Doesn't fit | — | — | — | — |
| MacBook Air M5 24 GB | Raise GPU limit command ↓ | Q4_K_M | estimated7 tok/s | — | — |
| MacBook Air M5 32 GB | Runs, slowly | Q4_K_M | estimated7 tok/s | 15K | — |
| MacBook Air M1 8 GB refurb | Doesn't fit | — | — | — | — |
| MacBook Air M4 16 GB used | Doesn't fit | — | — | — | — |
| MacBook Air M2 16 GB refurb | Doesn't fit | — | — | — | — |
| MacBook Air M3 16 GB refurb | Doesn't fit | — | — | — | — |
| MacBook Air M1 16 GB refurb | Doesn't fit | — | — | — | — |
| MacBook Air M4 24 GB used | Raise GPU limit command ↓ | Q4_K_M | estimated6 tok/s | — | — |
| MacBook Air M2 24 GB refurb | Raise GPU limit command ↓ | Q4_K_M | estimated5 tok/s | — | — |
| MacBook Air M3 24 GB refurb | Raise GPU limit command ↓ | Q4_K_M | estimated5 tok/s | — | — |
| MacBook Pro | |||||
| MacBook Pro M6 16 GB | Doesn't fit | — | — | — | — |
| MacBook Pro M5 Pro 24 GB | Raise GPU limit command ↓ | Q4_K_M | estimated13 tok/s | — | — |
| MacBook Pro M6 24 GB | Raise GPU limit command ↓ | QAT | community8 tok/s | — | M6 page |
| MacBook Pro M6 32 GB | Runs, slowly | QAT | community8 tok/s | 15K | M6 page |
| MacBook Pro M5 Pro 48 GB | Runs, slowly | Q4_K_M | estimated13 tok/s | 164K | — |
| MacBook Pro M5 Max 64 GB | Runs | 4-bit | community26 tok/s | 256K (full) | M5 Max page |
| MacBook Pro M5 Pro 64 GB | Runs, slowly | Q4_K_M | estimated13 tok/s | 256K (full) | — |
| MacBook Pro M5 Max 128 GB | Runs | 4-bit | community26 tok/s | 256K (full) | M5 Max page |
| MacBook Pro M3 Max 64 GB refurb | Runs | Q4_K_M | estimated17 tok/s | 256K (full) | — |
| MacBook Pro M3 Max 128 GB refurb | Runs | Q4_K_M | estimated17 tok/s | 256K (full) | — |
| Mac mini | |||||
| Mac mini M6 16 GB | Doesn't fit | — | — | — | — |
| Mac mini M5 Pro 24 GB | Raise GPU limit command ↓ | Q4_K_M | estimated13 tok/s | — | — |
| Mac mini M6 24 GB | Raise GPU limit command ↓ | QAT | community8 tok/s | — | M6 page |
| Mac mini M6 32 GB | Runs, slowly | QAT | community8 tok/s | 15K | M6 page |
| Mac mini M5 Pro 48 GB | Runs, slowly | Q4_K_M | estimated13 tok/s | 164K | — |
| Mac mini M5 Pro 64 GB | Runs, slowly | Q4_K_M | estimated13 tok/s | 256K (full) | — |
| Mac mini M2 Pro 16 GB refurb | Doesn't fit | — | — | — | — |
| Mac mini M4 16 GB used | Doesn't fit | — | — | — | — |
| Mac mini M4 Pro 24 GB used | Raise GPU limit command ↓ | Q4_K_M | estimated12 tok/s | — | M4 Pro page |
| Mac mini M4 24 GB used | Raise GPU limit command ↓ | Q4_K_M | estimated6 tok/s | — | — |
| Mac mini M2 Pro 32 GB refurb | Raise GPU limit (macOS 15) command ↓ | Q4_K_M | estimated9 tok/s | — | |
| Mac mini M4 Pro 48 GB used | Runs, slowly | Q4_K_M | estimated12 tok/s | 147K | M4 Pro page |
| Mac mini M4 Pro 64 GB used | Runs, slowly | Q4_K_M | estimated12 tok/s | 256K (full) | M4 Pro page |
| iMac | |||||
| iMac M6 16 GB | Doesn't fit | — | — | — | — |
| iMac M6 24 GB | Raise GPU limit command ↓ | QAT | community8 tok/s | — | M6 page |
| iMac M6 32 GB | Runs, slowly | QAT | community8 tok/s | 15K | M6 page |
| Mac Studio | |||||
| Mac Studio M5 Max 36 GB | Runs | Q4_K_M | estimated19 tok/s | 52K | M5 Max page |
| Mac Studio M5 Max 48 GB | Runs | 4-bit | community26 tok/s | 164K | M5 Max page |
| Mac Studio M5 Max 64 GB | Runs | 4-bit | community26 tok/s | 256K (full) | M5 Max page |
| Mac Studio M5 Ultra 96 GB | Runs | QAT | community31 tok/s | 256K (full) | M5 Ultra page |
| Mac Studio M5 Max 128 GB | Runs | 4-bit | community26 tok/s | 256K (full) | M5 Max page |
| Mac Studio M5 Ultra 256 GB | Runs | QAT | community31 tok/s | 256K (full) | M5 Ultra page |
| Mac Studio M5 Ultra 512 GB | Runs | QAT | community31 tok/s | 256K (full) | M5 Ultra page |
| Mac Studio M2 Max 32 GB refurb | Raise GPU limit (macOS 15) command ↓ | Q4_K_M | estimated17 tok/s | — | |
| Mac Studio M1 Ultra 64 GB refurb | Runs | Q4_K_M | estimated31 tok/s | 256K (full) | — |
| Mac Studio M4 Max 64 GB used | Runs | Q4_K_M | estimated23 tok/s | 256K (full) | — |
| Mac Studio M2 Max 64 GB refurb | Runs | Q4_K_M | estimated17 tok/s | 256K (full) | — |
| Mac Studio M1 Ultra 128 GB refurb | Runs | Q4_K_M | estimated31 tok/s | 256K (full) | — |
| Mac Studio M2 Ultra 128 GB refurb | Runs | Q4_K_M | estimated31 tok/s | 256K (full) | — |
| Mac Studio M4 Max 128 GB used | Runs | Q4_K_M | estimated23 tok/s | 256K (full) | — |
| Mac Studio M2 Ultra 192 GB refurb | Runs | Q4_K_M | estimated31 tok/s | 256K (full) | — |
| Mac Studio M3 Ultra 256 GB used | Runs | Q4_K_M | estimated31 tok/s | 256K (full) | — |
| Mac Studio M3 Ultra 512 GB refurb | Runs | Q4_K_M | estimated31 tok/s | 256K (full) | — |
Context memory is computed from its config.json (10 full layers (4 kv heads x 512) + 50 sliding layers (16 x 256, window 1024); attention_k_eq_v applies to the 10 full layers only, and K and V are both still cached there, so both are counted; check: mlx_lm.benchmark peak memory grew 3.55 GB from 16K to 32K (BF16, M5 Ultra, NetworkChuck engine.json), 2.6x this figure, so MLX holds more than the KV here (attention temporaries or layout)): about 6.2 GB of 16-bit KV cache at 64K tokens. A q8 cache (llama.cpp -ctk q8_0 -ctv q8_0, Ollama OLLAMA_KV_CACHE_TYPE=q8_0) halves that part. Runtimes also grow a compute buffer with context, so a fit within about 1 GB of the limit is optimistic.
macOS lets the GPU wire only part of unified memory by default (Metal’s recommended working set; M5 and M6
Macs run macOS 26 or later, whose default is higher), and Gemma 4 31B needs about 24 GB. On the Macs marked
Raise GPU limit it fits in RAM but not inside that default. The default
is a performance threshold, not a hard wall: past it, the runtime moves part of it to the CPU or shortens the context (llama.cpp, Ollama), runs it slowly (MLX), or stops with an out-of-memory error. One command raises the limit until the next restart
(sudo sysctl iogpu.wired_limit_mb=0 restores the default sooner); it leaves macOS a reserve, and other
apps get less memory while the model is loaded.
sudo sysctl iogpu.wired_limit_mb=20480sudo sysctl iogpu.wired_limit_mb=20480sudo sysctl iogpu.wired_limit_mb=28672Weights are 31B parameters at each format’s effective size (the index’s GB-per-billion table), plus about 2 GB for the runtime and a short context; longer contexts add the KV cache computed from the model’s config.json at 16 bits. The first row is the catalog’s own figure (about 24 GB at a 4K context), the one every verdict on this page uses. “Smallest Mac” is the smallest memory size among the Macs Apple sells new that holds it at a 4K context inside that Mac’s default GPU limit. Estimates, not measurements.
| Build | Weights | RAM at 4K | at 32K | at 64K | Smallest Mac |
|---|---|---|---|---|---|
| As catalogued | — | 24 GB | 26 GB | 29 GB | 32 GB |
| Q2_K | 10.5 GB | 13 GB | 15 GB | 18 GB | 24 GB |
| Q3_K_M | 15.2 GB | 17 GB | 20 GB | 22 GB | 24 GB |
| Q4_K_M | 17.7 GB | 20 GB | 22 GB | 25 GB | 32 GB |
| Q5_K_M | 22.0 GB | 24 GB | 26 GB | 29 GB | 32 GB |
| Q6_K | 25.4 GB | 27 GB | 30 GB | 32 GB | 36 GB |
| Q8_0 | 32.9 GB | 35 GB | 37 GB | 40 GB | 48 GB |
| F16 | 62.0 GB | 64 GB | 66 GB | 69 GB | 96 GB |
Every published (filled square) and community (hollow circle) run the index holds for Gemma 4 31B: 0 published, 3 community, each linked to its source. LLMCheck runs no tests of its own. One row is one measurement session; on each chip the table above shows the lower median of the eligible runs (plain decode at 5 bits or fewer), and a binned or “not an anchor” run is shown but never used as a reference.
| Chip | Runtime | Quant | Decode | Context | Date | Source |
|---|---|---|---|---|---|---|
| M5 Ultra | MLX | QAT | community31 tok/s | 512-token random prompt, 128 generated, empty context, mean of 2 | 2026-10-15 | bohemiansilicon.com |
| M5 Max | MLX | 4-bit | community26.2 tok/s | 1k | 2026-11-12 | omlx.ai |
| M6 | LM Studio | QAT | community8 tok/s | — | 2026-10 | github.com |
The quickest start is Ollama. Pull the model by its tag (checked on ollama.com, 2026-11-14; the file is about 20 GB):
Prefer a window to a terminal? LM Studio downloads the same model with one click. · model card →
On the Mac mini M6 (32 GB), the smallest current Mac that runs it inside the default GPU limit, the index figure is 8 tok/s (community run) at QAT; keep the context at or under 15K there, or use a q8 KV cache. The gemma4:31b file fits there.
Step-by-step: the Ollama install guide.
Mac mini M6 (24 GB) — smallest current Mac that runs it, $1,099 new (Apple list price, checked 2026-11-14), 8 tok/s (community run) once the GPU memory limit is raised. Mac Studio M5 Max (36 GB) — cheapest at 15+ tok/s, $2,499 new (Apple list price, checked 2026-11-14), ~19 tok/s (estimated).
As an Amazon Associate, LLMCheck earns from qualifying purchases. Affiliate links cost you nothing extra and never influence the verdicts.
Yes. Gemma 4 31B needs about 24 GB of unified memory at a short (4K-token) context, so it runs on 43 of the 54 Mac configurations in the LLMCheck index; 30 of them hold it inside macOS’s default GPU memory limit and 13 only after raising that limit. The smallest Mac Apple sells new that runs it is the Mac mini M6 (24 GB).
About 24 GB at a 4K context: the weights plus about 2 GB for the runtime. Context adds KV cache: about 27 GB in total at 32K and 30 GB at 64K with the default 16-bit cache (about 27 GB at 64K with a q8 cache). These are estimates from the model’s config.json, not measurements.
On an M5 Max, the chip the leaderboard quotes it on, the index figure is 26 tok/s (community run) at 4-bit. The best measured figure is 31 tok/s on an M5 Ultra 256 GB (community run, QAT). Every Mac’s figure is in the table on this page with its provenance: published, community run or estimated.
Among Macs Apple sells new, the Mac Studio M5 Max (36 GB), $2,499 new (Apple list price, checked 2026-11-14), is the cheapest that reaches 15 tok/s with Gemma 4 31B, at ~19 tok/s (estimated).
On 13 of the 54 configurations, yes: iMac M6 24 GB, Mac mini M5 Pro 24 GB, Mac mini M6 24 GB and 10 more. macOS lets the GPU use only part of unified memory by default (about 18 GB on the iMac M6 (24 GB)), and Gemma 4 31B needs about 24 GB. Running sudo sysctl iogpu.wired_limit_mb=20480 in Terminal raises the limit on a 24 GB Mac until the next restart. From 32 GB up, every Mac Apple sells new holds it inside the default limit.
Q4_K_M (about 18 GB of weights) is the common 4-bit GGUF choice. Q8_0 (about 33 GB) is closer to full quality and needs a 48 GB Mac at the default GPU limit. Q3_K_M and Q2_K shrink it to about 15 and 11 GB at a quality cost. The index’s reference figure (26 tok/s on an M5 Max) is for its 4-bit build.
Its own window is 256K tokens. At macOS’s default GPU limit, the Mac mini M6 (32 GB) holds about 15K. The full window needs about 46 GB, which a 64 GB Mac holds at the default limit. A q8 KV cache roughly doubles these lengths.
LLMCheck. (2026). Can I run Gemma 4 31B on a Mac? llmcheck.net. https://llmcheck.net/can-i-run/gemma-4-31b/ (updated ). CC BY 4.0.