Llama 3.1 8B Instruct
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
| Developer | Meta |
|---|---|
| Release date | 23 Jul 2024 [models.dev] |
| Status | Generally available [models.dev] |
| Weights | Open weights [Hugging Face] |
| License | llama3.1 [Hugging Face] |
| Parameters | 8B [Hugging Face] |
| Context window | 128K (128,000 tokens) [models.dev] |
| Max output | 8K tokens [models.dev] |
| Knowledge cutoff | Dec 2023 [models.dev] |
| Input | Text [models.dev] |
| Output | Text [models.dev] |
| Reasoning mode | No [models.dev] |
| Tool calling | Yes [models.dev] |
| Structured output | Yes [models.dev] |
| Hugging Face | meta-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.
| Provider | Input | Output | Cached input | Context | Source |
|---|---|---|---|---|---|
| Novita AI meta-llama/llama-3.1-8b-instruct | $0.02 | $0.05 | – | 16K | models.dev, 18 Nov 2026 |
| OpenRouter meta-llama/llama-3.1-8b-instruct | $0.02 | $0.04 | – | 131K | OpenRouter, 18 Nov 2026 |
| Hugging Face Inference Providers meta-llama/Llama-3.1-8B-Instruct | $0.06 | $0.06 | – | 131K | models.dev, 18 Nov 2026 |
| Vercel AI Gateway meta/llama-3.1-8b | $0.22 | $0.22 | – | 128K | models.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.
| Quantization | Weights | Total, 8K context | Total, 32K context |
|---|---|---|---|
| Q4_K_M (4-bit) | 4.9 GB | 5.7 GB | – |
| Q8_0 (8-bit) | 8.5 GB | 9.3 GB | – |
| FP16 / BF16 (16-bit) | 16 GB | 17 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.
| Model | Lab | Released | Context | Input $/1M | Output $/1M | Weights |
|---|---|---|---|---|---|---|
| Mistral Nemo | Mistral AI | 18 Jul 2024 | 131K | $0.03 | $0.03 | Open |
| Ministral 3B | Mistral AI | 16 Oct 2024 | 131K | $0.04 | $0.04 | Open |
| Command R7B | Cohere | 13 Dec 2024 | 128K | $0.04 | $0.15 | Open |
| Qwen2.5-Coder-32B-Instruct | Alibaba (Qwen) | 12 Nov 2024 | 131K | $0.06 | $0.20 | Open |
| Qwen/Qwen2.5-7B-Instruct | Alibaba (Qwen) | 19 Sept 2024 | 33K | $0.05 | $0.05 | Open |
| Gemma 3 12B IT | Google DeepMind | 12 Mar 2025 | 131K | $0.05 | $0.10 | Open |
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
- https://openrouter.ai/meta-llama/llama-3.1-8b-instruct
- https://github.com/sst/models.dev/blob/dev/providers/vercel/models/meta/llama-3.1-8b.toml
- https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct
- https://github.com/sst/models.dev/blob/dev/providers/huggingface/models/meta-llama/Llama-3.1-8B-Instruct.toml
- https://github.com/sst/models.dev/blob/dev/providers/novita-ai/models/meta-llama/llama-3.1-8b-instruct.toml