How to Deploy Llama 3.1 8B Locally
Llama 3.1 8B is a dense model with 8B parameters. At Q4 it needs at least 7GB of VRAM, and 8GB is the comfortable amount for an 8K context. The cheapest card that runs it today is the Tesla V100 16GB at about $305, at roughly 112.9 tokens/s.
Llama 3.1 8B details
How much VRAM does Llama 3.1 8B need for local deployment?
| Quantization | WeightsGB | Total at 8KGB | Total at 32KGB | Total at 128KGB |
|---|---|---|---|---|
| 1-bit | 1.9est. | 3.9 | 6.9 | 18.9 |
| 2-bit | 3.7GGUF | 5 | 8 | 20 |
| 3-bit | 4.8GGUF | 5.8 | 8.8 | 20.8 |
| 4-bit | 4.9GGUF | 6.5 | 9.5 | 21.5 |
| 5-bit | 5.7GGUF | 7.4 | 10.4 | 22.4 |
| 8-bit | 8.5GGUF | 10.3 | 13.3 | 25.3 |
| FP16 | 15.7est. | 17.7 | 20.7 | 32.7 |
Total = weights + KV cache (FP16) + 1GB runtime overhead. Weights marked GGUF are measured file sizes from the repository; the rest are estimated from bytes per parameter. Contexts beyond this model's 128K limit show a dash. Each tier takes whichever file of that bit width the repository has, preferring unsloth dynamic quants, so the exact file name varies by model.
Which GPUs can run Llama 3.1 8B?
eBay
| Device | VRAMGB | Price | Est. t/s | Suggested context |
|---|---|---|---|---|
| 16 | $30534 listings | 112.9 | 32K | |
| 16 | $5009 listings | 54.3 | 32K | |
| 22 | $5513 listings | 79.5 | 128K | |
| 16 | $56824 listings | 58.6 | 32K | |
| 16 | $70012 listings | 58.9 | 32K | |
| 20 | $70024 listings | 74.1 | 32K | |
| 32 | $72023 listings | 112.9 | 128K | |
| 32 | $7687 listings | 93.3 | 128K | |
| 12 | $77523 listings | 86.3 | 32K | |
| 16 | $79512 listings | 60 | 32K | |
| 24 | $99925 listings | 87.9 | 128K | |
| 32 | $9997 listings | 110.3 | 128K | |
| 16 | $1,20010 listings | 112.4 | 32K | |
| 16 | $1,26330 listings | 91.6 | 32K | |
| 24 | $1,55080 listings | 117 | 128K | |
| 16 | $1,80014 listings | 119.7 | 32K | |
| 24 | $2,9503 listings | 86.3 | 128K | |
| 24 | $3,19940 listings | 125.1 | 128K | |
| 48 | $3,4953 listings | 79.7 | 128K | |
| 32 | $4,3003 listings | 112.4 | 128K | |
| 40 | $4,89913 listings | 183 | 128K | |
| 64 | $5,04611 listings | 142.9 | 128K | |
| MacBook Pro M4 Max 128GB | 128 | $5,5493 listings | 56.5 | 128K |
| 32 | $6,50012 listings | 206.3 | 128K | |
| Mac Studio M4 Max 128GB | 128 | $6,5474 listings | 56.5 | 128K |
| MacBook Pro M5 Max 128GB | 128 | $7,2505 listings | 63.2 | 128K |
| 96 | $16,9854 listings | 206.3 | 128K | |
| Mac Studio M3 Ultra 512GB | 512 | $22,00011 listings | 82.8 | 128K |
| 24 | —No listings | 39.2 | 128K | |
| 24 | —No listings | 161.4 | 128K | |
| 32 | —No listings | 51.7 | 128K | |
| 32 | —No listings | 51.7 | 128K | |
| 32 | —No listings | 93.9 | 128K | |
| 32 | —No listings | 206.3 | 128K | |
| 32 | —No listings | 60 | 128K | |
| 32 | —No listings | 54.3 | 128K | |
| 40 | —No listings | 183.5 | 128K | |
| 48 | —No listings | 125.1 | 128K | |
| 48 | —No listings | 161.4 | 128K | |
| 64 | —No listings | 176.7 | 128K | |
| 72 | —No listings | 161.4 | 128K | |
| 84 | —No listings | 184.3 | 128K | |
| 128 | —No listings | 36.5 | 128K | |
| Mac Studio M5 Max 128GB | 128 | —No listings | 63.2 | 128K |
| 128 | —No listings | 24.7 | 128K |
Fits when weights + KV cache + runtime overhead is at or below usable memory, single card. "Offload" on MoE models means it runs with expert weights in system RAM (only attention layers and KV cache stay in VRAM); that speed assumes 70 GB/s RAM bandwidth. The context column is the largest tier that fits.
Deploy Llama 3.1 8B locally with Ollama, llama.cpp or vLLM
Ollama pulls and runs it in one command; the quantization comes from the official tag.
ollama run llama3.1:8b
llama.cpp pulls the GGUF straight from Hugging Face; -c sets the context length.
llama-server -hf bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M -c 8192
vLLM serves the original-precision weights, which needs far more memory than GGUF and usually more than one GPU.
vllm serve meta-llama/Llama-3.1-8B-Instruct
File names follow that week's model-library snapshot; the definitions are in the methodology. Methodology
FAQ
How much VRAM does Llama 3.1 8B need?
At Q4_K_M with an 8K context Llama 3.1 8B needs about 7GB of VRAM; 8GB leaves comfortable headroom.
What is the cheapest GPU that runs Llama 3.1 8B?
The Tesla V100 16GB: 16GB of VRAM, currently about $305, at roughly 112.9 tokens/s.
Can you run Llama 3.1 8B with Ollama?
Yes: ollama run llama3.1:8b.