---
title: "Welcoming Llama Guard 4 on Hugging Face Hub"
description: "Llama Guard 4 is a 12B dense multimodal safety classifier pruned from Llama 4 Scout by dropping all routed MoE experts and keeping only the shared expert, then post-trained on 3:1 text-to-multimodal data."
url: "https://swe.quest/articles/welcoming-llama-guard-4-on-hugging-face-hub-b5b2c79d602c7f1b"
canonical: "https://huggingface.co/blog/llama-guard-4"
source: "Hugging Face"
published: "2025-04-29"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 6
tags: ["ai-safety","llms","inference"]
---

# Welcoming Llama Guard 4 on Hugging Face Hub

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2025-04-29, 6 min read, Announcement. Original: [https://huggingface.co/blog/llama-guard-4](https://huggingface.co/blog/llama-guard-4)

## Summary

Llama Guard 4 is a 12B dense multimodal safety classifier pruned from Llama 4 Scout by dropping all routed MoE experts and keeping only the shared expert, then post-trained on 3:1 text-to-multimodal data. It flags 14 MLCommons hazard categories plus code interpreter abuse in both prompts and model responses, fits on a single 24 GB GPU, and lets users exclude categories through the chat template. Compared with Llama Guard 3 it gains notably on multi-image inputs (+20% recall, +17% F1), while multilingual performance is flat. Meta also released Llama Prompt Guard 2 classifiers (86M and 22M) for binary jailbreak and prompt-injection detection, with transformers code examples for both.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI safety](https://swe.quest/tags/ai-safety.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)

## Prerequisites

- Hugging Face transformers
- LLM chat templates ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

Llama Guard 4, Llama Prompt Guard 2, Llama 4 Scout, Hugging Face transformers, MLCommons hazard taxonomy

## Related posts

- [AprielGuard: A Guardrail for Safety and Adversarial Robustness in Modern LLM Systems](https://swe.quest/articles/aprielguard-a-guardrail-for-safety-and-adversarial-robustness-in-modern-llm-be1690a9de4ab65c.md): Hugging Face · 2025-12-23 · Medium · 10 min read · AI safety, LLMs, AI agents, Evaluation, Model training
  AprielGuard is an 8B-parameter guardrail model from ServiceNow that classifies 16 categories of safety risk and flags adversarial attacks such as jailbreaks and prompt injections.
- [An Introduction to AI Secure LLM Safety Leaderboard](https://swe.quest/articles/an-introduction-to-ai-secure-llm-safety-leaderboard-3389612600bb2dd0.md): Hugging Face · 2024-01-26 · Easy · 5 min read · Evaluation, AI safety, LLMs
  The LLM Safety Leaderboard, built on the Hugging Face leaderboard template, ranks open and closed models using DecodingTrust, a NeurIPS 2023 evaluation framework covering eight trustworthiness perspectives: toxicity, stereotype bias, adversarial robustness, OOD robustness, adversarial demonstrations, privacy, machine ethics and fairness.
- [Introducing the Red-Teaming Resistance Leaderboard](https://swe.quest/articles/introducing-the-red-teaming-resistance-leaderboard-e6f29b275caeecf9.md): Hugging Face · 2024-02-23 · Easy · 6 min read · AI safety, Evaluation, LLMs
  The Red-Teaming Resistance leaderboard from Haize Labs and Hugging Face scores LLMs on how often they safely refuse realistic, human-written jailbreak prompts.
- [Nemotron 3.5 Content Safety: Customizable Multimodal Safety for Global Enterprise AI](https://swe.quest/articles/nemotron-3-5-content-safety-customizable-multimodal-safety-for-global-9ddbaf1d8503c5c0.md): Hugging Face · 2026-06-04 · Easy · 10 min read · AI safety, LLMs, Model training, Evaluation
  Nemotron 3.5 Content Safety is a 4B-parameter guard model, a LoRA fine-tune of Gemma 3 4B IT, that classifies a user prompt, an optional image and an optional assistant response together in one pass.
- [CyberSecEval 2 - A Comprehensive Evaluation Framework for Cybersecurity Risks and Capabilities of Large Language Models](https://swe.quest/articles/cyberseceval-2-a-comprehensive-evaluation-framework-for-cybersecurity-risks-and-b77206af9c9d754e.md): Hugging Face · 2024-05-24 · Easy · 5 min read · Evaluation, AI safety, LLMs, Application security
  CyberSecEval 2 is Meta's open-source benchmark suite measuring LLM cybersecurity risks across five areas: insecure code generation (mapped to CWE), prompt injection susceptibility, compliance with cyber-attack requests versus false refusals of benign prompts, code interpreter abuse, and automated CTF-style exploitation.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
