Can It Run?
Home โ€บ Gemma 2 2B โ€บ M4 32GB

Can an M4 32GB Mac run Gemma 2 2B?

M4 ยท 32 GB unified memory ยท 120 GB/s ยท MacBook Air 15" (M4), Mac mini (M4)

Yes โ€” Gemma 2 2B runs on an M4 32GB Mac.

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

Weights
1.5 GiB
2.61B params @ Q4_K_M
KV cache
0.7 GiB
8K context, FP16
Overhead
0.9 GiB
runtime + activations
Total needed
3.0 GiB
of ~27.2 GiB usable
Est. speed
60 tok/s
120 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?
FP164.9 GiB6.6 GiB18Yes, comfortably
Q8_02.6 GiB4.2 GiB35Yes, comfortably
Q6_K2.0 GiB3.6 GiB45Yes, comfortably
Q5_K_M1.7 GiB3.3 GiB52Yes, comfortably
Q4_K_M1.5 GiB3.0 GiB60Yes, comfortably
Q3_K_M1.2 GiB2.7 GiB75Yes, comfortably
Q2_K0.9 GiB2.4 GiB98Yes, 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.2 GiB2.3 GiBYes, comfortablyYes, comfortably
4K0.3 GiB2.5 GiBYes, comfortablyYes, comfortably
8K0.7 GiB3.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:2b

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-2B-4bit --prompt "Hello"

Macs that run Gemma 2 2B comfortably

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

MacMemoryBandwidthTok/s
M1 8GB8 GB68 GB/s34
M1 16GB16 GB68 GB/s34
M1 Pro 16GB16 GB200 GB/s100
M2 16GB16 GB100 GB/s50
M4 16GB16 GB120 GB/s60
M3 Pro 18GB18 GB150 GB/s75
M2 24GB24 GB100 GB/s50
M4 24GB24 GB120 GB/s60
M4 Pro 24GB24 GB273 GB/s137
M1 Max 32GB32 GB400 GB/s200
M2 Max 32GB32 GB400 GB/s200
M4 32GB32 GB120 GB/s60

Common questions

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