Can It Run?
Home โ€บ Llama 3.1 8B โ€บ M4 Max 48GB

Can an M4 Max 48GB Mac run Llama 3.1 8B?

M4 Max ยท 48 GB unified memory ยท 546 GB/s ยท MacBook Pro 14" (M4 Max), MacBook Pro 16" (M4 Max)

Yes โ€” Llama 3.1 8B runs on an M4 Max 48GB Mac.

At Q4_K_M it needs about 6.6 GiB, leaving 34.2 GiB spare out of the ~40.8 GiB macOS will let you use. Expect roughly 89 tokens/sec โ€” faster than you can read.

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 ~40.8 GiB usable
Est. speed
89 tok/s
546 GB/s bandwidth
Max context
128K 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?
FP1615.0 GiB17.5 GiB27Yes, comfortably
Q8_07.9 GiB10.1 GiB51Yes, comfortably
Q6_K6.2 GiB8.3 GiB66Yes, comfortably
Q5_K_M5.3 GiB7.4 GiB76Yes, comfortably
Q4_K_M4.6 GiB6.6 GiB89Yes, comfortably
Q3_K_M3.6 GiB5.6 GiB112Yes, comfortably
Q2_K2.8 GiB4.7 GiB145Yes, 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.3 GiB5.6 GiBYes, comfortablyYes, comfortably
4K0.5 GiB6.0 GiBYes, comfortablyYes, comfortably
8K1.0 GiB6.6 GiBYes, comfortablyYes, comfortably
16K2.0 GiB7.9 GiBYes, comfortablyYes, comfortably
32K4.0 GiB10.5 GiBYes, comfortablyYes, comfortably
128K16.0 GiB26.1 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 llama3.1:8b

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/Llama-3-1-8B-4bit --prompt "Hello"

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 M4 Max 48GB Mac run Llama 3.1 8B?
Yes. At Q4_K_M it needs about 6.6 GiB of the roughly 40.8 GiB available, generating around 89 tokens per second.
How fast is Llama 3.1 8B on an Mac?
Around 89 tokens per second. Token generation on Apple Silicon is limited by memory bandwidth, and this machine has 546 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.