LLaMA Guard 3 logo

LLaMA Guard 3

Visit

Llama Guard 3 is Meta's Llama 3.1-based safety classifier that labels prompts and responses safe or unsafe across 14 hazard categories in 8 languages.

Share:
View alternatives

Llama Guard 3 is a Meta safety classifier. The 8B version, described on its Hugging Face model card, is a fine-tuned version of Llama-3.1-8B with about 8B parameters in BF16. It classifies both user prompts and model responses as safe or unsafe and, when unsafe, lists the violated categories. It is a guardrail model, not a general chatbot.

Key Features

  • Hazard taxonomy: 14 categories (S1 to S14), based on the MLCommons taxonomy of 13 hazards plus Code Interpreter Abuse for tool-use cases.
  • Prompt and response classification: the same model checks inputs and outputs. Safety scores come from the probability of the first output token.
  • Languages: English, French, German, Hindi, Italian, Portuguese, Spanish, and Thai.
  • Quantized option: an INT8 version is available, which the card says cuts checkpoint size by about 40%.
  • Tooling: works with Hugging Face transformers version 4.43 or later, and is available through vLLM and SGLang.
  • Vendor evaluation: according to Meta's model card, it outperforms Llama Guard 2 and GPT-4 on Meta's internal English, multilingual, and tool-use tests, with lower false positive rates. These are vendor results.

License

The 8B model is released under the Llama 3.1 Community License. Access requires accepting the terms and the Acceptable Use Policy.

Use Cases

  • Filtering user input before it reaches an LLM.
  • Screening model output before it is shown to users.
  • Adding a hazard-category label to moderation logs for tool-using agents.

Limitation: the card does not state a context window, so check input length against your own tests. Classification quality depends on how well the hazard taxonomy matches your policy.

Newer Model

Meta's Llama Guard 4 12B model card describes a natively multimodal safety classifier with 12 billion parameters, pruned from Llama 4 Scout. It combines the capabilities of Llama Guard 3-8B and Llama Guard 3-11B-vision, supports multiple images in one prompt, and, per Meta, roughly matches or exceeds Llama Guard 3's overall performance. Its license is the Llama 4 Community License.

Getting Started

  1. Request access on the model card and accept the license.
  2. Load the model with transformers 4.43 or later, or serve it with vLLM or SGLang.
  3. Send the conversation through the chat template and read the safe or unsafe label and any category codes.
  4. Test it against your own policy examples before relying on it in production.

FAQ

What does Llama Guard 3 classify?

Prompts and responses, as safe or unsafe, with violated categories listed.

How many hazard categories does it use?

14, S1 to S14.

Which languages does it support?

English, French, German, Hindi, Italian, Portuguese, Spanish, and Thai.

Is there a newer version?

Yes, Meta published Llama Guard 4 12B, a multimodal classifier that combines the text and vision Guard 3 models.

Alternatives

Conclusion

Llama Guard 3 is a practical open guardrail model for text moderation in eight languages. Read the model card for usage details and browse more models in the models category.

Comments

No comments yet. Be the first to comment!