Llama 3.1 8B
8B parameters · 128k context · llama3.1 · released 2024-07-18
chat
In short
Llama 3.1 8B is an open model from Meta with 8B parameters. At Q4_K_M, Llama 3.1 8B needs about 6 GB of memory at 8k context and 22 GB at 128k, counting the weights, the KV cache and runtime buffers. The cheapest hardware in the US that runs Llama 3.1 8B fully in memory at 128k context is the NVIDIA RTX PRO 4000 Blackwell, $339 at Amazon, at about 18 tok/s (estimated).
Updated . Speeds are estimates; how they are worked out.
Cheapest way to run it in the US today
NVIDIA RTX PRO 4000 Blackwell, new at Amazon
Runs Llama 3.1 8B at Q5_K_M fully in memory at 128k context, about 18 tok/sest.
$339
In stock, checked
What to run it on in the US
Fully in memory at 128k context, priced at retailers today.
Cheapest
NVIDIA RTX PRO 4000 Blackwell18tok/sest.Q5_K_M
$339
Best value
NVIDIA RTX PRO 4000 Blackwell18tok/sest.Q5_K_M
$339
Fastest
NVIDIA GeForce RTX 509047tok/sest.Q6_K
$6,495
Mac
Mac Studio M3 Ultra 96GB22tok/sest.Q6_K
$4,758
All hardware that runs it
Everything we price, best value first. Two cards split the model by layers.
| Hardware | Quant | Fits | Decode | Price | tok/s per 1,000 |
|---|---|---|---|---|---|
| NVIDIA RTX PRO 4000 Blackwell | Q5_K_M | fits | 18 tok/s | $339 | 53.7 |
| NVIDIA Tesla P40 | Q5_K_M | fits | 9 tok/s | $449 | 20.9 |
| Intel Arc Pro B60 | Q5_K_M | fits | 10 tok/s | $899 | 11.1 |
| AMD Radeon RX 7900 XTX | Q5_K_M | fits | 23 tok/s | $1,400 | 16.4 |
| AMD Radeon AI PRO R9700 | Q6_K | fits | 15 tok/s | $1,700 | 8.7 |
| Intel Arc Pro B70 | Q6_K | fits | 13 tok/s | $1,800 | 7.1 |
| NVIDIA GeForce RTX 3090 | Q5_K_M | fits | 25 tok/s | $1,979 | 12.8 |
| Mac mini M4 Pro 48GB | Q6_K | fits | 8 tok/s | $2,025 | 3.7 |
| NVIDIA GeForce RTX 3090 Ti | Q5_K_M | fits | 27 tok/s | $2,033 | 13.4 |
| NVIDIA GeForce RTX 4090 | Q5_K_M | fits | 27 tok/s | $2,073 | 13.2 |
| Mac mini M4 Pro 64GB | Q6_K | fits | 8 tok/s | $2,399 | 3.1 |
| NVIDIA RTX PRO 4000 Blackwell SFF Edition | Q5_K_M | fits | 12 tok/s | $2,980 | 3.9 |
| GMKtec EVO-X2 Ryzen AI Max+ 395 128GB | Q6_K | fits | 6 tok/s | $3,500 | 1.7 |
| Mac Studio M4 Max 64GB | Q6_K | fits | 15 tok/s | $3,500 | 4.3 |
| Beelink GTR9 Pro Ryzen AI Max+ 395 128GB | Q6_K | fits | 6 tok/s | $3,800 | 1.6 |
| Minisforum MS-S1 Max Ryzen AI Max+ 395 128GB | Q6_K | fits | 6 tok/s | $3,959 | 1.5 |
| NVIDIA RTX PRO 4500 Blackwell | Q6_K | fits | 23 tok/s | $4,000 | 5.9 |
| AMD Radeon PRO W7900 | Q6_K | fits | 20 tok/s | $4,000 | 5.0 |
| Mac Studio M3 Ultra 96GB | Q6_K | fits | 22 tok/s | $4,758 | 4.7 |
| Mac Studio M4 Max 128GB | Q6_K | fits | 15 tok/s | $5,400 | 2.8 |
| NVIDIA RTX A6000 | Q6_K | fits | 20 tok/s | $5,989 | 3.3 |
| ASUS Ascent GX10 128GB | Q6_K | fits | 7 tok/s | $6,100 | 1.2 |
| NVIDIA GeForce RTX 5090 | Q6_K | fits | 47 tok/s | $6,495 | 7.2 |
| NVIDIA RTX PRO 5000 Blackwell 48GB | Q6_K | fits | 35 tok/s | $6,999 | 5.0 |
| NVIDIA DGX Spark 128GB | Q6_K | fits | 7 tok/s | $7,800 | 0.9 |
| NVIDIA RTX 6000 Ada Generation | Q6_K | fits | 25 tok/s | $8,495 | 2.9 |
| NVIDIA RTX PRO 5000 Blackwell 72GB | Q6_K | fits | 35 tok/s | $8,499 | 4.1 |
| Mac Studio M3 Ultra 256GB | Q6_K | fits | 22 tok/s | $9,500 | 2.4 |
| NVIDIA RTX PRO 6000 Blackwell | Q6_K | fits | 47 tok/s | $16,000 | 2.9 |
| Mac Studio M3 Ultra 512GB | Q6_K | fits | 22 tok/s | $30,000 | 0.7 |
| Framework Desktop Ryzen AI Max+ 395 128GB | Q6_K | fits | 6 tok/s | – | – |
| Framework Desktop Ryzen AI Max+ 395 64GB | Q6_K | fits | 6 tok/s | – | – |
| Lenovo ThinkStation PGX GB10 128GB | Q6_K | fits | 7 tok/s | – | – |
| Dell Pro Max with GB10 128GB | Q6_K | fits | 7 tok/s | – | – |
| Intel Arc B570 | Q4_K_M | offload | 3 tok/s | $304 | 10.9 |
| NVIDIA GeForce RTX 5050 | Q4_K_M | offload | 3 tok/s | $359 | 8.6 |
| NVIDIA GeForce RTX 3060 12GB | Q4_K_M | offload | 4 tok/s | $388 | 9.8 |
| NVIDIA GeForce RTX 4060 | Q4_K_M | offload | 3 tok/s | $400 | 7.5 |
| Intel Arc B580 | Q4_K_M | offload | 4 tok/s | $425 | 8.9 |
| NVIDIA GeForce RTX 5060 | Q4_K_M | offload | 3 tok/s | $435 | 7.4 |
| NVIDIA GeForce RTX 3080 10GB | Q4_K_M | offload | 4 tok/s | $500 | 7.4 |
| NVIDIA GeForce RTX 5060 Ti 8GB | Q4_K_M | offload | 3 tok/s | $511 | 6.3 |
| NVIDIA GeForce RTX 4060 Ti 8GB | Q4_K_M | offload | 3 tok/s | $536 | 5.6 |
| NVIDIA GeForce RTX 4070 | Q4_K_M | offload | 4 tok/s | $570 | 7.2 |
| Intel Arc Pro B50 | Q4_K_M | offload | 4 tok/s | $600 | 6.2 |
| NVIDIA GeForce RTX 5060 Ti 16GB | Q4_K_M | offload | 5 tok/s | $618 | 8.7 |
| AMD Radeon RX 9060 XT 16GB | Q4_K_M | offload | 5 tok/s | $720 | 6.3 |
| Intel Arc A770 16GB | Q4_K_M | offload | 5 tok/s | $745 | 7.0 |
| AMD Radeon RX 7800 XT | Q4_K_M | offload | 6 tok/s | $757 | 7.3 |
| NVIDIA RTX PRO 2000 Blackwell | Q4_K_M | offload | 5 tok/s | $795 | 5.8 |
| NVIDIA GeForce RTX 4070 Super | Q4_K_M | offload | 4 tok/s | $800 | 5.1 |
| AMD Radeon RX 9070 XT | Q4_K_M | offload | 6 tok/s | $810 | 6.9 |
| AMD Radeon RX 9070 | Q4_K_M | offload | 6 tok/s | $860 | 6.5 |
| AMD Radeon RX 7900 XT | Q4_K_M | offload | 10 tok/s | $880 | 11.1 |
| NVIDIA GeForce RTX 5070 | Q4_K_M | offload | 4 tok/s | $900 | 4.7 |
| NVIDIA GeForce RTX 4060 Ti 16GB | Q4_K_M | offload | 5 tok/s | $918 | 5.0 |
| AMD Radeon RX 7600 XT | Q4_K_M | offload | 4 tok/s | $959 | 4.5 |
| NVIDIA GeForce RTX 4070 Ti Super | Q4_K_M | offload | 6 tok/s | $1,140 | 5.2 |
| NVIDIA GeForce RTX 5070 Ti | Q4_K_M | offload | 6 tok/s | $1,300 | 4.8 |
| NVIDIA GeForce RTX 4080 Super | Q4_K_M | offload | 6 tok/s | $1,469 | 4.1 |
| NVIDIA GeForce RTX 5080 | Q4_K_M | offload | 6 tok/s | $1,900 | 3.3 |
2 other cards and machines we price cannot hold it at this context.
Memory needed
Weights, KV cache and runtime buffers at each context length (KV cache at fp16).
| Quant | File | @8k | @32k | @64k | @128k |
|---|---|---|---|---|---|
| Q4_K_Mgguf | 4.6 GB | 6.3 GB | 9.5 GB | 13.7 GB | 22.0 GB |
| mlx-4bitmlx | 4.2 GB | 6.0 GB | 9.1 GB | 13.3 GB | 21.7 GB |
| Q5_K_Mgguf | 5.3 GB | 7.1 GB | 10.2 GB | 14.4 GB | 22.8 GB |
| Q6_Kgguf | 6.1 GB | 7.9 GB | 11.0 GB | 15.2 GB | 23.6 GB |
Run it
Copy a command for the runtime you use.
- Q4_K_M
- Ollama
ollama run hf.co/unsloth/Llama-3.1-8B-Instruct-GGUF:Q4_K_M - LM Studio
lms get unsloth/Llama-3.1-8B-Instruct-GGUF@q4_k_m - llama.cpp
llama-server -hf unsloth/Llama-3.1-8B-Instruct-GGUF:Q4_K_M
- Ollama
- mlx-4bit
- LM Studio
lms get mlx-community/Llama-3.1-8B-Instruct-4bit - MLX
mlx_lm.server --model mlx-community/Llama-3.1-8B-Instruct-4bit
- LM Studio
- Q5_K_M
- Ollama
ollama run hf.co/unsloth/Llama-3.1-8B-Instruct-GGUF:Q5_K_M - LM Studio
lms get unsloth/Llama-3.1-8B-Instruct-GGUF@q5_k_m - llama.cpp
llama-server -hf unsloth/Llama-3.1-8B-Instruct-GGUF:Q5_K_M
- Ollama
- Q6_K
- Ollama
ollama run hf.co/unsloth/Llama-3.1-8B-Instruct-GGUF:Q6_K - LM Studio
lms get unsloth/Llama-3.1-8B-Instruct-GGUF@q6_k - llama.cpp
llama-server -hf unsloth/Llama-3.1-8B-Instruct-GGUF:Q6_K
- Ollama
Questions
- How much VRAM does Llama 3.1 8B need?
- At Q4_K_M, Llama 3.1 8B needs about 6 GB of memory at 8k context and 22 GB at 128k, counting the weights, the KV cache and runtime buffers.
- What is the best GPU for running Llama 3.1 8B locally?
- The cheapest hardware in the US that runs Llama 3.1 8B fully in memory at 128k context is the NVIDIA RTX PRO 4000 Blackwell, $339 at Amazon, at about 18 tok/s (estimated). The fastest we price is the NVIDIA GeForce RTX 5090, at about 47 tok/s.
- What is the cheapest way to run Llama 3.1 8B in the US today?
- The NVIDIA RTX PRO 4000 Blackwell, $339 new at Amazon, in stock: it runs Llama 3.1 8B at Q5_K_M fully in memory at 128k context, at about 18 tok/s (estimated).
- Can I run Llama 3.1 8B on a 16 GB GPU?
- Only partly: at 128k context it does not fit in 16 GB, so part of it runs from system RAM and it slows to about 4 tok/s on the Intel Arc Pro B50 (estimated).
- Can I run Llama 3.1 8B on a 24 GB GPU?
- Yes: at Q5_K_M it fits fully in 24 GB at 128k context. On the NVIDIA GeForce RTX 3090 Ti it runs at about 27 tok/s (estimated).
- How do I run Llama 3.1 8B locally?
- With Ollama: ollama run hf.co/unsloth/Llama-3.1-8B-Instruct-GGUF:Q4_K_M (the Q4_K_M build). LM Studio and llama.cpp commands are on this page.
- What licence is Llama 3.1 8B released under?
- llama3.1, which allows commercial use.