Can It Run?
HomeLlama 3.1 8B › M1 8GB

Can an M1 8GB Mac run Llama 3.1 8B?

M1 · 8 GB unified memory · 68 GB/s · MacBook Air (M1), MacBook Pro 13" (M1)

No — not at Q4_K_M.

Llama 3.1 8B needs about 6.6 GiB but an M1 8GB Mac has only ~5.0 GiB available for a model — you are 1.6 GiB short. macOS will swap to SSD and generation will crawl. There is a smaller quantisation that fits: see below.

Weights
4.6 GiB
8.03B params @ Q4_K_M
KV cache
1.0 GiB
8K context, FP16
Overhead
1.0 GiB
runtime + activations
Total needed
6.6 GiB
of ~5.0 GiB usable
Est. speed
11 tok/s
68 GB/s bandwidth
Max context
n/a
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?
FP1615.0 GiB17.5 GiB3No
Q8_07.9 GiB10.1 GiB6No
Q6_K6.2 GiB8.3 GiB8No
Q5_K_M5.3 GiB7.4 GiB10No
Q4_K_M4.6 GiB6.6 GiB11No
Q3_K_M3.6 GiB5.6 GiB14No
Q2_K2.8 GiB4.7 GiB18Yes, but tight

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.3 GiB5.6 GiBNoNo
4K0.5 GiB6.0 GiBNoNo
8K1.0 GiB6.6 GiBNoNo
16K2.0 GiB7.9 GiBNoNo
32K4.0 GiB10.5 GiBNoNo
128K16.0 GiB26.1 GiBNoNo

What to run instead on an M1 8GB Mac

These are the largest models that fit comfortably on this machine at Q4_K_M with an 8K context.

ModelSizeTotalTok/s
Llama 3.2 3B3.21B3.6 GiB28Yes, comfortably
Qwen2.5 3B3.09B2.9 GiB29Yes, comfortably
Gemma 2 2B2.61B3.0 GiB34Yes, comfortably
Qwen2.5 1.5B1.54B1.9 GiB58Yes, comfortably
Llama 3.2 1B1.24B1.8 GiB72Yes, comfortably

Macs that run Llama 3.1 8B comfortably

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

MacMemoryBandwidthTok/s
M1 16GB16 GB68 GB/s11
M1 Pro 16GB16 GB200 GB/s33
M2 16GB16 GB100 GB/s16
M4 16GB16 GB120 GB/s20
M3 Pro 18GB18 GB150 GB/s24
M2 24GB24 GB100 GB/s16
M4 24GB24 GB120 GB/s20
M4 Pro 24GB24 GB273 GB/s44
M1 Max 32GB32 GB400 GB/s65
M2 Max 32GB32 GB400 GB/s65
M4 32GB32 GB120 GB/s20
M3 Max 36GB36 GB300 GB/s49

Common questions

Can an M1 8GB Mac run Llama 3.1 8B?
No. At Q4_K_M it needs about 6.6 GiB, and an M1 8GB Mac has roughly 5.0 GiB available for a model after macOS takes its share.
How fast is Llama 3.1 8B on an Mac?
Around 11 tokens per second. Token generation on Apple Silicon is limited by memory bandwidth, and this machine has 68 GB/s.
How much memory does Llama 3.1 8B need?
4.6 GiB for the weights at Q4_K_M, plus 1.0 GiB for an 8K-token KV cache and about 1.0 GiB of runtime overhead — 6.6 GiB in total.