Skip to content

Llama 3 8B VRAM Requirements

Meta, United States · Released April 18, 2024

Llama 3 8B has 8.03B parameters. In BF16 its weights alone take 15.0 GiB; quantized to 4-bit, about 4.58 GiB. Cheapest way to run it today: 1 × RTX A4000 (16 GB) at $0.072 per hour.

On your own machine, with a 32K context: the smallest card that holds it entirely is an RTX 3060 (12 GB) in Q6_K, about 24 tokens/s; an RTX 4090 (24 GB) in BF16, about 40 tokens/s. A Mac needs 16 GB of memory (Q6_K, about 7.9 tokens/s on an M4). Without a graphics card it runs from 32 GB of RAM at about 5.6 tokens/s.

Does it run on your machine? Open the calculator →

Pick it once and every model page tells you whether it runs on it. Kept in this browser only.

Llama 3 8B at a glance

Made by
Meta, United States
Released
April 18, 2024
Parameters
8.03B
Context window
8K tokens
License
Llama 3 Community License
Access
Gated: accept the license on Hugging Face (opens in a new tab) before downloading the weights
Reads
Text only
Training
7.2 × 1023 FLOP · 15 trillion tokens · NVIDIA H100 SXM5 80GB

Epoch AI (opens in a new tab), CC BY 4.0

Quality, measured by others
LMArena text score 1,166

Preference votes: 1,162 to 1,169 (95%), 105K votes, as “Llama 3 8B Instruct”, 2026-11-22. LMArena (opens in a new tab), CC BY 4.0

Epoch Capabilities Index 109

Benchmarks combined, as “Llama 3-8B”. Epoch AI (opens in a new tab), CC BY 4.0

Runs with
vLLM, SGLang, llama.cpp (Ollama, LM Studio), MLX (Mac)
Checked against

KV cache matches the GGUF header of MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF (opens in a new tab) (what llama.cpp allocates), December 5, 2026

On Ollama
ollama run llama3:8b · Q4_0, 4.3 GiB 26M pulls (opens in a new tab)

VRAM by precision and context length

Weights plus the KV cache of one request (BF16 cache), in GiB. Add 1 to 3 GiB for the inference engine itself.

Weights formatWeights only+ 8K context
BF16 / FP1615.016.0
FP8 / INT88.469.46
4-bit (GGUF Q4_K_M)4.585.58

Llama 3 8B GGUF files

Exact size of each quantization in MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF (opens in a new tab), and the smallest GPU that runs it with llama.cpp, Ollama or LM Studio and an 8K-token context. Quantizations marked * are not published there: they come from bartowski/Meta-Llama-3-8B-Instruct-GGUF (opens in a new tab).

QuantizationFile sizeSmallest GPU
Q8_07.95 GiBRTX 4070 / 4070 SUPER (12 GB)
Q6_K6.14 GiBRTX 4070 / 4070 SUPER (12 GB)
Q5_K_M5.34 GiBRTX 4060 (8 GB)
Q4_K_M4.58 GiBRTX 4060 (8 GB)
IQ4_XS4.14 GiBRTX 4060 (8 GB)
Q3_K_M3.74 GiBRTX 4060 (8 GB)
Q2_K2.96 GiBRTX 4060 (8 GB)
IQ1_S1.88 GiBRTX 4060 (8 GB)
Show the other 14 files
QuantizationFile sizeSmallest GPU
Q5_K_S5.22 GiBRTX 4060 (8 GB)
Q4_K_S4.37 GiBRTX 4060 (8 GB)
IQ4_NL (from bartowski/Meta-Llama-3-8B-Instruct-GGUF)4.36 GiBRTX 4060 (8 GB)
Q3_K_L4.03 GiBRTX 4060 (8 GB)
IQ3_M (from bartowski/Meta-Llama-3-8B-Instruct-GGUF)3.52 GiBRTX 4060 (8 GB)
IQ3_S (from bartowski/Meta-Llama-3-8B-Instruct-GGUF)3.43 GiBRTX 4060 (8 GB)
Q3_K_S3.41 GiBRTX 4060 (8 GB)
IQ3_XS3.28 GiBRTX 4060 (8 GB)
IQ3_XXS (from bartowski/Meta-Llama-3-8B-Instruct-GGUF)3.05 GiBRTX 4060 (8 GB)
IQ2_M (from bartowski/Meta-Llama-3-8B-Instruct-GGUF)2.75 GiBRTX 4060 (8 GB)
IQ2_S (from bartowski/Meta-Llama-3-8B-Instruct-GGUF)2.57 GiBRTX 4060 (8 GB)
IQ2_XS2.43 GiBRTX 4060 (8 GB)
IQ2_XXS (from bartowski/Meta-Llama-3-8B-Instruct-GGUF)2.23 GiBRTX 4060 (8 GB)
IQ1_M2.01 GiBRTX 4060 (8 GB)

