Run Gemma 4 E4B on M5 Pro

Gemma 4 E4B runs at 62 tok/s (62.15 as recorded) on an M5 Pro, a published figure reported by huggingface.co (llama.cpp, Q4_K_M, decode at 4K context depth). It needs about 6 GB of unified memory. It is Google's 4B dense model, released under the Apache 2.0 licence.

Speed
sourced62
tok/s
First Token
—
seconds
RAM Needed
6
GB minimum
Engine
llama.cpp
of this figure
Want to run Gemma 4 E4B 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 secondsourced62 tok/s
Provenancepublished figure · huggingface.co
QuantizationQ4_K_M
Enginellama.cpp
Prompt processing (prefill)sourced1700 tok/s at 4K context
Contextdecode at 4K context depth
Figure dated2026-10-21
Minimum RAM6 GB
Parameters4B
Chip bandwidth307 GB/s

Every figure for Gemma 4 E4B on the M5 Pro

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 (6 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
sourced62.15 tok/sQ4_K_Mllama.cpp—decode at 4K context depthhuggingface.coCompetitor baseline on SparkLLM's Spark-X2.6-4B card chart 'Mac M5 Pro · 16-core' (the 16-core-GPU M5 Pro has the same 307 GB/s); llama.cpp build not stated.
estimated91 tok/sQ4_K_MOllama24 GB—LLMCheck estimator—
Provenance key
sourced
Published figure — vendor or press review
estimated
community
Linked individual run — blog, forum or submission

Speed by context depth: Gemma 4 E4B on the M5 Pro

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)@4K@32K@128KPrefill
llama.cpp · Q4_K_M · huggingface.cosourced62.15 tok/s
decode at 4K context depth
sourced62.15 tok/ssourced52.69 tok/ssourced34.5 tok/ssourced1700 tok/s
at 4K

Setup: run Gemma 4 E4B 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:e4b

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 62 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 E4B on other Apple Silicon chips

ChipSpeedQuantEngineBandwidth
M5 Maxestimated161 tok/sQ4_K_MMLX614 GB/s
M4 Proestimated62 tok/sQ4_K_MMLX273 GB/s
M6estimated54 tok/sQ4_K_MMLX170 GB/s
M3estimated33 tok/sQ4_K_MOllama100 GB/s
M1estimated23 tok/sQ4_K_MOllama68 GB/s

For the estimated figures here, the bandwidth formula’s typical error for dense models is ±9%, against 75 measured runs of 20 models (how it is computed).

About Gemma 4 E4B

Google's best small model — multimodal with audio, function calling, 128K context. Rivals much larger models.

Apache 2.0 licence · 4B · 128K context · LLMCheck capability 16/50 · see its leaderboard rank →

Memory by context length

Estimated, not measured: the index’s minimum for Gemma 4 E4B (6 GB — the weights at the quant that fits, plus ~2 GB) plus the KV cache for that many tokens, computed from its config.json. 4 full layers (2 kv heads x 512) + 20 sliding layers (2 x 256, window 512); the last 18 layers share earlier layers' KV and store none. 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 Pro 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.2 GB~6.1 GB~6.0 GB16 GB Macsame
32K~0.6 GB~6.5 GB~6.2 GB16 GB Macsame
64K (coding-agent context)~1.1 GB~7.0 GB~6.5 GB16 GB Macsame
128K~2.2 GB~8.1 GB~7.0 GB16 GB Macsame

System requirements

Macs with the M5 Pro

🛒 Get a Mac that runs Gemma 4 E4B

Gemma 4 E4B needs about 6 GB of unified memory. These Apple Silicon Macs have enough to run it.

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 E4B stacks up against other models on your specific Mac hardware.

Open Compare Tool Full Leaderboard