Gemma 4 31B runs at 8 tok/s on a 32 GB M6, a community run reported by github.com (LM Studio, QAT). It needs about 24 GB of unified memory. It is Google's 31B dense model, released under the Apache 2.0 licence.
Want to run Gemma 4 31B faster — or step up to bigger models? Find your Mac →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.
| Metric | Value |
|---|---|
| Tokens per second | community8 tok/s |
| Provenance | community run · github.com |
| Quantization | QAT |
| Engine | LM Studio |
| Figure dated | 2026-10 |
| Minimum RAM | 24 GB |
| Parameters | 31B |
| Chip bandwidth | 170 GB/s |
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.
| Speed | Quant | Engine | Mac RAM | Context | Source | Note |
|---|---|---|---|---|---|---|
| community8 tok/s | QAT | LM Studio | 32 GB | — | github.com | — |
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-11-14:
MLX — pick a build from Hugging Face’s MLX listings, then run it with its repo id:
Downloads: Ollama page → · Hugging Face model card →
The 8 tok/s figure above came from LM Studio 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.
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 →
Estimated, not measured: the index’s minimum for Gemma 4 31B (24 GB — the weights at the quant that fits, plus ~2 GB) plus the KV cache for that many tokens, 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). A 16-bit KV cache is the default in llama.cpp, Ollama, LM Studio and mlx-lm; a q8 cache halves the KV part. Coding agents hold 64K tokens or more. Runtimes also add a buffer that grows with context, so leave a few GB spare. macOS lets the GPU use only part of a Mac’s memory by default (figures for an M6 Mac, which runs macOS 26 or later): “fits” means within the GPU memory a Mac of that tier can use with the limit raised, a tier tagged raise GPU limit fits only after sudo sysctl iogpu.wired_limit_mb raises it (the tooltip has the exact command), and the last column is the smallest Mac memory size whose default limit holds it (the GPU memory limit).
| Context | KV cache (16-bit) | RAM needed | RAM, q8 KV | Smallest tier that fits | Within the default GPU limit |
|---|---|---|---|---|---|
| 8K | ~1.5 GB | ~24.3 GB | ~24.2 GB | 32 GB Mac | |
| 32K | ~3.5 GB | ~26.3 GB | ~25.2 GB | 32 GB Mac raise GPU limit | 36 GB Mac |
| 64K (coding-agent context) | ~6.2 GB | ~29.0 GB | ~26.5 GB | 64 GB Mac | 48 GB Mac |
| 128K | ~11.6 GB | ~34.4 GB | ~29.2 GB | 64 GB Mac | 48 GB Mac |
Gemma 4 31B needs about 24 GB of unified memory. These Apple Silicon Macs have enough to run it. Apple builds the higher-memory configurations to order; Amazon does not stock them.
As an Amazon Associate, LLMCheck earns from qualifying purchases. These affiliate links cost you nothing extra and help keep the LLMCheck index free.
See how Gemma 4 31B stacks up against other models on your specific Mac hardware.
Open Compare Tool Full Leaderboard