Read every day from Hugging Face. Split files are added together; vision projectors are left out.

How many GPUs to run Llama 3 8B

Fewest GPUs that fit the weights plus one 8K-token request. Data-center GPUs use vLLM (90% of memory usable), the others llama.cpp. Several GPUs split the model with tensor or pipeline parallelism.

GPUBF16 / FP168-bit4-bit
GeForce RTX 4090 24 GB111
GeForce RTX 5090 32 GB111
RTX PRO 6000 Blackwell 96 GB111
Mac M5 Max 128 GB 107.5 GB usable111
Ryzen AI Max+ 395 128 GB 96 GB usable111
DGX Spark (GB10) 128 GB111
NVIDIA H100 80 GB111
NVIDIA H200 141 GB111
NVIDIA B200 (HGX) 180 GB111

8-bit: FP8 with vLLM (INT8 on GPUs without FP8), Q8_0 with llama.cpp. 4-bit: AWQ / GPTQ with vLLM, Q4_K_M with llama.cpp, both counted at the Q4_K_M size.

Cheapest way to run Llama 3 8B today

For each GPU: the fewest cards that fit Llama 3 8B with one 8K-token request, the most faithful weight format at that count, and the cheapest on-demand price (2026-12-05).

On-demand prices from AWS, Google Cloud, Azure, RunPod, Vast.ai, Oracle Cloud, OVHcloud, Scaleway, Verda, Akash and UpCloud, checked every hour. Serving many users needs more KV cache, so more memory: size it in the calculator. Some links are affiliate links: StudioTV may earn a commission, at no extra cost to you.

AWS, Google Cloud and UpCloud prices: Spare Cores (opens in a new tab), CC BY-SA 4.0 (opens in a new tab), shared under the same license.

Recommended settings for Llama 3 8B

Sampling defaults from the official generation_config.json (opens in a new tab) of meta-llama/Meta-Llama-3-8B-Instruct.

SettingValue
Temperature0.6
Top-p0.9

vLLM and SGLang apply these defaults unless a request sets its own. With llama.cpp, pass them yourself: --temp 0.6 --top-p 0.9

KV cache: how memory grows with context

Architecture: 32 layers · GQA, 8 KV heads × 128. Every layer keeps keys and values for every token (grouped-query attention), so the cache grows linearly with context.

Context per requestBF16 cacheFP8 cache
8K tokens1.00 GiB0.50 GiB

Llama 3 8B VRAM FAQ

How much VRAM does Llama 3 8B need?

In BF16 the weights alone take 15.0 GiB (16 GB). In FP8 that is 8.46 GiB, and about 4.58 GiB with 4-bit quantization (Q4_K_M). Each request then adds KV cache: 1.00 GiB at 8K tokens (BF16 cache).

Can Llama 3 8B run on an 8 GB, 12 GB or 16 GB graphics card?

With a 32K context and llama.cpp: 8 GB (RTX 4060): only with part of the model in system RAM, about 12 tokens/s in Q4_K_M; 12 GB (RTX 3060): yes, in Q6_K, about 24 tokens/s; 16 GB (RTX 4060 Ti): yes, in Q8_0, about 18 tokens/s. Counted with 32 GB of system RAM. A shorter context needs less memory.

How fast is Llama 3 8B on an RTX 4090 or an RTX 5090?

About 40 tokens/s on an RTX 4090 in BF16. About 70 tokens/s on an RTX 5090 in BF16. These are estimates for one request at a 32K context; against 19 published llama.cpp measurements on consumer and workstation GPUs, our estimates are 8% off at the median.

Can Llama 3 8B run without a graphics card?

Yes, slowly: about 5.6 tokens/s in Q4_K_M on a processor with 32 GB of dual-channel DDR5 RAM (llama.cpp, 32K context).

Can Llama 3 8B run a coding agent on an RTX 4090 or an RTX 5090?

