Lattice
Skip to content

Llama Guard

librarySelf-hostedai.meta.com

Llama Guard is a self-hosted library in the Guardrails & Safety layer of the AI stack. Safety classifier for prompt and response moderation.

By Facts verifiedmethod

Licence
Llama-3.1-Community
Language
Python
Cost
free
Owned by
Production & Governance

Use Llama Guard when

One classifier covering both prompt and response moderation.

Skip Llama Guard when

You need domain-specific policy enforcement.

Stops the bad input before it, and the bad output after. See every guardrails tool.

Badge this entry
Lattice badge: Llama Guard verified 2026-09
[![Llama Guard on Lattice: verified 2026-09](https://lattice.kunjshah.in/guardrails-safety/llama-guard/badge.svg)](https://lattice.kunjshah.in/guardrails-safety/llama-guard)

Rules of thumb

  • A guardrail without an eval is a guess about which failures matter. Write the eval that found the failure, then the guardrail that blocks it.
  • PII is a data-flow problem. Detect and redact before the model ever sees it, not after it answers.
  • Every guardrail in the request path adds latency to every call. Run checks offline first and move them inline only when production forces it.

Quick answers

Is Llama Guard open source?
Not under an OSI-approved licence. Llama Guard is source-available under Llama-3.1-Community, which restricts some commercial uses. It is free to use.
What are the alternatives to Llama Guard?
The closest alternatives to Llama Guard are Lakera Guard and NeMo Guardrails.

Ask an AI about this page

Opens the assistant with this page’s link and a question already filled in.

Reading on guardrails

Alternatives to Llama Guard

Listed as an alternative to

  • NeMo Guardrails
  • Lakera Guard

Also in guardrails

  • NeMo Guardrails
  • Guardrails AI
  • Microsoft Presidio
  • Lakera Guard
  • garak
  • PyRIT
  • Invariant Guardrails