Gemma 4 sizes and memory needs
| Model | Params (active) | Context | Inputs | Size (4-bit) | Smallest Mac |
|---|---|---|---|---|---|
| Gemma 4 E2B | 5.1B | 128K | text, image, audio, video | 4.6 GB | 16 GB |
| Gemma 4 E4B | 8B | 128K | text, image, audio, video | 6.6 GB | 16 GB |
| Gemma 4 12B | 11.95B | 256K | text, image, audio, video | 8 GB | 16 GB |
| Gemma 4 26B-A4B | 25.2B (3.8B) | 256K | text, image, video | 18 GB | 24 GB |
| Gemma 4 31B | 30.7B | 256K | text, image, video | 20 GB | 24 GB |
E2B and E4B are built for phones and laptops; their parameter counts include per-layer embeddings (2.3B and 4.5B “effective”, per the model card). All Gemma 4 models answer in text; audio input is limited to 30-second clips. The 26B A4B is a mixture-of-experts model that uses 8 of 128 experts (plus one shared) per token.
Which Mac runs which Gemma 4
| Model | Mac mini M6 16GB | Mac mini M6 32GB | Mac mini M5 Pro 64GB | Mac Studio M5 Max 128GB |
|---|---|---|---|---|
| Gemma 4 E2B (Q4_K_M) 4.6 GB | ||||
| Gemma 4 E4B (Q4_K_M) 6.6 GB | ||||
| Gemma 4 12B (Q4_K_M) 8 GB | ||||
| Gemma 4 26B-A4B (Q4_K_M) 18 GB | ||||
| Gemma 4 31B (Q4_K_M) 20 GB | NoDoesn't fit |
Speed follows memory bandwidth and how much of the model is read per token. The 26B A4B reads only its active experts, so it runs faster than the dense 12B on the same Mac despite being twice the size on disk.
Ollama and MLX builds
In Ollama the model is called gemma4; the default tag is E4B. Run a specific size with, for example, ollama run gemma4:26b-a4b. The tags page also lists QAT builds (quantization-aware trained, slightly smaller) and MLX builds for Apple silicon.
| Model | MLX 4-bit size | Repository |
|---|---|---|
| Gemma 4 E2B | 3.5 GB | mlx-community/gemma-4-e2b-it-4bit |
| Gemma 4 E4B | 5.2 GB | mlx-community/gemma-4-e4b-it-4bit |
| Gemma 4 26B-A4B | 15.3 GB | mlx-community/gemma-4-26b-a4b-it-4bit |
| Gemma 4 31B | 18.4 GB | mlx-community/gemma-4-31b-it-4bit |
MLX builds run through LM Studio or mlx_lm. See GGUF vs MLX vs Ollama for the differences.
Long contexts need more memory
The larger Gemma 4 models accept up to 256K tokens, but context is stored in memory on top of the weights. If a model only just fits, keep the context short or step down a size. Estimate your setup with the memory calculator.
FAQ
How much RAM does Gemma 4 need on a Mac?
Can Gemma 4 31B run on a 32 GB Mac?
Which Gemma 4 should I use on a 16 GB Mac?
Is there an MLX version of Gemma 4?
See any model on the exact Mac you're considering.
- Google: Gemma 4 model card
- Google blog: Gemma 4 announcement
- Ollama: gemma4 tags
- Hugging Face: gemma-4-e2b-it-4bit
- Hugging Face: gemma-4-e4b-it-4bit
- Hugging Face: gemma-4-26b-a4b-it-4bit
- Hugging Face: gemma-4-31b-it-4bit
Speeds come from published measurements (with source links) or labeled estimates. How we measure