Llama 3.1 8B Instruct
Meta · 8.0B · up to 128K context · llama-3.1
A true 128K context window makes this a good choice for a 16GB Mac that needs to chew on long documents, not just chat. It's a generation behind on raw reasoning benchmarks but the long context still earns it a place.
On a M4 Pro with 48 GB
macOS9.6 GBweights16.1 GBKV cache1.1 GBheadroom21.3 GB
- Weights
- 16.1 GB
- KV cache
- 1.1 GB
- Usable RAM
- 38.4 GB
- Headroom
- 21.3 GB
- Generation
- 13.3 tok/sest.
- Prompt processing
- 112 tok/sest.
- First token (1K prompt)
- 9.1 sest.
Decode speed is bandwidth ÷ active weight bytes, at 273 GB/s and 78% efficiency. These are modelled figures, not measurements.
Every quantization, on your Mac
| Quant | Weights | + KV | Verdict | Speed est. | Repo |
|---|---|---|---|---|---|
| q4 | 4.5 GB | 5.6 GB | FITS · 32.8 GB FREE | 47.1 tok/s | Meta-Llama-3.1-8B-Instruct-4bit |
| q8 | 8.5 GB | 9.6 GB | FITS · 28.8 GB FREE | 25.0 tok/s | Meta-Llama-3.1-8B-Instruct-8bit |
| bf16 | 16.1 GB | 17.1 GB | FITS · 21.3 GB FREE | 13.3 tok/s | Meta-Llama-3.1-8B-Instruct-bf16 |
We never host weights. Every link goes to Hugging Face.
Run it
Chat
mlx_lm.chat --model mlx-community/Meta-Llama-3.1-8B-Instruct-bf16Serve an OpenAI-compatible endpoint
mlx_lm.server --model mlx-community/Meta-Llama-3.1-8B-Instruct-bf16 --port 8080How far can you push the context
2K tokensFITS · 22.1 GB FREE
cache 0.3 GB
8K tokensFITS · 21.3 GB FREE
cache 1.1 GB
32K tokensFITS · 18.0 GB FREE
cache 4.3 GB
128K tokensTIGHT · 5.2 GB FREE
cache 17.2 GB
Which Macs run this
| Chip | Smallest RAM that fits | Speed est. |
|---|---|---|
| M1 | no configuration | — |
| M1 Pro | 32 GB | 9.5 tok/s |
| M1 Max | 32 GB | 19.7 tok/s |
| M1 Ultra | 64 GB | 40.3 tok/s |
| M2 | 24 GB | 4.5 tok/s |
| M2 Pro | 32 GB | 9.6 tok/s |
| M2 Max | 32 GB | 19.9 tok/s |
| M2 Ultra | 64 GB | 40.8 tok/s |
| M3 | 24 GB | 4.5 tok/s |
| M3 Pro | 36 GB | 7.0 tok/s |
| M3 Max (14-core CPU) | 36 GB | 14.6 tok/s |
| M3 Max (16-core CPU) | 48 GB | 19.9 tok/s |
| M3 Ultra | 96 GB | 42.3 tok/s |
| M4 | 24 GB | 5.5 tok/s |
| M4 Pro | 24 GB | 13.3 tok/s |
| M4 Max (14-core CPU) | 36 GB | 20.7 tok/s |
| M4 Max (16-core CPU) | 48 GB | 27.9 tok/s |
| M5 | 24 GB | 7.1 tok/s |
| M5 Prounverified | 24 GB | 15.1 tok/s |
| M5 Maxunverified | 36 GB | 31.7 tok/s |