AI Agent Hub
Back to models
Llama-Guard-4-12B logo

Llama-Guard-4-12B

Open Source meta-llama Released 2025-04-29
-- 12.0B params 163.8K context Open Source

About this model

Llama Guard 4 12B is Meta's natively multimodal safety classifier for filtering harmful content in LLM prompts and responses. Released in April 2025 under the Llama 4 Community License, it acts as a generative classifier: given text or mixed text-and-image input, it outputs whether content is safe or unsafe and, when unsafe, which MLCommons hazard categories (S1–S14) were violated. It unifies the prior Llama Guard 3-8B text and Llama Guard 3-11B-vision image capabilities into one model and adds multi-image prompt support.

Architecturally, Llama Guard 4 is a dense early-fusion transformer pruned from the Llama 4 Scout MoE checkpoint by removing routed experts and router layers while retaining shared-expert feedforward weights, yielding 12 billion parameters with no additional pre-training. Post-training blends Llama Guard 3 data with new multi-image (typically 2–5 images per sample) and multilingual annotations at roughly a 3:1 text-to-multimodal ratio. It shares the Llama 4 Scout/Maverick tokenizer and vision encoder and supports a 163,840-token context window.

On Meta's in-house safety test set (output filtering, categories S1–S13), English text reaches 69% recall, 11% false-positive rate, and 61% F1; multilingual text reaches 43% recall, 3% FPR, and 51% F1; single-image prompts reach 41% recall and 38% F1; multi-image prompts reach 61% recall and 52% F1—generally matching or exceeding Llama Guard 3 baselines. It can serve as input filtering, output filtering, or both in moderation pipelines alongside Llama 3/4 models and is integrated into Meta's Llama Moderations API.

Technical Specs

  • Parameters: 12.0B
  • Architecture: Early-fusion Transformer
  • Context Window: 163,840 tokens
  • Input Modalities: text, image

Hardware Requirements

  • VRAM: 24.0 GB
  • Compute: Single NVIDIA GPU with 24GB VRAM (bfloat16 inference)

Pricing

Input Output Currency
0.18 / 1M tokens 0.18 / 1M tokens USD