Run Llama 3.1 8B Locally: VRAM & GPU Requirements
Llama 3.1 8B is an 8B model released by Meta in July 2024 that needs about 7 GB of VRAM at 4-bit with 8K context, so an 8GB GPU can run it locally. By today's standards it is old, but its ecosystem is the biggest, with more than 3,000 direct fine-tunes on Hugging Face. Its weakness is that long context eats VRAM: the full 128K needs 23.2 GB, twice what Qwen3.5 9B needs.
Llama 3.1 8B details
- Min VRAM at 4-bit (8K context)8 GB
- Parameters8B
- Max context128K
- Architecture
- Dense
- License
- Llama 3.1 Community License
- Launch date
- Jul 23, 2024
- Vendor
- Meta AI
- Hugging Face repo
- meta-llama/Llama-3.1-8B-Instruct
- NVFP4 repo (Blackwell)
- nvidia/Llama-3.1-8B-Instruct-NVFP4
- MLX repo (Apple)
- mlx-community/Llama-3.1-8B-Instruct-4bit
- Ollama tag
- llama3.1:8b
- Layers
- 32
- Hidden size
- 4,096
- KV heads
- 8
- Head dim
- 128
How much VRAM does Llama 3.1 8B need?
| Quantization | WeightsGB | 8K contextGB | 32K contextGB | 128K context (max)GB |
|---|---|---|---|---|
| 1-bit | 2est. | 4.2 | 7.4 | 20.3 |
| 2-bit | 3.7GGUF | 5.8 | 9.1 | 22 |
| 3-bit | 4.8GGUF | 6.9 | 10.2 | 23.1 |
| 4-bit | 4.9GGUF | 7 | 10.3 | 23.2 |
| 5-bit | 5.7GGUF | 7.8 | 11.1 | 24 |
| 8-bit | 8.5GGUF | 10.6 | 13.9 | 26.8 |
| BF16/FP16 | 16.1official | 18.2 | 21.5 | 34.4 |
Full calculation rules are on the Methodology page.
Can a single GPU run Llama 3.1 8B?
Yes, an 8GB GPU handles Llama 3.1 8B at 4-bit with 8K of context (about 7 GB), which covers everyday chat. Context is the part worth planning: longer text takes more VRAM, and 4-bit at the full 128K needs 23.2 GB. On a 12GB or 16GB card, decide how much context you want first, then pick the highest quant that fits. A 16GB card at 8-bit still gets past 50K. For 8-bit and long documents, a 24GB RTX 3090 is the sweet spot, with room for about 120K and speed to spare.
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $41316 listings | 132.9 | 92K | |
| $88045 listings | 73 | 92K | |
| $1,37813 listings | 132.9 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,40027 listings | 140 | 128K |
| $1,992116 listings | 137.2 | 128K | |
| $3,82574 listings | 145.6 | 128K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 43.6 | 128K |
| $4,89925 listings | 116.6 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 169.9 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 96.4 | 128K |
| $7,385128 listings | 223.4 | 128K | |
| $7,90037 listings | 46.3 | 128K | |
| $18,60020 listings | 223.4 | 128K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $41316 listings | 107.9 | 83K | |
| $88045 listings | 58.1 | 83K | |
| $1,37813 listings | 107.9 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,40027 listings | 114 | 128K |
| $1,992116 listings | 111.6 | 128K | |
| $3,82574 listings | 118.7 | 128K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 34.4 | 128K |
| $4,89925 listings | 94.2 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 139.7 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 77.4 | 128K |
| $7,385128 listings | 186.9 | 128K | |
| $7,90037 listings | 36.6 | 128K | |
| $18,60020 listings | 186.9 | 128K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $41316 listings | 69 | 56K | |
| $88045 listings | 36.1 | 56K | |
| $1,37813 listings | 69 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,40027 listings | 73.2 | 120K |
| $1,992116 listings | 71.5 | 120K | |
| $3,82574 listings | 76.4 | 120K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 21.1 | 128K |
| $4,89925 listings | 59.8 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 91.1 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 48.6 | 128K |
| $7,385128 listings | 125.5 | 128K | |
| $7,90037 listings | 22.5 | 128K | |
| $18,60020 listings | 125.5 | 128K |
Only common GPUs and systems are listed, from cheapest to most expensive.
What to know before running Llama 3.1 8B locally
Choose quantization by how much context you need
Between 4-bit (4.9 GB) and 8-bit (8.5 GB), pick the highest level that still fits the context you want. Every extra 1K tokens of context adds about 0.13 GB of cache, so 4-bit at 32K already needs 10.3 GB. Its native context is only 8K; the 128K comes from RoPE scaling.
What the license requires of fine-tunes
The Llama 3.1 Community License requires that when you distribute it or a model based on it, you prominently display “Built with Llama.” If you release a model trained or fine-tuned using it or its outputs, the name must begin with “Llama,” and companies with more than 700 million monthly active users need a separate license from Meta. Fine-tunes based on it are bound by the same license.
Tool calling
Llama 3.1 was trained with a tool-calling format and also knows three built-in tool names:
brave_search,wolfram_alphaandcode_interpreter. llama.cpp's llama-server recognizes them when you add--jinja. For sampling, stick with Meta's defaults:temperature0.6 andtop_p0.9.Where it shows its age
Its knowledge cutoff is December 2023, and it handles text only. It officially supports 8 languages: English, German, French, Italian, Portuguese, Hindi, Spanish and Thai. Chinese isn't among them, and Meta explicitly advises against using it to chat in unsupported languages without fine-tuning. For Chinese, look at Qwen3.5 9B instead.
Launch commands
Ollama
- Windows
- macOS
- Linux
ollama run llama3.1:8bllama.cpp
- NVIDIA
- AMD
- Mac
- CPU
llama-server -hf bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M \ -c 8192
vLLM
- Linux
- NVIDIA
- AMD
vllm serve meta-llama/Llama-3.1-8B-InstructBlackwell GPUs (RTX 50 series, RTX PRO 6000, B200) run NVFP4 weights natively, at about 30% of the original size.
vllm serve nvidia/Llama-3.1-8B-Instruct-NVFP4MLX
- Apple Silicon
On a Mac, pip install mlx-lm first; this command downloads the MLX weights from Hugging Face and starts an OpenAI-compatible server.
mlx_lm.server --model mlx-community/Llama-3.1-8B-Instruct-4bitFile names follow that week's model-library snapshot; the definitions are in the methodology. Methodology
Other models in the Meta family
| Model | Total params | Active params | 4-bit size |
|---|---|---|---|
| 3.2B | 3.2B | 2 GB | |
| 70.6B | 70.6B | 42.5 GB | |
| 108.6B | 17B | 65.4 GB | |
| 816B | 42B | 505.5 GB |