Can It Run?
Home โ€บ Gemma 2 9B โ€บ M1 Max 32GB

Can an M1 Max 32GB Mac run Gemma 2 9B?

M1 Max ยท 32 GB unified memory ยท 400 GB/s ยท MacBook Pro 14" (M1 Max), MacBook Pro 16" (M1 Max)

Yes โ€” Gemma 2 9B runs on an M1 Max 32GB Mac.

At Q4_K_M it needs about 9.0 GiB, leaving 18.2 GiB spare out of the ~27.2 GiB macOS will let you use. Expect roughly 57 tokens/sec โ€” faster than you can read.

Weights
5.3 GiB
9.24B params @ Q4_K_M
KV cache
2.6 GiB
8K context, FP16
Overhead
1.1 GiB
runtime + activations
Total needed
9.0 GiB
of ~27.2 GiB usable
Est. speed
57 tok/s
400 GB/s bandwidth
Max context
8K tokens
at Q4_K_M

Where the memory goes

Three things occupy memory when a model is loaded: the weights themselves, the KV cache that holds the conversation, and the runtime's own working buffers. Only the first is fixed โ€” the KV cache grows with every token in your context.

QuantisationWeightsTotalTok/sFits?
FP1617.2 GiB21.5 GiB17Yes, comfortably
Q8_09.1 GiB13.0 GiB33Yes, comfortably
Q6_K7.1 GiB10.9 GiB42Yes, comfortably
Q5_K_M6.1 GiB9.9 GiB49Yes, comfortably
Q4_K_M5.3 GiB9.0 GiB57Yes, comfortably
Q3_K_M4.2 GiB7.8 GiB71Yes, comfortably
Q2_K3.2 GiB6.8 GiB92Yes, comfortably

The default. Best quality-per-gigabyte for most people.

How long a context fits

The KV cache is often what breaks a setup that looked fine at load time. Quantising it to 8-bit roughly halves its footprint with little measurable quality cost.

ContextKV cacheTotalFP16 KVQ8 KV
2K0.7 GiB6.8 GiBYes, comfortablyYes, comfortably
4K1.3 GiB7.5 GiBYes, comfortablyYes, comfortably
8K2.6 GiB9.0 GiBYes, comfortablyYes, comfortably

How to run it

Ollama is the shortest path. It picks a quantisation automatically โ€” usually Q4_K_M, which is what the numbers above assume.

brew install ollama
ollama serve &
ollama run gemma2:9b

For MLX โ€” Apple's own array framework, typically a little faster than llama.cpp on Apple Silicon:

pip install mlx-lm
mlx_lm.generate --model mlx-community/Gemma-2-9B-4bit --prompt "Hello"

Macs that run Gemma 2 9B comfortably

The smallest configuration that handles it is the M1 16GB (MacBook Air (M1)).

MacMemoryBandwidthTok/s
M1 16GB16 GB68 GB/s10
M1 Pro 16GB16 GB200 GB/s28
M2 16GB16 GB100 GB/s14
M4 16GB16 GB120 GB/s17
M3 Pro 18GB18 GB150 GB/s21
M2 24GB24 GB100 GB/s14
M4 24GB24 GB120 GB/s17
M4 Pro 24GB24 GB273 GB/s39
M1 Max 32GB32 GB400 GB/s57
M2 Max 32GB32 GB400 GB/s57
M4 32GB32 GB120 GB/s17
M3 Max 36GB36 GB300 GB/s42

Common questions

Can an M1 Max 32GB Mac run Gemma 2 9B?
Yes. At Q4_K_M it needs about 9.0 GiB of the roughly 27.2 GiB available, generating around 57 tokens per second.
How fast is Gemma 2 9B on an Mac?
Around 57 tokens per second. Token generation on Apple Silicon is limited by memory bandwidth, and this machine has 400 GB/s.
How much memory does Gemma 2 9B need?
5.3 GiB for the weights at Q4_K_M, plus 2.6 GiB for an 8K-token KV cache and about 1.1 GiB of runtime overhead โ€” 9.0 GiB in total.