Llama Guard 4 12B
Summary
Llama Guard 4 12B is an open-weight language model from Meta, released on 29 Apr 2025. It accepts text and images and generates text, with a 164K-token context window and up to 164K output tokens per response. As of 18 Nov 2026, the lowest listed API price is $0.18 per million input tokens and $0.18 per million output tokens (DeepInfra), across 4 providers we track.
Multimodal Llama 4-based safety classifier for moderating prompts and responses
Last verified 18 Nov 2026. Every figure on this page links to its source.
Specifications
| Developer | Meta |
|---|---|
| Release date | 29 Apr 2025 [models.dev] |
| Status | Generally available [models.dev] |
| Weights | Open weights [Hugging Face] |
| License | llama4 [Hugging Face] |
| Parameters | 12B [Hugging Face] |
| Context window | 164K (163,840 tokens) [models.dev] |
| Max output | 164K tokens [models.dev] |
| Knowledge cutoff | 31 Aug 2024 [OpenRouter] |
| Input | Text and images [models.dev] |
| Output | Text [models.dev] |
| Reasoning mode | No [models.dev] |
| Tool calling | No [models.dev] |
| Structured output | No [models.dev] |
| Hugging Face | meta-llama/Llama-Guard-4-12B [Hugging Face] |
Llama Guard 4 12B API pricing by provider
USD per million tokens. Sorted by input price.
| Provider | Input | Output | Cached input | Context | Source |
|---|---|---|---|---|---|
| NVIDIA NIM meta/llama-guard-4-12b | Free | Free | – | 164K | models.dev, 18 Nov 2026 |
| DeepInfra meta-llama/Llama-Guard-4-12B | $0.18 | $0.18 | – | 164K | models.dev, 18 Nov 2026 |
| Hugging Face Inference Providers meta-llama/Llama-Guard-4-12B | $0.18 | $0.18 | – | 164K | models.dev, 18 Nov 2026 |
| OpenRouter meta-llama/llama-guard-4-12b | $0.18 | $0.18 | – | 164K | OpenRouter, 18 Nov 2026 |
Running Llama Guard 4 12B 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) | 7.3 GB | 8.1 GB | – |
| Q8_0 (8-bit) | 13 GB | 14 GB | – |
| FP16 / BF16 (16-bit) | 24 GB | 25 GB | – |
At 4-bit with an 8K conversation, Llama Guard 4 12B needs about 8.1 GB, so it fits on a graphics card with 10 GB or more, such as the NVIDIA GeForce RTX 3080 10 GB. The model's architecture is not public, so the conversation cache is not included. Check your own hardware, or see Best GPU for local LLMs on our sister site AIPCs.
Frequently asked questions
What is the context window of Llama Guard 4 12B?
Llama Guard 4 12B has a context window of 163,840 tokens (164K) and can generate up to 163,840 tokens in a single response, according to models.dev.
How much does the Llama Guard 4 12B API cost?
Llama Guard 4 12B is listed from $0.18 per million input tokens and $0.18 per million output tokens (DeepInfra). Prices last verified 18 Nov 2026.
Is Llama Guard 4 12B open source?
Llama Guard 4 12B is an open-weight model: its weights are published on Hugging Face as meta-llama/Llama-Guard-4-12B under the llama4 license. Check the license terms before commercial use.
When was Llama Guard 4 12B released?
Meta released Llama Guard 4 12B on 29 Apr 2025, according to models.dev.
Which providers offer Llama Guard 4 12B?
We track Llama Guard 4 12B on 4 providers: NVIDIA NIM, DeepInfra, Hugging Face Inference Providers, OpenRouter.
How much VRAM does Llama Guard 4 12B need?
About 8.1 GB at 4-bit (Q4_K_M) with an 8K-token conversation, and about 14 GB at 8-bit. The 4-bit model fits on a graphics card with 10 GB or more, such as the NVIDIA GeForce RTX 3080 10 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 Small 3.1 24B | Mistral AI | 17 Mar 2025 | 128K | $0.10 | $0.30 | Open |
| ERNIE 4.5 21B A3B | Baidu | 30 Jun 2025 | 120K | $0.07 | $0.28 | Open |
| Mistral Small 3.2 24B | Mistral AI | 20 Jun 2025 | 256K | $0.10 | $0.30 | Open |
| Gemma 3 27B IT | Google DeepMind | 12 Mar 2025 | 131K | $0.08 | $0.16 | Open |
| UI-TARS 7B | Bytedance | 22 Jul 2025 | 128K | $0.10 | $0.20 | Open |
| Nvidia Nemotron Nano 9B V2 | NVIDIA | 18 Aug 2025 | 131K | $0.06 | $0.23 | Open |
Change history
- Max output changed from 16K to 164K
- Max output changed from 164K to 16K
- Max output changed from 16K to 164K
- Max output changed from 164K to 16K
- Max output changed from 16K to 164K
- Max output changed from 164K to 16K
- Max output changed from 16K to 164K
- Max output changed from 164K to 16K
- Max output changed from 16K to 164K
- Max output changed from 164K to 16K
- Max output changed from 16K to 164K
- Now listed on Hugging Face Inference Providers
- Release date changed from 30 Apr 2025 to 29 Apr 2025
- Input modalities changed from image, text to text, image
- Now listed on DeepInfra
- Now listed on NVIDIA NIM
Sources
- https://openrouter.ai/meta-llama/llama-guard-4-12b
- https://github.com/sst/models.dev/blob/dev/providers/huggingface/models/meta-llama/Llama-Guard-4-12B.toml
- https://huggingface.co/meta-llama/Llama-Guard-4-12B
- https://github.com/sst/models.dev/blob/dev/providers/openrouter/models/meta-llama/llama-guard-4-12b.toml
- https://github.com/sst/models.dev/blob/dev/providers/nvidia/models/meta/llama-guard-4-12b.toml
- https://github.com/sst/models.dev/blob/dev/providers/deepinfra/models/meta-llama/Llama-Guard-4-12B.toml