AI model comparison
Llama 3.1 8B Instruct vs Llama Guard 4 12B
Compare benchmark results, pricing, and API capabilities for each model. Estimate the cost of your own token mix.
Change models
- Context tokens
- 131.07K
- Input / 1M
- $0.05
- Output / 1M
- $0.08
- Context tokens
- 163.84K
- Input / 1M
- $0.18
- Output / 1M
- $0.18
- Llama 3.1 8B Instruct
- 131.07K
- Llama Guard 4 12B
- 163.84K
The trade-offs
Start with the differences that affect how this model fits your workload.
- Token cost
- For 1 million input tokens and 250,000 output tokens, the listed rates estimate $0.07 for Llama 3.1 8B Instruct and $0.225 for Llama Guard 4 12B.
- Context window
- Llama Guard 4 12B lists 163,840 tokens of context. Llama 3.1 8B Instruct lists 131,072 tokens. Reserve space for the output before routing long inputs.
- Tool calls
- The catalog lists tool calling for Llama 3.1 8B Instruct. Check tool-schema compatibility in the serving endpoint before switching traffic.
Benchmarks
Shared results come from the same published benchmark release. Reasoning effort and serving configuration can differ.
A shared benchmark result is unavailable for these model IDs. See the individual records below for reported results.
View individual benchmark records
These model-level records can include other benchmark releases, test configurations, and vendor-reported results.
Llama 3.1 8B Instruct
| Benchmark | Score | Configuration | Source model label | Evidence |
|---|---|---|---|---|
| GSM8K | 84.5% | Unavailable | meta-llama/Llama-3.1-8B-Instruct | Result source · Test method |
| MMLU-Pro | 48.3% | Unavailable | meta-llama/Llama-3.1-8B-Instruct | Result source · Test method |
| GPQA Diamond | 30.4% | Unavailable | meta-llama/Llama-3.1-8B-Instruct | Result source · Test method |
Llama Guard 4 12B
No additional benchmark results are available for this model ID.
Pricing and token cost
Listed OpenRouter prices in US dollars. Actual charges depend on the endpoint, tier, cache, and token mix.
| USD per million tokens | Llama 3.1 8B Instruct | Llama Guard 4 12B |
|---|---|---|
| Uncached input | $0.05 | $0.18 |
| Output | $0.08 | $0.18 |
| Cache read | $0.025 | Unavailable |
| Cache write | Unavailable | Unavailable |
Rates are a catalog snapshot. OpenRouter Models API
Estimate your workload
Enter total token counts. The estimate uses uncached input and output rates.
Llama 3.1 8B Instruct costs $0.155 less at this token mix.
Model specifications
Context, output limits, modalities, and supported API parameters from the catalog.
| Specification | Llama 3.1 8B Instruct | Llama Guard 4 12B |
|---|---|---|
| Catalog status | Listed | Listed |
| Catalog model ID | meta-llama/llama-3.1-8b-instruct | meta-llama/llama-guard-4-12b |
| Provider | Meta | Meta |
| Context window | 131,072 tokens | 163,840 tokens |
| Max output | 117,964 tokens | 16,384 tokens |
| Input modalities | Text | Image, Text |
| Output modalities | Text | Text |
| Reasoning controls | Unverified | Unverified |
| Tool calling | Listed | Unverified |
| Structured outputs | Listed | Unverified |
| Serving endpoints | /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses | /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses |
| Catalog listing date | Jul 23, 2024 | Apr 30, 2025 |
Use with Weave Router
Set a quality bar on your own coding tasks. Then compare cost per completed task and use the same harness when you change models.
Llama 3.1 8B Instruct
Weave Router availability is unverified for this model ID.
Llama Guard 4 12B
Weave Router availability is unverified for this model ID.
Catalog presence does not guarantee availability for a specific plan or account. Public Weave Router catalog · Nov 27, 2026
Sources
Each benchmark links to its own result and test method when available.
- OpenRouter Models API · token rates and catalog specifications
- Weave Router catalog · verified Router model IDs
- Llama 3.1 8B Instruct catalog entry
- Llama 3.1 8B Instruct model repository
- Llama Guard 4 12B catalog entry
- Llama Guard 4 12B model repository