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 14 GB at 64k, 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 64k context is the NVIDIA RTX PRO 4000 Blackwell, $339 at Amazon, at about 27 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 Q6_K fully in memory at 64k context, about 27 tok/sest.

$339

In stock, checked

What to run it on in the US

Fully in memory at 64k context, priced at retailers today.

All hardware that runs it

Everything we price, best value first. Two cards split the model by layers.

HardwareQuantFitsDecodePricetok/s per 1,000
NVIDIA RTX PRO 4000 BlackwellQ6_Kfits27 tok/s$33980.8
NVIDIA Tesla P40Q6_Kfits14 tok/s$44931.4
Intel Arc Pro B50Q5_K_Mfits8 tok/s$60013.0
NVIDIA GeForce RTX 5060 Ti 16GBQ6_Kfits18 tok/s$61829.6
AMD Radeon RX 9060 XT 16GBQ5_K_Mfits12 tok/s$72017.1
Intel Arc A770 16GBQ5_K_Mfits20 tok/s$74526.2
AMD Radeon RX 7800 XTQ5_K_Mfits24 tok/s$75731.7
NVIDIA RTX PRO 2000 BlackwellQ6_Kfits12 tok/s$79514.8
AMD Radeon RX 9070 XTQ5_K_Mfits25 tok/s$81030.4
AMD Radeon RX 9070Q5_K_Mfits25 tok/s$86028.6
AMD Radeon RX 7900 XTQ6_Kfits29 tok/s$88033.0
Intel Arc Pro B60Q6_Kfits15 tok/s$89916.7
NVIDIA GeForce RTX 4060 Ti 16GBQ6_Kfits12 tok/s$91812.9
AMD Radeon RX 7600 XTQ5_K_Mfits11 tok/s$95911.6
NVIDIA GeForce RTX 4070 Ti SuperQ6_Kfits27 tok/s$1,14024.0
Mac mini M4 32GBQ6_Kfits5 tok/s$1,1994.3
NVIDIA GeForce RTX 5070 TiQ6_Kfits37 tok/s$1,30028.2
AMD Radeon RX 7900 XTXQ6_Kfits35 tok/s$1,40024.9
NVIDIA GeForce RTX 4080 SuperQ6_Kfits30 tok/s$1,46920.4
AMD Radeon AI PRO R9700Q6_Kfits23 tok/s$1,70013.6
Intel Arc Pro B70Q6_Kfits20 tok/s$1,80011.1
NVIDIA GeForce RTX 5080Q6_Kfits39 tok/s$1,90020.6
NVIDIA GeForce RTX 3090Q6_Kfits38 tok/s$1,97919.3
Mac mini M4 Pro 48GBQ6_Kfits12 tok/s$2,0255.8
NVIDIA GeForce RTX 3090 TiQ6_Kfits41 tok/s$2,03320.3
NVIDIA GeForce RTX 4090Q6_Kfits41 tok/s$2,07319.9
Mac mini M4 Pro 64GBQ6_Kfits12 tok/s$2,3994.9
NVIDIA RTX PRO 4000 Blackwell SFF EditionQ6_Kfits18 tok/s$2,9805.9
GMKtec EVO-X2 Ryzen AI Max+ 395 128GBQ6_Kfits9 tok/s$3,5002.7
Mac Studio M4 Max 64GBQ6_Kfits23 tok/s$3,5006.7
Beelink GTR9 Pro Ryzen AI Max+ 395 128GBQ6_Kfits9 tok/s$3,8002.4
Minisforum MS-S1 Max Ryzen AI Max+ 395 128GBQ6_Kfits9 tok/s$3,9592.3
NVIDIA RTX PRO 4500 BlackwellQ6_Kfits37 tok/s$4,0009.2
AMD Radeon PRO W7900Q6_Kfits31 tok/s$4,0007.8
Mac Studio M3 Ultra 96GBQ6_Kfits35 tok/s$4,7587.4
Mac Studio M4 Max 128GBQ6_Kfits23 tok/s$5,4004.3
NVIDIA RTX A6000Q6_Kfits31 tok/s$5,9895.2
ASUS Ascent GX10 128GBQ6_Kfits11 tok/s$6,1001.8
NVIDIA GeForce RTX 5090Q6_Kfits73 tok/s$6,49511.3
NVIDIA RTX PRO 5000 Blackwell 48GBQ6_Kfits55 tok/s$6,9997.8
NVIDIA DGX Spark 128GBQ6_Kfits11 tok/s$7,8001.4
NVIDIA RTX 6000 Ada GenerationQ6_Kfits39 tok/s$8,4954.6
NVIDIA RTX PRO 5000 Blackwell 72GBQ6_Kfits55 tok/s$8,4996.5
Mac Studio M3 Ultra 256GBQ6_Kfits35 tok/s$9,5003.7
NVIDIA RTX PRO 6000 BlackwellQ6_Kfits73 tok/s$16,0004.6
Mac Studio M3 Ultra 512GBQ6_Kfits35 tok/s$30,0001.2
Framework Desktop Ryzen AI Max+ 395 128GBQ6_Kfits9 tok/s––
Framework Desktop Ryzen AI Max+ 395 64GBQ6_Kfits9 tok/s––
Lenovo ThinkStation PGX GB10 128GBQ6_Kfits11 tok/s––
Dell Pro Max with GB10 128GBQ6_Kfits11 tok/s––
Intel Arc B570Q4_K_Moffload7 tok/s$30424.0
NVIDIA GeForce RTX 5050Q4_K_Moffload6 tok/s$35917.5
NVIDIA GeForce RTX 3060 12GBQ4_K_Moffload11 tok/s$38827.3
NVIDIA GeForce RTX 4060Q4_K_Moffload6 tok/s$40015.3
Intel Arc B580Q4_K_Moffload10 tok/s$42524.0
NVIDIA GeForce RTX 5060Q4_K_Moffload7 tok/s$43515.4
NVIDIA GeForce RTX 3080 10GBQ4_K_Moffload10 tok/s$50019.2
NVIDIA GeForce RTX 5060 Ti 8GBQ4_K_Moffload7 tok/s$51113.1
NVIDIA GeForce RTX 4060 Ti 8GBQ4_K_Moffload6 tok/s$53611.4
NVIDIA GeForce RTX 4070Q4_K_Moffload12 tok/s$57021.8
NVIDIA GeForce RTX 4070 SuperQ4_K_Moffload12 tok/s$80015.5
NVIDIA GeForce RTX 5070Q4_K_Moffload14 tok/s$90015.4

