Llama 3.1 8B Instruct GPU requirements: VRAM and cheapest GPU
Llama 3.1 8B Instruct has 8B parameters, published in BF16. It accepts up to 128K tokens of context. At that length the KV cache alone takes about 17 GB per request, so long prompts can change which GPU you need. Its licence (llama3.1) adds terms of its own, so read it before you use the model commercially.
- Parameters
- 8B
- Smallest footprint (INT4)
- about 6.8 GB
- Cheapest GPU per hour (FP16)
- $0.25
- Type
- Text
meta-llama/Llama-3.1-8B-Instruct
- Parameters 8B
- Type Text
- Task text-generation
- Max context 128K
- Licence llama3.1
- Downloads 4.2M
- Likes 8.9K
Calculating for Llama 3.1 8B Instruct
More settings
Llama 3.1 8B Instruct needs about 20 GB of GPU memory
Inference (vLLM), FP16 / BF16, 8K tokens context, one request at a time.
Where the memory goes
- Weights 16 GB
- KV cache 1.1 GB
- Runtime overhead 2.7 GB
- Total 20 GB
GPU counts keep 10% of each card free for spikes. Plan extra if you expect long prompts or many users at once.
| Rank | Configuration | Per GPU / hr | GPUs needed | Total / hr | Total / month (24/7) | Provider |
|---|---|---|---|---|---|---|
| 1 | 1 × RTX 3090 24GBCheapestAmpere · GDDR6X | $0.25 | 1 | $0.25 | $183 | Vast.ai (opens in a new tab)1x RTX 3090 (median of 29 offers) |
| 2 | 2 × V100 16GBVolta · HBM2 | $0.15 | 2 | $0.30 | $220 | Vast.ai (opens in a new tab)2x Tesla V100 (median of 4 offers) |
| 3 | 1 × RTX 4090 24GBAda Lovelace · GDDR6X | $0.48 | 1 | $0.48 | $354 | Vast.ai (opens in a new tab)1x RTX 4090 (median of 34 offers) |
| 4 | 1 × RTX PRO 6000 96GBBlackwell · GDDR7 | $0.50 | 1 | $0.50 | $365 | RunPod (opens in a new tab)1x RTX PRO 6000 MaxQ |
| 5 | 1 × A40 48GBAmpere · GDDR6 | $0.59 | 1 | $0.59 | $431 | RunPod (opens in a new tab)1x A40 |
| 6 | 1 × RTX 6000 Ada 48GBAda Lovelace · GDDR6 | $0.67 | 1 | $0.67 | $488 | Vast.ai (opens in a new tab)1x RTX 6000Ada (median of 8 offers) |
| 7 | 1 × A100 40GBAmpere · HBM2 | $0.68 | 1 | $0.68 | $497 | Vast.ai (opens in a new tab)1x A100 SXM4 (median of 8 offers) |
| 8 | 1 × RTX A6000 48GBAmpere · GDDR6 | $0.69 | 1 | $0.69 | $504 | RunPod (opens in a new tab)1x RTX A6000 |
| 9 | 1 × L4 24GBAda Lovelace · GDDR6 | $0.69 | 1 | $0.69 | $504 | RunPod (opens in a new tab)1x L4 |
| 10 | 1 × L40S 48GBAda Lovelace · GDDR6 | $0.78 | 1 | $0.78 | $571 | Vast.ai (opens in a new tab)1x L40S (median of 6 offers) |
| 11 | 1 × RTX 5090 32GBBlackwell · GDDR7 | $0.87 | 1 | $0.87 | $634 | Vast.ai (opens in a new tab)1x RTX 5090 (median of 55 offers) |
| 12 | 1 × A10 24GBAmpere · GDDR6 | $1.01 | 1 | $1.01 | $734 | AWS (opens in a new tab)g5.xlarge |
| 13 | 1 × A100 80GBAmpere · HBM2e | $1.21 | 1 | $1.21 | $884 | Vast.ai (opens in a new tab)1x A100 SXM4 (median of 8 offers) |
| 14 | 1 × GH200 96GBHopper · HBM3 | $1.99 | 1 | $1.99 | $1,453 | Vultr (opens in a new tab)vbm-72c-480gb-gh200-gpu (bare metal) |
| 15 | 1 × MI300X 192GBCDNA 3 · HBM3 | $2.39 | 1 | $2.39 | $1,745 | RunPod (opens in a new tab)1x MI300X |
| 16 | 1 × H100 80GBHopper · HBM3 | $2.89 | 1 | $2.89 | $2,110 | RunPod (opens in a new tab)1x H100 PCIe |
| 17 | 1 × H100 NVL 94GBHopper · HBM3 | $3.19 | 1 | $3.19 | $2,329 | RunPod (opens in a new tab)1x H100 NVL |
| 18 | 1 × H200 141GBHopper · HBM3e | $3.79 | 1 | $3.79 | $2,767 | RunPod (opens in a new tab)1x H200 NVL |
| 19 | 2 × T4 16GBTuring · GDDR6 | $0.98 | 2sold as 4 GPUs; you need 2 | $3.91 | $2,856 | AWS (opens in a new tab)g4dn.12xlarge |
| 20 | 1 × B200 180GBBlackwell · HBM3e | $7.99 | 1 | $7.99 | $5,833 | RunPod (opens in a new tab)1x B200 |
| 21 | 1 × B300 288GBBlackwell Ultra · HBM3e | $8.99 | 1 | $8.99 | $6,563 | RunPod (opens in a new tab)1x B300 |
| 22 | 1 × GB200 186GBBlackwell · HBM3e | $10.50 | 1sold as 4 GPUs; you need 1 | $42.00 | $30,660 | CoreWeave (opens in a new tab)GB200 NVL72 |
| Provider | Instance | Per GPU / hr | GPUs needed | Total / hr | Total / month (24/7) |
|---|---|---|---|---|---|
| Vast.ai (opens in a new tab)Cheapest | 1x RTX 3090 (median of 29 offers)worldwide marketplace | $0.25 | 1 × RTX 3090 24GB | about $0.25 | about $183 |
| RunPod (opens in a new tab) | 1x RTX 3090 Tius | $0.46 | 1 × RTX 3090 24GB | about $0.46 | about $336 |
| Google Cloud (opens in a new tab) | g2-standard-4us-central1 | $0.71 | 1 × L4 24GB | about $0.71 | about $516 |
| AWS (opens in a new tab) | g6.xlargeus-east-1 | $0.80 | 1 × L4 24GB | about $0.80 | about $588 |
| Lambda (opens in a new tab) | 1x A6000us | $1.09 | 1 × RTX A6000 48GB | about $1.09 | about $796 |
| Nebius (opens in a new tab) | 1x L40S 48GBeu/us | $1.55 | 1 × L40S 48GB | about $1.55 | about $1,132 |
| Vultr (opens in a new tab) | vcg-l40s-16c-180g-48vramus | $1.67 | 1 × L40S 48GB | about $1.67 | about $1,220 |
| Azure (opens in a new tab) | NV36ads_A10_v5eastus | $3.20 | 1 × A10 24GB | about $3.20 | about $2,336 |
| CoreWeave (opens in a new tab) | GH200us | $6.50 | 1 × GH200 96GB | about $6.50 | about $4,745 |
Prices collected Nov 13, 2026. Every cost is approximate: on-demand, US dollars, mostly US regions (marketplaces such as Vast.ai are worldwide).
Memory by precision and workload
| Precision | Inference | LoRA fine-tune | QLoRA fine-tune | Full fine-tune |
|---|---|---|---|---|
| FP16 / BF16 | 20 GB | 25 GB | – | 146 GB |
| INT8 | 11 GB | – | – | – |
| INT4 | 6.8 GB | – | 12 GB | – |
Cheapest GPU by precision
Inference with an 8K context and one request at a time.
FP16 / BF16
about 20 GB · 8K tokens
The weights as published. Nothing lost, but the largest footprint.
1 × RTX 3090 24GB
Vast.ai (opens in a new tab) · 1x RTX 3090 (median of 29 offers)
- Per GPU / hr
- $0.25
- GPUs needed
- 1
- Total / hr
- about $0.25
- per month, 24/7, approx.
- $183
INT8
about 11 GB · 8K tokens
Weights at half the size. Most chat and RAG work shows no visible difference.
1 × RTX 3090 24GB
Vast.ai (opens in a new tab) · 1x RTX 3090 (median of 29 offers)
- Per GPU / hr
- $0.25
- GPUs needed
- 1
- Total / hr
- about $0.25
- per month, 24/7, approx.
- $183
INT4
about 6.8 GB · 8K tokens
Weights at a quarter of the size. Small drops show up first in maths and code.
1 × RTX 3090 24GB
Vast.ai (opens in a new tab) · 1x RTX 3090 (median of 29 offers)
- Per GPU / hr
- $0.25
- GPUs needed
- 1
- Total / hr
- about $0.25
- per month, 24/7, approx.
- $183
Inference vs fine-tuning
Inference (FP16)
1×
of the memory inference needs
20 GB
1 × RTX 3090 24GB · about $0.25
LoRA fine-tune
1.3×
of the memory inference needs
25 GB
2 × V100 16GB · about $0.30
QLoRA fine-tune
0.6×
of the memory inference needs
12 GB
1 × RTX 3090 24GB · about $0.25
Full fine-tune
7.4×
of the memory inference needs
146 GB
4 × A40 48GB · about $2.36
Serving it at FP16 fits on 1 × RTX 3090 24GB (Vast.ai). LoRA needs 2 × V100 16GB (Vast.ai), QLoRA 1 × RTX 3090 24GB (Vast.ai) and a full fine-tune 4 × A40 48GB (RunPod). Training keeps activations and optimiser state in memory as well as the weights, which is why it so often needs more GPUs than serving the same model.
Will it run on a Mac or a single RTX 4090?
RTX 4090 (24 GB)
Yes, at FP16 / BF16 with an 8K context: about 20 GB fits in the card’s 24 GB.
Mac with Apple silicon
Yes, with enough memory. At INT4 it needs about 6.8 GB, so a Mac with 16 GB or more of unified memory (macOS lets the GPU use about three quarters of it). Expect slower generation than on a data-centre GPU.
Similar models
Open models of a similar size.
- Qwen3 8BText8.2B · about 20 GB FP16 · 6.2M ↓GPU needs
- Qwen3 8B BaseText8.2B · about 20 GB FP16 · 582.9K ↓GPU needs
- Qwen3GuardText8.2B · about 20 GB FP16 · 110.5K ↓GPU needs
- Granite Guardian 4.1 8BText8.4B · about 21 GB FP16 · 9.1K ↓GPU needs
- Qwen2.5 7B InstructText7.6B · about 18 GB FP16 · 6.4M ↓GPU needs
- Qwen2.5 Coder 7B InstructText7.6B · about 18 GB FP16 · 1.5M ↓GPU needs
Llama 3.1 8B Instruct: common questions
How much VRAM does Llama 3.1 8B Instruct need?
About 20 GB at FP16, 11 GB at INT8 and 6.8 GB at INT4, with an 8K context and one request at a time. Longer contexts and more parallel requests add KV cache on top.
What is the cheapest GPU to run Llama 3.1 8B Instruct?
1 × RTX 3090 24GB (about $0.25 per GPU / hour) on Vast.ai, at about $0.25 an hour for FP16 / BF16 inference with an 8K context. Prices collected Nov 13, 2026; they change often.
Can I fine-tune Llama 3.1 8B Instruct on a single GPU?
Yes, with QLoRA: it needs about 12 GB, which fits one 80 GB GPU. LoRA needs about 25 GB and a full fine-tune about 146 GB.
How are these numbers calculated?
Weights are parameters times bytes per parameter (2 at FP16, 1 at INT8, 0.5 at INT4). The KV cache comes from the model’s layers, KV heads, head size and context length. We add about 10% plus 1 GB for the runtime and fill each GPU to 90%. Prices are on-demand list prices in US regions, collected from each provider’s public pricing.
Can Llama 3.1 8B Instruct run on a consumer GPU like the RTX 4090?
Yes, at FP16 / BF16 with an 8K context: about 20 GB fits in the card’s 24 GB.
Does Llama 3.1 8B Instruct fit on a single H100 80GB?
Yes, at FP16 / BF16, INT8, INT4 with an 8K context.
How many GPUs do I need for Llama 3.1 8B Instruct?
At FP16 with an 8K context: 1 × 80 GB, 1 × 48 GB or 1 × 24 GB GPUs. At INT4 you need about a quarter of the memory for the weights.
How much VRAM does Llama 3.1 8B Instruct need at INT8?
About 11 GB: 8.4 GB for the weights, 1.1 GB for an 8K KV cache and 2 GB of runtime overhead.
How much does it cost to run Llama 3.1 8B Instruct 24/7 for a month?
About $183 on the cheapest setup we found (1 × RTX 3090 24GB (about $0.25 per GPU / hour), $0.25 an hour for 730 hours). The cheapest on AWS, Google Cloud or Azure is about $516 a month.
FP16 vs INT8 vs INT4: which should I use?
FP16 keeps full quality and needs the most memory (about 20 GB here). INT8 halves the weights with little loss for most chat work. INT4 (AWQ, GPTQ or GGUF Q4) cuts them to a quarter, about 6.8 GB in total, with a small drop in quality that shows most in maths and code.
Can Llama 3.1 8B Instruct run on a Mac?
Yes, with enough memory. At INT4 it needs about 6.8 GB, so a Mac with 16 GB or more of unified memory (macOS lets the GPU use about three quarters of it). Expect slower generation than on a data-centre GPU.
vLLM or llama.cpp?
vLLM is built for serving many requests at once on NVIDIA and AMD GPUs and reserves most of the GPU memory for KV cache. llama.cpp runs GGUF files on almost anything, including Macs and CPUs, and suits one user or a small team. Memory needs are similar for the same precision.
Prices collected Nov 13, 2026. Every cost is approximate: on-demand, US dollars, mostly US regions (marketplaces such as Vast.ai are worldwide).
How we calculate
- Weights. Parameters times bytes per parameter: 2 at FP16, 1 at INT8, 0.5 at INT4, plus about 5% for the quantisation scales at INT8 and INT4.
- KV cache. 2 × layers × KV heads × head size × context × requests × 2 bytes, from the model’s config.json. Where a setting is missing we estimate it and say so.
- Overhead. About 10% plus 1 GB for the runtime, in line with what vLLM reserves.
- Fine-tuning. LoRA keeps 16-bit weights and adds a small adapter, its optimiser and activations. QLoRA does the same over 4-bit weights. A full fine-tune needs about 16 bytes per parameter with mixed-precision Adam (weights, gradients and optimiser states), plus activations.
- GPUs. We fill each GPU to 90% of its memory and stop at 8 per node. Costs are on-demand list prices in US regions; marketplace clouds show the median offer.