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 6 GB at 8k, counting the weights, the KV cache and runtime buffers. The cheapest hardware in the UK that runs Llama 3.1 8B fully in memory at 8k context is the Intel Arc A770 16GB, £364 at eBay, at about 37 tok/s (estimated).

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

Cheapest way to run it in the UK today

NVIDIA Tesla P40, used at eBay

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

£280

In stock, checked

What to run it on in the UK

Fully in memory at 8k 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
Intel Arc A770 16GBQ6_Kfits37 tok/s£364100.4
NVIDIA GeForce RTX 4060Q5_K_Mfits25 tok/s£37965.4
NVIDIA GeForce RTX 5050Q5_K_Mfits29 tok/s£38076.6
Intel Arc B570Q6_Kfits25 tok/s£39662.7
NVIDIA GeForce RTX 5060Q5_K_Mfits41 tok/s£400102.0
NVIDIA GeForce RTX 3060 12GBQ6_Kfits29 tok/s£40072.8
NVIDIA GeForce RTX 4060 Ti 8GBQ5_K_Mfits26 tok/s£40764.4
NVIDIA GeForce RTX 5060 Ti 8GBQ5_K_Mfits41 tok/s£47585.9
NVIDIA GeForce RTX 4070Q6_Kfits41 tok/s£56871.9
NVIDIA GeForce RTX 3080 10GBQ6_Kfits61 tok/s£591103.9
AMD Radeon RX 9060 XT 16GBQ6_Kfits23 tok/s£63036.3
AMD Radeon RX 9070Q6_Kfits46 tok/s£68067.5
Mac mini M4 16GBQ6_Kfits10 tok/s£68514.9
NVIDIA GeForce RTX 5060 Ti 16GBQ6_Kfits36 tok/s£69052.5
Intel Arc B580Q6_Kfits30 tok/s£70042.4
NVIDIA GeForce RTX 5070Q6_Kfits54 tok/s£70077.5
Intel Arc Pro B50Q6_Kfits15 tok/s£74419.6
AMD Radeon RX 9070 XTQ6_Kfits46 tok/s£75061.2
NVIDIA Tesla P40Q6_Kfits28 tok/s£78035.9
AMD Radeon RX 7800 XTQ6_Kfits45 tok/s£80055.9
AMD Radeon RX 7900 XTQ6_Kfits57 tok/s£82969.2
NVIDIA RTX PRO 2000 BlackwellQ6_Kfits23 tok/s£85027.4
Intel Arc Pro B60Q6_Kfits30 tok/s£94431.5
NVIDIA GeForce RTX 4060 Ti 16GBQ6_Kfits23 tok/s£97723.8
NVIDIA GeForce RTX 4070 SuperQ6_Kfits41 tok/s£98341.4
NVIDIA GeForce RTX 5070 TiQ6_Kfits72 tok/s£1,00072.4
NVIDIA GeForce RTX 4070 Ti SuperQ6_Kfits54 tok/s£1,32940.9
NVIDIA GeForce RTX 3090Q6_Kfits76 tok/s£1,33056.9
AMD Radeon RX 7900 XTXQ6_Kfits69 tok/s£1,39949.2
Intel Arc Pro B70Q6_Kfits40 tok/s£1,42227.8
NVIDIA GeForce RTX 4080 SuperQ6_Kfits60 tok/s£1,43041.6
NVIDIA GeForce RTX 5080Q6_Kfits78 tok/s£1,47052.8
AMD Radeon AI PRO R9700Q6_Kfits46 tok/s£1,60028.7
Mac mini M4 32GBQ6_Kfits10 tok/s£1,6496.2
NVIDIA GeForce RTX 3090 TiQ6_Kfits82 tok/s£2,19937.1
Mac Studio M4 Max 64GBQ6_Kfits46 tok/s£3,29914.0
Mac mini M4 Pro 64GBQ6_Kfits23 tok/s£3,3496.9
GMKtec EVO-X2 Ryzen AI Max+ 395 128GBQ6_Kfits18 tok/s£3,5005.3
NVIDIA RTX PRO 4500 BlackwellQ6_Kfits72 tok/s£4,58715.8
Mac Studio M3 Ultra 96GBQ6_Kfits69 tok/s£4,94914.0
NVIDIA GeForce RTX 5090Q6_Kfits145 tok/s£5,00029.0
NVIDIA GeForce RTX 4090Q6_Kfits82 tok/s£5,09116.0
ASUS Ascent GX10 128GBQ6_Kfits22 tok/s£5,2994.2
AMD Radeon PRO W7900Q6_Kfits62 tok/s£5,78510.7
Lenovo ThinkStation PGX GB10 128GBQ6_Kfits22 tok/s£5,9443.7
NVIDIA RTX PRO 5000 Blackwell 48GBQ6_Kfits109 tok/s£7,30014.9
Mac Studio M3 Ultra 256GBQ6_Kfits69 tok/s£8,2498.4
NVIDIA RTX A6000Q6_Kfits62 tok/s£9,0006.9
NVIDIA RTX 6000 Ada GenerationQ6_Kfits78 tok/s£11,2636.9
NVIDIA RTX PRO 6000 BlackwellQ6_Kfits145 tok/s£13,58710.7
Mac Studio M4 Max 128GBQ6_Kfits46 tok/s––
Framework Desktop Ryzen AI Max+ 395 128GBQ6_Kfits18 tok/s––
Mac Studio M3 Ultra 512GBQ6_Kfits69 tok/s––
NVIDIA DGX Spark 128GBQ6_Kfits22 tok/s––
Mac mini M4 Pro 48GBQ6_Kfits23 tok/s––
Framework Desktop Ryzen AI Max+ 395 64GBQ6_Kfits18 tok/s––
AMD Radeon RX 7600 XTQ6_Kfits21 tok/s––
NVIDIA RTX PRO 4000 BlackwellQ6_Kfits54 tok/s––
NVIDIA RTX PRO 4000 Blackwell SFF EditionQ6_Kfits35 tok/s––
Minisforum MS-S1 Max Ryzen AI Max+ 395 128GBQ6_Kfits18 tok/s––
NVIDIA RTX PRO 5000 Blackwell 72GBQ6_Kfits109 tok/s––
Dell Pro Max with GB10 128GBQ6_Kfits22 tok/s––
Beelink GTR9 Pro Ryzen AI Max+ 395 128GBQ6_Kfits18 tok/s––

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 6 GB at 8k, 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 UK that runs Llama 3.1 8B fully in memory at 8k context is the Intel Arc A770 16GB, £364 at eBay, at about 37 tok/s (estimated). The best value is the NVIDIA GeForce RTX 3080 10GB (about 61 tok/s for £591). The fastest we price is the NVIDIA GeForce RTX 5090, at about 145 tok/s.
What is the cheapest way to run Llama 3.1 8B in the UK today?
The NVIDIA Tesla P40, £280 used at eBay, in stock: it runs Llama 3.1 8B at Q6_K fully in memory at 8k context, at about 28 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 8k context. On the NVIDIA GeForce RTX 5080 it runs at about 78 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 8k context. On the NVIDIA GeForce RTX 3090 Ti it runs at about 82 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