Skip to content
Llama Builds

Meta · Released July 2024

Llama 3.1 8B Instruct

What it takes to run Llama 3.1 8B Instruct locally: memory by quantization, the GPUs that handle it, and how fast it runs.

Updated

Parameters
8B
Architecture
Dense
Context
128K tokens
License
Llama 3.1 Community License
Memory at Q4_K_M
~6.7GB

What do you need to run Llama 3.1 8B Instruct?

Llama 3.1 8B Instruct needs about 6.7GB of VRAM at Q4_K_M with 8K context (4.9GB for the weights plus KV cache and overhead). The smallest GPU that runs it comfortably is a 8GB card like the RTX 5060.

See the full hardware guide for Llama 3.1 8B Instruct

What to buy

GPUs for Llama 3.1 8B Instruct

Cheapest that runs it

RTX 5060

8GB · ~$450

Quant
Q4_K_M
Speed (est.)
~68 tok/s
Runs well

Fastest

RTX 5090

32GB · ~$4,300

Quant
Q8_0
Speed (est.)
~145 tok/s
Runs well

Unified memory

Ryzen AI Max+ 395

128GB unified · ~$3,300

Quant
Q8_0
Speed (est.)
~22 tok/s
Runs well

Speeds are estimates at the quantization shown with 8K context. We may earn a commission when you buy through these links. Learn more.

Memory

Llama 3.1 8B Instruct VRAM requirements by quantization

Lower-bit quantizations shrink the model at some cost to quality. Q4_K_M is the usual sweet spot. Totals include the KV cache for the context length shown plus runtime overhead.

Memory needed for Llama 3.1 8B Instruct at each quantization level
QuantizationQualityWeightsTotal @ 8K ctxTotal @ 32K ctx
Q2_KRough3.0 GB4.8 GB8.0 GB
Q3_K_MUsable4.0 GB5.7 GB9.0 GB
Q4_K_MRecommendedDefault4.9 GB6.7 GB10.0 GB
Q5_K_MVery good5.7 GB7.6 GB11 GB
Q6_KNear-lossless6.6 GB8.5 GB12 GB
Q8_0Practically lossless8.5 GB10 GB14 GB
BF16Full precision16 GB18 GB21 GB

KV cache note: Grouped-query attention with 8 KV heads: 2 x 32 layers x 8 x 128 dims x 2 bytes = 131,072 bytes (128 KiB) per token. That is about 1.1GB at 8K context and 17GB at the full 128K.

Performance

How fast Llama 3.1 8B Instruct runs

Single-user generation speed on popular GPUs that fit the model entirely in memory, at the best quantization each can hold.

  1. RTX 5090

    Q8_0 · 32GB

    ~145tok/s

  2. RTX PRO 6000

    Q8_0 · 96GB

    ~145tok/s

  3. RTX PRO 5000 72GB

    Q8_0 · 72GB

    ~110tok/s

  4. RTX 4090

    Q8_0 · 24GB

    ~86tok/s

  5. RTX 5080

    Q8_0 · 16GB

    ~83tok/s

  6. RTX 6000 Ada

    Q8_0 · 48GB

    ~83tok/s

  7. RTX 5070 Ti

    Q8_0 · 16GB

    ~77tok/s

  8. RTX 3090

    Q8_0 · 24GB

    ~73tok/s

  9. M5 Ultra 512GB

    Q8_0 · 512GB

    ~71tok/s

  10. M5 Ultra 256GB

    Q8_0 · 256GB

    ~71tok/s

Estimated (method)

Measured

Llama 3.1 8B Instruct benchmarks

Overview

About Llama 3.1 8B Instruct

Llama 3.1 8B was the default small local model through 2024 and 2025, and it remains a common baseline for fine-tunes and benchmarks. Newer models of the same size, such as Qwen3.5 9B and Gemma 4 E4B, are clearly better at reasoning, coding, and vision, so it is now superseded for new setups. At Q4_K_M it needs about 7GB with 8K context, which fits any 8GB GPU or 16GB Mac, and a 12GB card can run the near-lossless Q8_0. Its 128K context is real, but the KV cache grows to about 17GB at full length.

Strengths

  • +Runs on any 8GB GPU at Q4_K_M with room for 8K context
  • +The most fine-tuned base model around, with thousands of community variants
  • +Mature support in every runtime, from llama.cpp and Ollama to vLLM and MLX
  • +Predictable, well-understood behavior for chat and simple writing tasks

Weaknesses

  • −Clearly behind 2026 models of the same size on reasoning, math, and coding
  • −Text only, with no vision input and no reasoning mode
  • −Large KV cache for long contexts (about 1.1GB per 8K tokens)
  • −Llama license imposes use restrictions and attribution requirements
ChatWritingMultilingual

Setup

How to run Llama 3.1 8B Instruct

Ollama
$ ollama run llama3.1:8b
llama.cpp
$ llama-server -hf bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M -c 8192 -ngl 99
MLX (Mac)
$ mlx_lm.chat --model mlx-community/Meta-Llama-3.1-8B-Instruct-4bit

Weights: meta-llama/Llama-3.1-8B-Instruct · GGUF: bartowski/Meta-Llama-3.1-8B-Instruct-GGUF

Alternatives

Frequently asked questions

How much VRAM do you need to run Llama 3.1 8B Instruct?

About 6.7GB at Q4_K_M with 8K tokens of context: 4.9GB of weights, 1.1GB of KV cache, and 0.7GB of runtime overhead. Higher-precision quants and longer contexts need more; see the table above.

What is the cheapest GPU that can run Llama 3.1 8B Instruct?

The smallest card in our database that runs it comfortably is the RTX 5060 (8GB), at Q4_K_M and ~68 tokens/sec.

Is Llama 3.1 8B Instruct free for commercial use?

Llama 3.1 8B Instruct is released under the Llama 3.1 Community License. Commercial use is allowed with some conditions; read the license before shipping a product.

How long a context does Llama 3.1 8B Instruct support?

Up to 131,072 tokens (128K). Long contexts need a lot of extra memory for the KV cache, so most local setups run 8K to 32K.

Sources: Llama 3.1 8B Instruct model card (Hugging Face), modelfit.io GGUF file sizes for Llama 3.1 8B. Capability score basis: Llama Builds scale anchor (35 to 40 band), consistent with its Artificial Analysis Intelligence Index v3 standing (October 2025).