Meta

Llama Guard 4 12B

Generally availableOpen weights164K context

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

DeveloperMeta
Release date29 Apr 2025 [models.dev]
StatusGenerally available [models.dev]
WeightsOpen weights [Hugging Face]
Licensellama4 [Hugging Face]
Parameters12B [Hugging Face]
Context window164K (163,840 tokens) [models.dev]
Max output164K tokens [models.dev]
Knowledge cutoff31 Aug 2024 [OpenRouter]
InputText and images [models.dev]
OutputText [models.dev]
Reasoning modeNo [models.dev]
Tool callingNo [models.dev]
Structured outputNo [models.dev]
Hugging Facemeta-llama/Llama-Guard-4-12B [Hugging Face]

Llama Guard 4 12B API pricing by provider

USD per million tokens. Sorted by input price.

ProviderInputOutputCached inputContextSource
NVIDIA NIM
meta/llama-guard-4-12b
FreeFree–164Kmodels.dev, 18 Nov 2026
DeepInfra
meta-llama/Llama-Guard-4-12B
$0.18$0.18–164Kmodels.dev, 18 Nov 2026
Hugging Face Inference Providers
meta-llama/Llama-Guard-4-12B
$0.18$0.18–164Kmodels.dev, 18 Nov 2026
OpenRouter
meta-llama/llama-guard-4-12b
$0.18$0.18–164KOpenRouter, 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.

QuantizationWeightsTotal, 8K contextTotal, 32K context
Q4_K_M (4-bit)7.3 GB8.1 GB–
Q8_0 (8-bit)13 GB14 GB–
FP16 / BF16 (16-bit)24 GB25 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.

ModelLabReleasedContextInput $/1MOutput $/1MWeights
Mistral Small 3.1 24BMistral AI17 Mar 2025128K$0.10$0.30Open
ERNIE 4.5 21B A3BBaidu30 Jun 2025120K$0.07$0.28Open
Mistral Small 3.2 24BMistral AI20 Jun 2025256K$0.10$0.30Open
Gemma 3 27B ITGoogle DeepMind12 Mar 2025131K$0.08$0.16Open
UI-TARS 7BBytedance22 Jul 2025128K$0.10$0.20Open
Nvidia Nemotron Nano 9B V2NVIDIA18 Aug 2025131K$0.06$0.23Open

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