Not well: its context stops at 8K tokens, and coding agents need at least 64K (Ollama's guidance for agents and coding tools).

Can Llama 3 8B run on a single RTX 4090 (24 GB)?

Yes. In BF16 it fits on one RTX 4090 with an 8K-token context (16.0 GiB including the cache, with llama.cpp).

Can Llama 3 8B run on an RTX 5090 (32 GB)?

Yes. In BF16 (16.0 GiB with an 8K-token context) it fits on one RTX 5090, with llama.cpp.

Can Llama 3 8B run on a Mac?

Yes. In 4-bit (Q4_K_M with llama.cpp) it needs a Mac with 16 GB of unified memory or more, of which macOS gives the GPU about 12 GB, for one request with an 8K-token context. The same Mac also holds it in 8-bit (Q8_0).

Can Llama 3 8B run on a DGX Spark or a Ryzen AI Max+ 395 (128 GB)?

Yes. In BF16 (16.0 GiB with an 8K-token context) it fits on a DGX Spark (128 GB) and on a Ryzen AI Max+ 395 with 128 GB, whose GPU gets up to 96 GB, with llama.cpp and one request.

What is the cheapest way to run Llama 3 8B?

On 2026-12-05, the cheapest on-demand setup is 1 × RTX A4000 (16 GB) with Q8_0 weights on Vast.ai, at $0.072 per hour (about $52.56 per month). Next: 1 × GeForce RTX 3090 (24 GB) with BF16 weights on Vast.ai, at $0.100 per hour. Sized for one 8K-token request; prices are checked every hour.

How many H100 GPUs does Llama 3 8B need?

With one request and an 8K-token context: 1 in BF16, 1 in FP8 and 1 in 4-bit (vLLM, 90% of memory usable). Serving many users at once needs more memory for their KV caches: the calculator sizes that for you.

What temperature should I use with Llama 3 8B?

The official defaults are temperature 0.6, top-p 0.9.

Llama 3 8B VRAM badge

For a model card or a README: the 4-bit size and the smallest GPU it fits on, linked to this page. Data as JSON: /api/models/llama-3-8b.json.

Llama 3 8B VRAM badge

[![Llama 3 8B VRAM](https://studiotvai.com/badge/llama-3-8b.svg)](https://studiotvai.com/vram-requirements/llama-3-8b)

Other models

Same family (dense): Llama 3.1 8B · Llama 3.2 3B · Nanbeige4.3 33B · Granite 4.2 30B · Granite 4.2 8B · Granite 4.2 3B · MiniCPM5 2B · MiniCPM5 1B · Ministral 3 14B · Ministral 3 8B · Ministral 3 3B · Devstral 2 123B · Devstral Small 2 24B · Mistral Medium 3.5 128B · Magistral Small 1.2 24B · Mistral Small 3 24B · Mistral Large 2411 123B · Pixtral Large 124B · Codestral 22B · Mistral Small 2409 22B · Pixtral 12B · Nemotron 3.5 Parse · LLaVA 1.6 Mistral 7B · Mistral Small 3.2 24B · Qwen3 32B · Llama 3.3 70B · Llama 3.1 70B · Llama 3.1 405B · Youtu-Parsing-Omni · Mistral 7B v0.3 · Mistral Small 3.1 24B · Mistral Nemo · DeepSeek R1 Qwen3 8B · DeepSeek R1 Distill Qwen 32B · DeepSeek R1 Distill Qwen 14B · DeepSeek R1 Distill Qwen 7B · DeepSeek R1 Distill Llama 8B · Qwen3 4B · Qwen3 8B · Qwen2.5 7B · Qwen3 14B · Qwen2.5 3B · Qwen2.5 32B · Qwen2.5 14B · Qwen3-VL 8B · Qwen2.5-VL 7B · Qwen3-VL 4B · Qwen2.5-VL 3B · Qwen2.5-VL 32B · Qwen2-VL 7B · phi-4 · Phi-3.5-mini · Phi-4-mini · Phi-3-mini-128k · WeVisOne-VL 4B · Granite 4.1 3B · Mage-VL-Cowork · Qwen2 7B · Qwen2.5 72B · Qwen3-VL 32B · Qwen2.5 14B-1M · Qwen2.5-VL 72B · Hermes-3-Llama-3.1 8B · Granite 3.3 8B · MNN-Pocket 0.3B · KORMo-Web 11B · ERNIE 4.5 21B-A3B · Sage-Interaction · MiniCPM-o-4_5 · Qwen1.5 7B · PaddleOCR-VL-1.8

Similar size: Ministral 8B · Gemma 4 E4B · cellgemma-e4b · Qwen2.5-Coder 7B · LFM2.5 8B-A1B · Mamba-Codestral 7B · Nemotron Nano 9B v2 · Gemma 2 9B · Qwen3.5 4B-Qwenputer · Clef Flash

Browse all 264 models →

Estimates, not guarantees: computed from the official config.json with the same engine as the LLM VRAM Calculator. Real usage depends on your engine version and settings.