Skip to main content
Lab publication Credible

Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations

Introduces Llama Guard, an input-output safeguard built by instruction-tuning Llama 2-7B on a curated safety-risk taxonomy. The model classifies both user prompts and model responses as safe or unsafe and names the violated categories, and its weights were released publicly. On benchmarks including the OpenAI Moderation Evaluation dataset and ToxicChat, it matched or exceeded the content-moderation tools available at the time.

Publisher

Meta AI

Published

7 Dec 2023

Added

today

DOI

Key Findings

  • Treats conversational safety as two separate classification jobs: prompt-harm and response-harm, each judged against an explicit category taxonomy
  • Instruction-tuned from Llama 2-7B on a curated dataset, with model weights released publicly for adaptation
  • Matched or exceeded contemporary moderation tools on the OpenAI Moderation Evaluation dataset and ToxicChat

Methodology Notes

Technical report (arXiv preprint) from the model's own developers, not an independent evaluation; the benchmark numbers are the authors' own runs on public moderation datasets.

Sources

arXiv preprint (primary)

Authors

Hakan Inan, Kartikeya Upasani, Jianfeng Chi, Rashi Rungta, Krithika Iyer, Yuning Mao, Michael Tontchev, Qing Hu, Brian Fuller, Davide Testuggine, Madian Khabsa

Tags

llama-guardmetaguardrail-modelcontent-moderationopen-weights

Cite This

APA

Hakan Inan et al. (2023). Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations. Meta AI. https://arxiv.org/abs/2312.06674