Local AI Bench

Can You Run Llama-3.1-8B-Instruct on M4 Max 64 GB?

Q4_K_M · llama.cpp · 512-token input · 640-token context window

Ran successfully

Measured Run recorded 2026-11-29 UTC with llama.cpp 1.1.0 (build 12774, commit 171527522). The estimated working allocation is 6.3 GB for Llama-3.1-8B-Instruct in Q4_K_M.

80.1 tok/s measured in llama.cpp 1.1.0 (build 12774, commit 171527522) on 2026-11-29 The GPU shares its 64 GB pool with macOS.

Adjust configuration
Estimated weights
4.9 GB
Estimated FP16 cache
0.1 GB
Estimated overhead
1.3 GB
Estimated GPU budget
41.6–48.0 GB

Context sensitivity

Estimated
Context capacityCacheTotal allocation
4,096 tokens0.54 GB6.70 GB
8,192 tokens1.07 GB7.29 GB
16,384 tokens2.15 GB8.47 GB
32,768 tokens4.29 GB10.83 GB

Recorded tests

Model / hardwareRuntimePrompt / windowDecodeSource
Llama-3.1-8B-InstructM4 Max 64 GBllama.cpp1.1.0 (build 12774, commit 171527522)Q4_K_M512 / 64080.1 tok/sMeasured2026-11-29 UTC
Llama-3.1-8B-InstructM4 Max 64 GBmlxmlx-lm 0.32.2 / mlx 0.32.54bit512 / 8,19290.9 tok/sMeasured2026-11-29 UTC
Llama-3.1-8B-InstructM4 Max 64 GBollama0.40.16Q4_K_M512 / 8,19278.8 tok/sMeasured2026-11-29 UTC

Related profiles

Frequently asked questions

Does Llama-3.1-8B-Instruct fit on M4 Max?

Ran successfully for Q4_K_M with 640 context tokens. The verdict comes from an observed run.

How fast is generation?

80.1 tok/s measured in llama.cpp 1.1.0 (build 12774, commit 171527522) on 2026-11-29

How much difference does context make?

At 640 tokens, the estimated FP16 attention cache is 0.08 GB. The weight allocation stays around 4.92 GB when only context changes.