Run Gemma 4 26B-A4B on M5 Max

Gemma 4 26B-A4B runs at 107 tok/s on an M5 Max, a published figure reported by huggingface.co (llama.cpp, Q4_K_M, 4K-token input). It needs about 18 GB of unified memory. It is Google's 26B mixture-of-experts model (3.8B active), released under the Apache 2.0 licence.

Speed
sourced107
tok/s
First Token
—
seconds
RAM Needed
18
GB minimum
Engine
llama.cpp
of this figure
Want to run Gemma 4 26B-A4B faster — or step up to bigger models? Find your Mac →

The figure

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

MetricValue
Tokens per secondsourced107 tok/s
Provenancepublished figure · huggingface.co
QuantizationQ4_K_M
Enginellama.cpp
Context4K-token input
Figure dated2026-10-13
Minimum RAM18 GB
Parameters26B MoE (3.8B active)
Chip bandwidth614 GB/s

Every figure for Gemma 4 26B-A4B on the M5 Max

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 (18 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
community120.6 tok/sQATMLX128 GB1komlx.ai40-core GPU. oMLX v0.7.2, MTP/DFlash off; gemma-4-26B-A4B-it-QAT-MLX-4bit; 14.3 GB peak. 110.6 tok/s at 4k.
sourced107 tok/sQ4_K_Mllama.cpp—4K-token inputhuggingface.coCompetitor baseline on Liquid AI's LFM2.5-24B-A2B card (Pipette, llama.cpp).
Provenance key
sourced
Published figure — vendor or press review
estimated
community
Linked individual run — blog, forum or submission

Speed by context depth: Gemma 4 26B-A4B on the M5 Max

Measured figures only, each from its source’s own session; the index does not estimate long-context or prefill speed, so a missing cell is —. Each @ column is plain decode with that many tokens already in the prompt, from the same session as the row’s short-context figure: decode slows as the KV cache it reads grows. Prefill is prompt processing, the tokens per second a runtime reads a prompt at; with long agent contexts it sets how long you wait before the first token.

RunDecode (row)@4KPrefillTTFT
MLX · QAT · 128 GB Mac · omlx.aicommunity120.6 tok/s
1k
community110.6 tok/scommunity3852 tok/s
at 4K
community0.305 s

Setup: run Gemma 4 26B-A4B 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-11-14:

ollama run gemma4:26b-a4b

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: Ollama page → · Hugging Face model card →

The 107 tok/s figure above came from llama.cpp at Q4_K_M; 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 26B-A4B on other Apple Silicon chips

ChipSpeedQuantEngineBandwidth
M3 Ultraestimated121 tok/sQ4_K_M—819 GB/s
M1 Ultraestimated120 tok/sQ4_K_MOllama800 GB/s
M4 Maxestimated101 tok/sQ4_K_MMLX546 GB/s
M5 Proestimated78 tok/sQ4_K_MOllama307 GB/s
M4 Proestimated72 tok/sQ4_K_MOllama273 GB/s
M6community49 tok/sQATMLX170 GB/s

For the estimated figures here, the bandwidth formula’s typical error for small MoEs (≤40B total) is ±16%, against 99 measured runs of 17 models (how it is computed).

About Gemma 4 26B-A4B

Google's Apache 2.0 multimodal MoE: 26B total with 3.8B active (128 experts), 256K context. It fits a 24 GB Mac at 4-bit; Liquid AI's published baseline lists 107 tok/s on an M5 Max (llama.cpp Q4_K_M), and community runs measured 48–52 tok/s on a 32 GB Mac mini M6.

Apache 2.0 licence · 26B MoE · 256K context · LLMCheck capability 35/50 · see its leaderboard rank →

Memory by context length

Estimated, not measured: the index’s minimum for Gemma 4 26B-A4B (18 GB — the weights at the quant that fits, plus ~2 GB) plus the KV cache for that many tokens, computed from its config.json. 5 full layers (2 kv heads x 512) + 25 sliding layers (8 x 256, window 1024); attention_k_eq_v: K and V counted separately (a runtime that stores the shared tensor once needs half). 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 M5 Max 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).

ContextKV cache (16-bit)RAM neededRAM, q8 KVSmallest tier that fitsWithin the default GPU limit
8K~0.4 GB~18.1 GB~18.0 GB24 GB Mac raise GPU limit32 GB Mac
32K~0.9 GB~18.6 GB~18.3 GB24 GB Mac raise GPU limit32 GB Mac
64K (coding-agent context)~1.6 GB~19.3 GB~18.6 GB24 GB Mac raise GPU limit32 GB Mac
128K~2.9 GB~20.6 GB~19.3 GB32 GB Macsame

System requirements

Macs with the M5 Max

🛒 Get a Mac that runs Gemma 4 26B-A4B

Gemma 4 26B-A4B needs about 18 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.

Compare More Models

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

Open Compare Tool Full Leaderboard