Meta

Llama 3.1 8B Instruct

Generally availableOpen weights128K context

Summary

Llama 3.1 8B Instruct is an open-weight language model from Meta, released on 23 Jul 2024. It accepts text and generates text, with a 128K-token context window and up to 8K output tokens per response. As of 18 Nov 2026, the lowest listed API price is $0.02 per million input tokens and $0.04 per million output tokens (OpenRouter), across 4 providers we track.

Open Llama instruction model for multilingual chat, reasoning, and coding

Last verified 18 Nov 2026. Every figure on this page links to its source.

Specifications

DeveloperMeta
Release date23 Jul 2024 [models.dev]
StatusGenerally available [models.dev]
WeightsOpen weights [Hugging Face]
Licensellama3.1 [Hugging Face]
Parameters8B [Hugging Face]
Context window128K (128,000 tokens) [models.dev]
Max output8K tokens [models.dev]
Knowledge cutoffDec 2023 [models.dev]
InputText [models.dev]
OutputText [models.dev]
Reasoning modeNo [models.dev]
Tool callingYes [models.dev]
Structured outputYes [models.dev]
Hugging Facemeta-llama/Meta-Llama-3.1-8B-Instruct [Hugging Face]

Llama 3.1 8B Instruct API pricing by provider

USD per million tokens. Sorted by input price.

ProviderInputOutputCached inputContextSource
Novita AI
meta-llama/llama-3.1-8b-instruct
$0.02$0.05–16Kmodels.dev, 18 Nov 2026
OpenRouter
meta-llama/llama-3.1-8b-instruct
$0.02$0.04–131KOpenRouter, 18 Nov 2026
Hugging Face Inference Providers
meta-llama/Llama-3.1-8B-Instruct
$0.06$0.06–131Kmodels.dev, 18 Nov 2026
Vercel AI Gateway
meta/llama-3.1-8b
$0.22$0.22–128Kmodels.dev, 18 Nov 2026

Running Llama 3.1 8B Instruct locally

Estimated memory, from the parameter count on Hugging Face. Includes about 0.8 GB of runtime overhead.

QuantizationWeightsTotal, 8K contextTotal, 32K context
Q4_K_M (4-bit)4.9 GB5.7 GB–
Q8_0 (8-bit)8.5 GB9.3 GB–
FP16 / BF16 (16-bit)16 GB17 GB–

At 4-bit with an 8K conversation, Llama 3.1 8B Instruct needs about 5.7 GB, so it fits on a graphics card with 8 GB or more, such as the NVIDIA GeForce RTX 4060 8 GB. The model's architecture is not public, so the conversation cache is not included. Check your own hardware, or see Running local LLMs on an 8 GB GPU on our sister site AIPCs.

Frequently asked questions

What is the context window of Llama 3.1 8B Instruct?

Llama 3.1 8B Instruct has a context window of 128,000 tokens (128K) and can generate up to 8,192 tokens in a single response, according to models.dev.

How much does the Llama 3.1 8B Instruct API cost?

Llama 3.1 8B Instruct is listed from $0.02 per million input tokens and $0.04 per million output tokens (OpenRouter). Prices last verified 18 Nov 2026.

Is Llama 3.1 8B Instruct open source?

Llama 3.1 8B Instruct is an open-weight model: its weights are published on Hugging Face as meta-llama/Meta-Llama-3.1-8B-Instruct under the llama3.1 license. Check the license terms before commercial use.

When was Llama 3.1 8B Instruct released?

Meta released Llama 3.1 8B Instruct on 23 Jul 2024, according to models.dev.

Which providers offer Llama 3.1 8B Instruct?

We track Llama 3.1 8B Instruct on 4 providers: Novita AI, OpenRouter, Hugging Face Inference Providers, Vercel AI Gateway.

How much VRAM does Llama 3.1 8B Instruct need?

About 5.7 GB at 4-bit (Q4_K_M) with an 8K-token conversation, and about 9.3 GB at 8-bit. The 4-bit model fits on a graphics card with 8 GB or more, such as the NVIDIA GeForce RTX 4060 8 GB. These are estimates from the model's published parameter count.

Similar models from other labs

Comparable on output type, weights, release date, price and context window. Prices are the lowest listed, USD per million tokens.

ModelLabReleasedContextInput $/1MOutput $/1MWeights
Mistral NemoMistral AI18 Jul 2024131K$0.03$0.03Open
Ministral 3BMistral AI16 Oct 2024131K$0.04$0.04Open
Command R7BCohere13 Dec 2024128K$0.04$0.15Open
Qwen2.5-Coder-32B-InstructAlibaba (Qwen)12 Nov 2024131K$0.06$0.20Open
Qwen/Qwen2.5-7B-InstructAlibaba (Qwen)19 Sept 202433K$0.05$0.05Open
Gemma 3 12B ITGoogle DeepMind12 Mar 2025131K$0.05$0.10Open

Change history

  • Context window changed from 131K to 128K
  • Max output changed from 4K to 8K
  • Name changed from Llama-3.1-8B-Instruct to Llama 3.1 8B Instruct
  • Tool calling changed from no to yes
  • Max output changed from 16K to 4K
  • Context window changed from 16K to 131K
  • Context window changed from 128K to 16K
  • Name changed from Llama 3.1 8B Instruct to Llama-3.1-8B-Instruct
  • Tool calling changed from yes to no
  • Max output changed from 8K to 16K
  • Context window changed from 131K to 128K
  • Max output changed from 16K to 8K
  • Name changed from Llama-3.1-8B-Instruct to Llama 3.1 8B Instruct
  • Context window changed from 128K to 131K
  • Max output changed from 8K to 16K
  • Name changed from Llama 3.1 8B Instruct to Llama-3.1-8B-Instruct
  • OpenRouter price changed: input $0.05 → $0.02, output $0.08 → $0.04 per 1M tokens
  • Context window changed from 131K to 128K
  • Max output changed from 4K to 8K
  • Name changed from Llama-3.1-8B-Instruct to Llama 3.1 8B Instruct
  • No longer listed on cloudflare-workers-ai
  • Tool calling changed from no to yes
  • Structured output changed from no to yes
  • Name changed from Llama 3.1 8B Instruct fp8 to Llama-3.1-8B-Instruct
  • Context window changed from 32K to 131K

Sources