Llama 3.1 8B Instruct is Meta's open-weight chat model from July 2024, with a 128K tokens token context window and official support for eight languages. It is one of the most tested models for local use, so Ollama, LM Studio and llama.cpp all run it out of the box.
At Q4_K_M it needs about 6.5 GB with an 8K conversation, which makes it a good first model for an 8GB graphics card.
ollama run llama3.1:8bNewer 8B models such as Qwen3 8B are stronger at reasoning, but Llama 3.1 8B still has the largest set of fine-tunes and tutorials.
Last reviewed · How we calculate
llama3.1:8bThe upright line marks the memory your device can give the model. Everything left of it runs on the GPU.
At Q4_K_M the longest conversation this device can hold is about 16K tokens.
Total memory for weights, conversation cache and runtime. Pick the row your card can hold at the length you need.
| Quantization | File size | 4K | 8K | 16K | 32K | Quality |
|---|---|---|---|---|---|---|
| Q4_K_Mrecommended | 4.9 GB | 6.0 GB | 6.5 GB | 7.6 GB | 9.8 GB | Small loss, best default |
| Q5_K_M | 5.7 GB | 6.8 GB | 7.4 GB | 8.5 GB | 10.6 GB | Very close to Q8 |
| Q6_K | 6.6 GB | 7.7 GB | 8.3 GB | 9.3 GB | 11.5 GB | Hard to tell from Q8 |
| Q8_0 | 8.5 GB | 9.7 GB | 10.2 GB | 11.3 GB | 13.4 GB | Near full quality |
| F16 | 16.1 GB | 17.2 GB | 17.7 GB | 18.8 GB | 21.0 GB | Full quality |
| Device | At Q4_K_M | At Q8_0 | Memory | Speed | Longest chat |
|---|---|---|---|---|---|
| RTX 4060 8GB | Runs well | Slow, uses RAM | about 36 tok/s | 16K | |
| RTX 3060 12GB | Runs well | Runs well | about 48 tok/s | 45K | |
| RTX 4070 12GB | Runs well | Runs well | about 67 tok/s | 45K | |
| RTX 4060 Ti 16GB | Runs well | Runs well | about 38 tok/s | 74K | |
| Radeon RX 7600 XT 16GB | Runs well | Runs well | about 38 tok/s | 74K | |
| RTX 5060 Ti 16GB | Runs well | Runs well | about 60 tok/s | 74K | |
| Intel Arc A770 16GB | Runs well | Runs well | about 75 tok/s | 74K | |
| Radeon RX 9070 XT 16GB | Runs well | Runs well | about 85 tok/s | 74K | |
| RTX 4070 Ti Super 16GB | Runs well | Runs well | about 90 tok/s | 74K | |
| RTX 4080 Super 16GB | Runs well | Runs well | about 98 tok/s | 74K | |
| RTX 5080 16GB | Runs well | Runs well | about 128 tok/s | 74K | |
| RTX 3090 24GB | Runs well | Runs well | about 125 tok/s | 128K, full | |
| Radeon RX 7900 XTX 24GB | Runs well | Runs well | about 128 tok/s | 128K, full | |
| RTX 4090 24GB | Runs well | Runs well | about 135 tok/s | 128K, full | |
| RTX 5090 32GB | Runs well | Runs well | about 239 tok/s | 128K, full | |
| Mac mini M4 16GB | Runs well | Runs, tight | about 16 tok/s | 40K | |
| Mac M4 Pro 24GB | Runs well | Runs well | about 36 tok/s | 80K | |
| Mac M4 Pro 48GB | Runs well | Runs well | about 36 tok/s | 128K, full | |
| Mac M4 Max 64GB | Runs well | Runs well | about 73 tok/s | 128K, full | |
| Mac M4 Max 128GB | Runs well | Runs well | about 73 tok/s | 128K, full |
These apps use the same GGUF files, so the memory numbers above apply to each.
ollama run llama3.1:8b
Downloads the Q4_K_M file on first run. For a longer conversation type /set parameter num_ctx 16384 inside the chat.
The speeds on this page are estimates from memory bandwidth. Run the model, note the tokens per second your app reports, and your number replaces the estimate for everyone with your hardware.
Add the first benchmarkInstall Ollama, then run ollama run llama3.1:8b. That downloads the Q4_K_M build, about 4.9 GB. For higher quality on a 12GB card, use ollama run llama3.1:8b-instruct-q8_0.
Yes, under the Llama 3.1 Community License. Companies with more than 700 million monthly users need a separate licence from Meta, and products must show "Built with Llama".
Yes. llama.cpp and Ollama run it on the CPU with about 6.5 GB of free RAM at Q4_K_M. Expect a few tokens a second on a modern desktop; speed depends mostly on RAM bandwidth.
Q4_K_M is the usual choice: small loss in quality, fits 8GB cards. Pick Q5_K_M or Q6_K if you have 10 to 12 GB free, and Q8_0 if memory is not a concern.
For reasoning, maths and code, Qwen3 8B usually scores higher. Llama 3.1 8B has more fine-tunes, more tutorials and steadier English chat. Both need about the same memory.
About 6.5 GB at Q4_K_M with an 8K conversation, 7.4 GB at Q5_K_M, 10.2 GB at Q8_0 and 17.7 GB at full F16 precision. Longer conversations add about 1.1 GB for every 8,000 tokens.
Yes. The RTX 4060 8GB runs Llama 3.1 8B fully on the GPU at Q4_K_M at about 36 tokens a second.
Yes. The RTX 3060 12GB runs Llama 3.1 8B fully on the GPU at Q4_K_M at about 48 tokens a second.
Yes. The RTX 4060 Ti 16GB runs Llama 3.1 8B fully on the GPU at Q4_K_M at about 38 tokens a second.
Yes. A Mac with 16 GB of memory runs it comfortably at Q4. macOS keeps about a third of memory for the system, so smaller Macs may only manage short conversations.