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 9 GB at 32k, counting the weights, the KV cache and runtime buffers. The cheapest hardware in Canada that runs Llama 3.1 8B fully in memory at 32k context is the NVIDIA GeForce RTX 3060 12GB, $563 at Amazon, at about 21 tok/s (estimated).

Updated . Speeds are estimates; how they are worked out.

Cheapest way to run it in Canada today

NVIDIA GeForce RTX 3060 12GB, used at eBay

Runs Llama 3.1 8B at Q6_K fully in memory at 32k context, about 21 tok/sest.

$499

In stock, checked

What to run it on in Canada

Fully in memory at 32k 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 GeForce RTX 3060 12GBQ6_Kfits21 tok/s$56336.4
AMD Radeon RX 9060 XT 16GBQ6_Kfits16 tok/s$87018.6
Mac mini M4 16GBQ5_K_Mfits8 tok/s$1,0007.8
NVIDIA GeForce RTX 5060 Ti 16GBQ6_Kfits26 tok/s$1,13022.6
NVIDIA RTX PRO 2000 BlackwellQ6_Kfits16 tok/s$1,14914.3
AMD Radeon RX 9070Q6_Kfits32 tok/s$1,20026.9
NVIDIA GeForce RTX 5070Q6_Kfits38 tok/s$1,20631.8
AMD Radeon RX 9070 XTQ6_Kfits32 tok/s$1,28525.1
NVIDIA GeForce RTX 4070Q6_Kfits29 tok/s$1,30022.1
AMD Radeon RX 7800 XTQ6_Kfits32 tok/s$1,42222.2
AMD Radeon RX 7900 XTQ6_Kfits40 tok/s$1,43728.1
AMD Radeon RX 7600 XTQ6_Kfits15 tok/s$1,44510.0
NVIDIA GeForce RTX 5070 TiQ6_Kfits51 tok/s$1,89027.0
AMD Radeon RX 7900 XTXQ6_Kfits49 tok/s$2,04123.8
Intel Arc Pro B60Q6_Kfits21 tok/s$2,07910.1
NVIDIA GeForce RTX 4070 SuperQ6_Kfits29 tok/s$2,09613.7
NVIDIA GeForce RTX 3090 TiQ6_Kfits57 tok/s$2,50023.0
NVIDIA GeForce RTX 4080 SuperQ6_Kfits42 tok/s$2,50016.8
NVIDIA RTX PRO 4000 BlackwellQ6_Kfits38 tok/s$2,81013.6
AMD Radeon AI PRO R9700Q6_Kfits32 tok/s$2,86911.3
NVIDIA GeForce RTX 5080Q6_Kfits55 tok/s$2,99918.2
NVIDIA GeForce RTX 3090Q6_Kfits53 tok/s$3,30016.2
Intel Arc Pro B70Q6_Kfits28 tok/s$4,0886.8
AMD Radeon PRO W7900Q6_Kfits44 tok/s$4,9008.9
GMKtec EVO-X2 Ryzen AI Max+ 395 128GBQ6_Kfits13 tok/s$5,2892.4
NVIDIA RTX PRO 4500 BlackwellQ6_Kfits51 tok/s$6,5997.7
ASUS Ascent GX10 128GBQ6_Kfits16 tok/s$8,5001.8
NVIDIA GeForce RTX 4090Q6_Kfits57 tok/s$9,1606.3
NVIDIA DGX Spark 128GBQ6_Kfits16 tok/s$11,1501.4
NVIDIA RTX A6000Q6_Kfits44 tok/s$11,4783.8
NVIDIA GeForce RTX 5090Q6_Kfits102 tok/s$12,3008.3
NVIDIA RTX PRO 5000 Blackwell 48GBQ6_Kfits77 tok/s$13,4375.7
NVIDIA RTX 6000 Ada GenerationQ6_Kfits55 tok/s$15,1363.6
NVIDIA RTX PRO 5000 Blackwell 72GBQ6_Kfits77 tok/s$20,6503.7
Mac Studio M3 Ultra 512GBQ6_Kfits49 tok/s$28,0001.7
Mac Studio M4 Max 128GBQ6_Kfits33 tok/s––
Mac mini M4 Pro 64GBQ6_Kfits16 tok/s––
Framework Desktop Ryzen AI Max+ 395 128GBQ6_Kfits13 tok/s––
Mac Studio M3 Ultra 256GBQ6_Kfits49 tok/s––
Mac mini M4 Pro 48GBQ6_Kfits16 tok/s––
NVIDIA GeForce RTX 4060 Ti 16GBQ6_Kfits16 tok/s––
Mac Studio M4 Max 64GBQ6_Kfits33 tok/s––
NVIDIA GeForce RTX 4070 Ti SuperQ6_Kfits38 tok/s––
Mac Studio M3 Ultra 96GBQ6_Kfits49 tok/s––
NVIDIA RTX PRO 6000 BlackwellQ6_Kfits102 tok/s––
Framework Desktop Ryzen AI Max+ 395 64GBQ6_Kfits13 tok/s––
Intel Arc B580Q6_Kfits21 tok/s––
Mac mini M4 32GBQ6_Kfits7 tok/s––
NVIDIA Tesla P40Q6_Kfits20 tok/s––
Intel Arc A770 16GBQ6_Kfits26 tok/s––
NVIDIA RTX PRO 4000 Blackwell SFF EditionQ6_Kfits25 tok/s––
Intel Arc Pro B50Q6_Kfits10 tok/s––
Minisforum MS-S1 Max Ryzen AI Max+ 395 128GBQ6_Kfits13 tok/s––
Lenovo ThinkStation PGX GB10 128GBQ6_Kfits16 tok/s––
Dell Pro Max with GB10 128GBQ6_Kfits16 tok/s––
Beelink GTR9 Pro Ryzen AI Max+ 395 128GBQ6_Kfits13 tok/s––
NVIDIA GeForce RTX 5050Q4_K_Moffload13 tok/s$57023.0
NVIDIA GeForce RTX 5060 Ti 8GBQ4_K_Moffload15 tok/s$59025.4
NVIDIA GeForce RTX 5060Q4_K_Moffload15 tok/s$60824.7
NVIDIA GeForce RTX 4060Q4_K_Moffload12 tok/s$67517.9
Intel Arc B570Q4_K_Moffload19 tok/s$80123.2
NVIDIA GeForce RTX 3080 10GBQ4_K_Moffload48 tok/s$86055.9
NVIDIA GeForce RTX 4060 Ti 8GBQ4_K_Moffload12 tok/s$86414.4

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 9 GB at 32k, 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 Canada that runs Llama 3.1 8B fully in memory at 32k context is the NVIDIA GeForce RTX 3060 12GB, $563 at Amazon, at about 21 tok/s (estimated). The fastest we price is the NVIDIA GeForce RTX 5090, at about 102 tok/s.
What is the cheapest way to run Llama 3.1 8B in Canada today?
The NVIDIA GeForce RTX 3060 12GB, $499 used at eBay, in stock: it runs Llama 3.1 8B at Q6_K fully in memory at 32k context, at about 21 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 32k context. On the NVIDIA GeForce RTX 5080 it runs at about 55 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 32k context. On the NVIDIA GeForce RTX 3090 Ti it runs at about 57 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