1 other card or machine we price cannot hold it at this context.

Memory needed

Weights, KV cache and runtime buffers at each context length (KV cache at fp16).

QuantFile@8k@32k@64k@128k
Q4_K_Mgguf4.6 GB6.3 GB9.5 GB13.7 GB22.0 GB
mlx-4bitmlx4.2 GB6.0 GB9.1 GB13.3 GB21.7 GB
Q5_K_Mgguf5.3 GB7.1 GB10.2 GB14.4 GB22.8 GB
Q6_Kgguf6.1 GB7.9 GB11.0 GB15.2 GB23.6 GB

Run it

Copy a command for the runtime you use.

  • Q4_K_M
    • Ollamaollama run hf.co/unsloth/Llama-3.1-8B-Instruct-GGUF:Q4_K_M
    • LM Studiolms get unsloth/Llama-3.1-8B-Instruct-GGUF@q4_k_m
    • llama.cppllama-server -hf unsloth/Llama-3.1-8B-Instruct-GGUF:Q4_K_M
  • mlx-4bit
    • LM Studiolms get mlx-community/Llama-3.1-8B-Instruct-4bit
    • MLXmlx_lm.server --model mlx-community/Llama-3.1-8B-Instruct-4bit
  • Q5_K_M
    • Ollamaollama run hf.co/unsloth/Llama-3.1-8B-Instruct-GGUF:Q5_K_M
    • LM Studiolms get unsloth/Llama-3.1-8B-Instruct-GGUF@q5_k_m
    • llama.cppllama-server -hf unsloth/Llama-3.1-8B-Instruct-GGUF:Q5_K_M
  • Q6_K
    • Ollamaollama run hf.co/unsloth/Llama-3.1-8B-Instruct-GGUF:Q6_K
    • LM Studiolms get unsloth/Llama-3.1-8B-Instruct-GGUF@q6_k
    • llama.cppllama-server -hf unsloth/Llama-3.1-8B-Instruct-GGUF:Q6_K

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 14 GB at 64k, 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 64k context is the NVIDIA RTX PRO 4000 Blackwell, $339 at Amazon, at about 27 tok/s (estimated). The fastest we price is the NVIDIA GeForce RTX 5090, at about 73 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 Q6_K fully in memory at 64k context, at about 27 tok/s (estimated).
Can I run Llama 3.1 8B on a 16 GB GPU?
Yes: at Q6_K it fits fully in 16 GB at 64k context. On the NVIDIA GeForce RTX 5080 it runs at about 39 tok/s (estimated).
Can I run Llama 3.1 8B on a 24 GB GPU?
Yes: at Q6_K it fits fully in 24 GB at 64k context. On the NVIDIA GeForce RTX 3090 Ti it runs at about 41 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.

More hardware for local AI