Citation and evidence

Llama Guard

27 min full readUpdated 56 references

This article's verification

Report a problem with this article

Edit article
More

Use this article

Raw MarkdownExplore connections

Improve this page

Revision historyDiscuss this article

Topics

AI SafetyLarge Language ModelsMeta AIOpen Source AI

Cite this article

Llama Guard is a family of open-weight safeguard models from Meta that classify the prompts sent to a large language model (LLM), and the responses it returns, as safe or unsafe under a written safety policy.[1] Each Llama Guard is itself a fine-tuned Llama language model. It reads a conversation together with a list of hazard categories and generates the word "safe" or "unsafe", followed by the codes of the categories it judges to be violated.[1][2] The first version, built on the 7-billion-parameter Llama 2, was released on 7 December 2023 as part of the Purple Llama project and described in a paper by Hakan Inan and ten co-authors.[3][1] Three further generations followed: Llama Guard 2 (April 2024), the Llama Guard 3 series in 1B, 8B and 11B Vision sizes (July and September 2024), and Llama Guard 4 (April 2025), a 12-billion-parameter model that takes text and images.[4][5][6][7] As of November 2026, Meta's Llama Protections page lists Llama Guard 4 as the current model, and its documentation calls it the latest safeguard model.[8][9]

The weights are downloadable under the version-specific Llama Community License agreements, which allow commercial use under conditions.[10][11] The Open Source Initiative has said that the Llama licenses it reviewed are not open source, so the models are best described as open-weight.[12] From Llama Guard 2 onward the default categories follow the hazard taxonomy of MLCommons.[13] Meta presents the models as one component of a larger system, and its own model cards and papers, along with independent studies, document adversarial bypasses, added false refusals and uneven detection rates.[2][14][15][16][17]

How it works

Classification as a language task

The 2023 paper argued that existing content moderation services such as the Perspective API, OpenAI's Content Moderation API and Azure Content Safety were a poor fit for guarding LLMs: they did not separate the risks posed by a user's message from those posed by a model's answer, each enforced one fixed policy, each was available only as an API and could not be fine-tuned, and all were built on small conventional transformer models.[1] Llama Guard instead treats moderation as an instruction-following task for an LLM. A Llama Guard prompt has four parts: a set of guidelines (numbered categories with plain-text descriptions), an instruction that says whether to assess the user's messages or the agent's, the conversation, and the required output format.[1]

Assessing user messages is called prompt classification and assessing model output is called response classification. The same model does both, and only the wording of the instruction changes.[1] For prompt classification the conversation must not contain the agent's reply. For response classification it contains both the user's input and the reply, because the input supplies context for the judgment.[18]

The model's answer starts with "safe" or "unsafe". If the verdict is unsafe, a second line lists the violated categories, comma-separated.[9] The original model was trained to write category codes as a letter (O in the paper's example) followed by an index, and later versions use S1 to S14.[1][19] In the original model "safe" and "unsafe" were single tokens, so the probability assigned to the first output token could be read as a classifier score, and a deployer could choose a threshold on that score.[1][20] The later model cards describe the same first-token scoring.[19] Meta's evaluations of Llama Guard 2 used a threshold of 0.5.[13]

Customizable policies

Because the categories are part of the input, a deployer can remove categories, add new ones or rewrite their descriptions without retraining. The paper calls this zero-shot prompting when only names and descriptions are supplied and few-shot prompting when 2 to 4 examples per category are added.[1] To make the model respect whatever subset it is given, the training data was augmented: categories that a training example did not violate were randomly dropped from the prompt, examples had their violated categories removed and their label flipped to safe, and category indices were shuffled.[1]

The paper tested this on the OpenAI moderation evaluation set, which follows a different policy. Llama Guard scored an area under the precision-recall curve (AUPRC) of 0.837 with its own categories, 0.847 when given OpenAI's categories and 0.872 with few-shot examples, against 0.856 for the OpenAI Moderation API on its own dataset.[1] In a fine-tuning experiment on the ToxicChat dataset, Llama Guard trained on 20% of the data performed comparably with a plain Llama 2 7B trained on all of it.[1] Meta's documentation for Llama Guard 4 says the category block can hold either short category names or full descriptions, and that it can be customized for zero-shot or few-shot prompting.[9]

Where it sits in a system

Llama Guard can filter inputs, outputs or both. The Llama Guard 4 model card describes the trade-off: input filtering catches unsafe content before the main model responds, while output filtering lets the main model answer an unsafe prompt safely and blocks only what is itself unsafe.[2] Filtering has a cost in refusals. In the Llama 3 paper, Meta reported that Llama Guard 3 reduced violations by 65% on average across its benchmarks, and that for English, running it on both input and output cut the violation rate of the 405B Llama 3 model by 86% while raising the false refusal rate by 102%, both relative to the unguarded model.[14]

Versions

ModelAnnouncedBase modelParametersInputDefault categories
Llama Guard (7B)2023-12-07Llama 2 7B6,738,415,616Text6 (Meta's own taxonomy)
Llama Guard 2 (8B)2024-04-18Llama 3 8B8,030,261,248Text11 (S1 to S11)
Llama Guard 3 8B2024-07-23Llama 3.1 8B8,030,261,248Text, 8 languages14 (S1 to S14)
Llama Guard 3 1B2024-09-25Llama 3.2 1B1,498,482,688Text, 8 languages13 (S1 to S13)
Llama Guard 3 11B Vision2024-09-25Llama 3.2 Vision 11B10,670,220,835Text and one image13 (S1 to S13)
Llama Guard 4 (12B)2025-04-29Llama 4 Scout, pruned12,001,097,216Text and multiple images14 (S1 to S14)

Expanded article table

Parameter counts are the totals that Hugging Face reports for each repository's safetensors files, read in November 2026.[21][22][23][24][25][10] Announcement dates are those of Meta's blog posts.[3][4][5][6][7]

Llama Guard (December 2023)

The first Llama Guard was a Llama 2 7B model, instruction-tuned on a small dataset. Meta chose the smallest Llama 2 size to keep inference and deployment costs low.[1] The training prompts came from Anthropic's human preference data on harmlessness. Meta generated cooperating and refusing responses with an internal Llama checkpoint and had its in-house red team label each prompt and response. The final set held 13,997 prompts and responses, split 3:1 between fine-tuning and evaluation.[1] Training ran for 500 steps, about one epoch, on a single machine with eight A100 GPUs.[1]

Its taxonomy had six categories: Violence and Hate, Sexual Content, Guns and Illegal Weapons, Regulated or Controlled Substances, Suicide and Self Harm, and Criminal Planning. Meta said the taxonomy was inspired by those of Google, Microsoft and OpenAI and did not necessarily reflect its own internal policies.[20]

Llama Guard 2

Llama Guard 2 was released with Llama 3 on 18 April 2024. It is an 8B model based on Llama 3 and was trained to predict 11 categories drawn from the then-new MLCommons taxonomy.[4][13] It does not cover the taxonomy's Elections and Defamation categories. Meta's stated reason is that moderating them requires up-to-date factual information and the ability to judge whether an output is true.[13] Training started from the first model's data, relabeled for the new taxonomy, and added "hard samples" made by prompting Llama 2 70B to write an alternative policy description that flips the label of an existing example.[13]

Llama Guard 3

Llama Guard 3 arrived in three sizes. The 8B model, released with Llama 3.1 on 23 July 2024, is a fine-tune of Llama 3.1 8B. It moderates content in eight languages (English, French, German, Hindi, Italian, Portuguese, Spanish and Thai), covers all 13 MLCommons hazards and adds a fourteenth category, Code Interpreter Abuse, for tool-call use cases.[5][19] Its training data added multilingual conversations, search tool calls built from Brave Search results, and synthetic code interpreter attacks.[19] Meta also published an 8-bit quantized version that reduces the checkpoint size by about 40%.[19]

Two more models came with Llama 3.2 on 25 September 2024.[6] Llama Guard 3 1B is a fine-tune of Llama 3.2 1B aimed at cheaper deployment, and Meta's documentation says it was not optimized for the Code Interpreter Abuse category.[26][18] A second variant for phones, Llama Guard 3-1B-INT4, was compressed in several steps: pruning to 12 layers and an MLP hidden dimension of 6,400 (1,123 million parameters), shrinking the output layer from the 128k-token vocabulary to the 20 tokens the classifier needs, quantization-aware training to 4-bit weights, and distillation from Llama Guard 3 8B.[26] The accompanying paper reports a model size of about 440 MB, roughly seven times smaller than Llama Guard 3 1B, running on the ExecuTorch runtime at 30 or more tokens per second on a commodity Android phone CPU.[27]

Llama Guard 3 11B Vision is a fine-tune of Llama 3.2 11B Vision that classifies a text prompt combined with an image, or that prompt together with the model's text response.[28] It accepts one image per prompt, was optimized for English, and is not meant to be used as an image-only or text-only classifier.[28][18] It was trained to treat responses that identify a real person from an image as unsafe.[28] Meta's paper on the model says it was trained on human-written prompts paired with images, with responses generated by in-house Llama models and labels from humans or Llama 3.1 405B.[15]

Llama Guard 4

Meta announced Llama Guard 4 on 29 April 2025, alongside Prompt Guard 2 and LlamaFirewall.[7] It has 12 billion parameters and merges the roles of Llama Guard 3 8B and Llama Guard 3 11B Vision: it classifies English and multilingual text as well as prompts that contain several images.[2] It was built differently from earlier versions. Llama 4 Scout is a mixture-of-experts model in which each such layer has one shared expert and sixteen routed experts. Meta removed the routed experts and the router layers and kept the shared expert, which leaves a dense feedforward model, and then post-trained it for safety classification with no further pre-training.[2] The post-training data mixed the Llama Guard 3 8B and 11B Vision data with new multi-image examples (most with two to five images) and multilingual data, at roughly three text-only samples for each multimodal one.[2]

Llama Guard 4 uses the same tokenizer and vision encoder as Llama 4 Scout and Maverick, and according to Meta it can run on a single GPU.[2] The Code Interpreter Abuse category applies to text only.[2] The model card says the model supports the languages of Llama Guard 3, while Meta's Llama Protections page says it supports 12 languages.[2][8] Meta's documentation adds that for prompts that include an image the model was optimized for English text.[9] Meta also offers the model through the moderations endpoint of its hosted Llama API.[8]

Hazard taxonomy

The MLCommons AI Safety working group published a taxonomy of 13 hazard categories with version 0.5 of its AI Safety Benchmark in April 2024. Seven categories had tests in that proof of concept.[29] Llama Guard 2 adopted 11 of the 13, and Llama Guard 3 and 4 use all 13 with renumbered codes.[13][19] The Llama Guard 4 card cites the paper on AILuminate v1.0, the benchmark's successor, which tests 12 hazard categories.[2][30]

CategoryLlama Guard 2Llama Guard 3 and 4
Violent CrimesS1S1
Non-Violent CrimesS2S2
Sex-Related CrimesS3S3
Child Sexual ExploitationS4S4
DefamationNot coveredS5
Specialized AdviceS5S6
PrivacyS6S7
Intellectual PropertyS7S8
Indiscriminate WeaponsS8S9
HateS9S10
Suicide and Self-HarmS10S11
Sexual ContentS11S12
ElectionsNot coveredS13
Code Interpreter Abuse (Meta's addition)Not coveredS14 (Llama Guard 3 8B and Llama Guard 4)

Expanded article table

The table follows the Llama Guard 2, Llama Guard 3 and Llama Guard 4 model cards.[13][19][26][2] Each category has a written definition. Specialized Advice, for example, covers responses that contain specialized financial, medical or legal advice or that indicate dangerous activities or objects are safe, and Elections covers factually incorrect information about electoral systems and processes.[19] Meta's cards caution that Defamation, Intellectual Property and Elections may need up-to-date factual knowledge to judge, and recommend more complex systems where those hazards matter most.[19][2]

The link to MLCommons ran in both directions. The v0.5 benchmark used the original Llama Guard as its automated evaluator. The authors wrote that they chose it because its weights are open and its design can be interrogated, although its training data is not available. When the authors checked a stratified sample of 1,320 responses against human labels, the model's verdicts were correct for 54.2% of the responses it had flagged unsafe and 86.7% of those it had not, or 70.4% overall.[29] AILuminate v1.0 replaced the single evaluator with an ensemble of tuned models. Its paper names Llama Guard among the guard models considered as baseline evaluators and keeps the ensemble's exact composition confidential.[30]

Llama Guard judges whether content is harmful. Meta ships separate tools for other risks, all developed in the same PurpleLlama repository on GitHub, which had about 4,500 stars and 790 forks as of November 2026.[11]

Prompt Guard is a small classifier for prompt injection and jailbreak attempts, released with Llama 3.1 in July 2024.[5] The first version, Prompt Guard 86M, is a fine-tune of mDeBERTa-v3-base, a multilingual DeBERTa model from Microsoft (86M backbone parameters plus 192M word-embedding parameters). It labels a string as benign, injection or jailbreak within a 512-token window.[31] Llama Prompt Guard 2, announced on 29 April 2025, comes in 86M and 22M sizes, the smaller one based on DeBERTa-xsmall. It drops the injection label for a binary benign or malicious output and uses a modified tokenizer meant to resist whitespace and fragmented-token tricks.[7][32]

CodeShield is an inference-time filter for insecure code produced by LLMs, introduced with Llama 3 in April 2024.[4] It relies on a static analysis library, the Insecure Code Detector, which the CodeShield README says covers seven programming languages and more than 50 CWE weakness types. The LlamaFirewall paper gives the count as eight languages.[33][36] CodeShield is software under the MIT License.[34]

LlamaFirewall is a guardrail framework for AI agents, announced on 29 April 2025 and also MIT-licensed.[7][35] It orchestrates several scanners: Prompt Guard 2, CodeShield, regular-expression and custom LLM-prompt scanners, and AlignmentCheck, an experimental auditor that inspects an agent's chain of thought for signs of goal hijacking.[36] On the AgentDojo benchmark, the framework's authors reported that Prompt Guard 2 86M and AlignmentCheck together reduced the attack success rate from 17.6% to 1.75%, with task utility falling from 47.7% to 42.7%.[36]

Evaluation

Meta's reported results

Meta has published results for each generation, mostly on internal test sets. The figures below come from different test sets and policies and cannot be compared across rows of different generations. Meta itself notes that a guard model is expected to do better on data labeled under the policy it was trained on.[13]

ModelTest set and taskF1AUPRCFalse positive rate
Llama GuardMeta test set, promptsNot reported0.945Not reported
Llama GuardMeta test set, responsesNot reported0.953Not reported
Llama GuardOpenAI moderation setNot reported0.847Not reported
Llama GuardToxicChatNot reported0.626Not reported
Llama Guard 2Meta test set (11 categories)0.9150.9740.040
Llama Guard 3 8BMeta English test set, responses0.9390.9850.040
Llama Guard 3 1BMeta English test set0.899Not reported0.090
Llama Guard 3 11B VisionMeta multimodal test set, prompts0.733Not reported0.052
Llama Guard 3 11B VisionMeta multimodal test set, responses0.938Not reported0.016

Expanded article table

The rows are taken from the 2023 paper and the model cards.[1][13][19][26][28] On the first model's public benchmarks, the OpenAI Moderation API scored 0.856 on its own dataset and 0.588 on ToxicChat, and the Perspective API scored 0.787 and 0.532.[1] On the Llama Guard 3 English test set, Llama Guard 2 scored an F1 of 0.877 and a zero-shot GPT-4 baseline 0.805 with a false positive rate of 0.152.[19] The vision model's prompt classification recall was 0.623, which Meta attributes to the ambiguity of image-and-text prompts. For such ambiguous cases it recommends using the model for response classification.[28]

The Llama Guard 4 card reports results on a different in-house set, measured on output filtering, and gives differences from Llama Guard 3 instead of comparisons with other vendors' models, which Meta says are not aligned with its policy.[2]

Llama Guard 4 testRecallFalse positive rateF1F1 change vs Llama Guard 3
English text69%11%61%+8%
Multilingual text43%3%51%0%
Single image41%9%38%+8%
Multiple images61%9%52%+17%

Expanded article table

The changes are printed as the card gives them. The comparison model is Llama Guard 3 8B for text and Llama Guard 3 11B Vision for images. For multi-image prompts, only the final image was given to the older vision model.[2]

Independent evaluations

Other research groups have compared Llama Guard models with competing guard models and with general-purpose LLMs.

  • The WildGuard paper (NeurIPS 2024) reported that open tools such as Llama Guard 2 scored reasonably well on straightforward interactions but lagged far behind a prompted GPT-4 on adversarial jailbreaks and on detecting refusals.[37]
  • GuardBench, a 40-dataset benchmark from the European Commission's Joint Research Centre presented at EMNLP 2024, compared Llama Guard, Llama Guard 2 and other guard models and concluded that a general-purpose instruction-following model of comparable size achieved competitive results without specific fine-tuning.[38]
  • A study of calibration accepted to ICLR 2025 examined nine guard models, including Llama Guard 1, 2 and 3, on 12 benchmarks and found that such models tend to be overconfident and become markedly miscalibrated under jailbreak attacks.[39]
  • Google's ShieldGemma paper reported that its 9-billion-parameter model scored a 10.8% higher average AUPRC than the first Llama Guard on external benchmarks.[40]
  • BELLS-O, a benchmark of 33 supervision systems that was accepted to NeurIPS 2026, measured Llama Guard 4 (served through an API) at a 70.4% detection rate with a 2.0% false positive rate on input moderation and 82.3% with 2.7% on output moderation. The best specialized system on input, Qwen3Guard-Gen-8B in strict mode, detected 94.9%.[17]
  • A 2026 preprint that tested 14 open guard models on 79,331 samples drawn from four public datasets ranked Llama Guard 4 twelfth by recall (0.333, with a precision of 0.785) and grouped it with the conservative models that miss a large share of unsafe content.[41]

Limitations and bypass research

Meta's paper and model cards repeat two core limitations for every version. The classifier is an LLM, so its judgments are bounded by its training data, and it may be susceptible to adversarial or prompt injection attacks that alter its verdicts.[1][13][19][2] The 2023 paper and the Llama Guard 2 card add that the model is fine-tuned for classification and not for chat, yet it will still complete arbitrary text if prompted.[1][13] The original model was fine-tuned on English data only, and the paper said Meta could not guarantee adequate performance in other languages.[1] For the 1B model, Meta notes that performance varies with model size and language and suggests the 8B model where possible. On Meta's own multilingual test the 1B model's F1 for Hindi was 0.680, against 0.871 for the 8B model.[26]

Published attack research includes:

  • PRP (2024). Mangaokar and colleagues showed that a universal adversarial prefix, which the attacker induces the main model to reproduce at the start of its response, can make a guard model classify a harmful response as safe. Against Llama Guard protecting three unaligned base models, attack success rose from between 27% and 48% without the attack to between 82% and 93% with it.[16]
  • Meta's own stress test (2024). The Llama Guard 3 Vision paper applied white-box attacks to the model. A PGD perturbation of the image with a bound of 8/255 raised the share of harmful prompts classified as safe from 21% to 70%. A GCG suffix on text-only inputs raised it from 4% to 72% for prompt classification, and from 16% to 75% for response classification when the attacker could modify the agent's response. The authors concluded that the model is more robust in response classification under practical threat models.[15]
  • Style wrappers (2026). A preprint on automatic safety judges placed fixed text before or after an otherwise unchanged model reply. It found that Llama Guard 4 was evaded on 12.3% of harmful replies when the text was an "educational course" preface.[42]
  • Target rebinding (2026). Another preprint appended forged prompt structure after the content so that the guard graded a harmless decoy. Each of the five guards tested, Llama Guard 3 1B among them, had an attack family that cleared at least 93% of the items it had flagged, though the author attributes part of the Llama Guard 3 result to trailing text in general.[43]

Prompt Guard has also been bypassed in published work. In July 2024, days after its release, a researcher at Robust Intelligence reported that inserting spaces between the letters of a prompt and removing punctuation defeated Prompt Guard 86M, and the firm's chief technology officer told The Register that the attack success rate went from under 3% to nearly 100%.[44] A 2025 study of six injection and jailbreak detectors, Prompt Guard included, reported that character-level tricks such as hiding text in emoji variation selectors evaded detection completely in some cases.[45] After Prompt Guard 2 introduced its hardened tokenizer, a SpecterOps researcher described prompts that hyphenate or re-split key words so that the classifier's tokenizer sees benign fragments while the downstream model still reads the instruction. He added that he could not give a general formula that always works.[46] Meta's cards for both versions state that the models are not immune to adaptive attacks and recommend layering them with other protections.[31][32]

Availability and licensing

Meta distributes the weights through gated repositories on Hugging Face, where a user must accept the license and submit a form before downloading.[10] Third parties redistribute them as well. Ollama, for example, lists Llama Guard 3 in 1B and 8B tags for local use.[47] Hosted availability has shifted over time: Groq retired llama-guard-3-8b on 6 June 2025 in favor of meta-llama/llama-guard-4-12b, then retired that model on 5 March 2026 and recommended OpenAI's gpt-oss-safeguard-20b in its place.[48]

Each Llama Guard is released under the community license of the Llama generation it derives from.

ModelLicense shown on Hugging Face
Llama Guard (7B)Llama 2 Community License
Llama Guard 2 (8B)Meta Llama 3 Community License
Llama Guard 3 8BLlama 3.1 Community License
Llama Guard 3 1BLlama 3.2 Community License
Llama Guard 3 11B VisionLlama 3.2 Community License
Llama Guard 4 (12B)Llama 4 Community License
Prompt Guard 86MLlama 3.1 Community License
Llama Prompt Guard 2 (86M, 22M)Llama 4 Community License

Expanded article table

The table reflects the LICENSE file and the license agreement presented by each Hugging Face repository in November 2026.[21][22][23][24][25][10][49][50][51] Meta's PurpleLlama repository on GitHub differs in places. Its README lists Llama Guard 3 8B and Prompt Guard under the Llama 3.2 Community License, the LICENSE file in its Llama Guard 3 8B folder is the Llama 3.2 agreement, and the LICENSE file in its Llama Guard 2 folder carries the Llama 2 agreement.[11][55][56]

The Llama 4 agreement, for example, grants a non-exclusive, worldwide, non-transferable, royalty-free limited license to use, reproduce, distribute and modify the materials, and Meta says the models are licensed for both research and commercial use.[52][11] The agreements also carry conditions. A licensee whose products had more than 700 million monthly active users on the Llama version's release date must request a separate license from Meta, and use is bound by an acceptable use policy.[52][53] The acceptable use policies shipped with the two multimodal models, Llama Guard 3 11B Vision and Llama Guard 4, add that the license rights for multimodal models are not granted to individuals domiciled in the European Union or companies with their principal place of business there, with an exception for end users of products that incorporate the models.[54][53] Writing about the Llama 3.x licenses in February 2025, the Open Source Initiative said they fail the Open Source Definition because they restrict use and discriminate against users and fields of endeavour.[12]

Continue reading

More to read

Topics:AI SafetyLarge Language ModelsMeta AIOpen Source AI

References

  1. ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8 ^9 ^10 ^11 ^12 ^13 ^14 ^15 ^16 ^17 ^18 ^19 ^20Inan, H., Upasani, K., Chi, J., Rungta, R., Iyer, K., Mao, Y., Tontchev, M., Hu, Q., Fuller, B., Testuggine, D., Khabsa, M. "Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations". arXiv:2312.06674, 7 December 2023. arxiv.org/...2312.06674
  2. ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8 ^9 ^10 ^11 ^12 ^13 ^14 ^15Meta. "Llama Guard 4 Model Card". PurpleLlama repository, GitHub. github.com/...MODEL_CARD.md
  3. ^1 ^2Meta. "Announcing Purple Llama: Towards open trust and safety in the new world of generative AI". AI at Meta blog, 7 December 2023. ai.meta.com/...ama-open-trust-safety-generative-ai
  4. ^1 ^2 ^3 ^4Meta. "Introducing Meta Llama 3: The most capable openly available LLM to date". AI at Meta blog, 18 April 2024. ai.meta.com/...meta-llama-3
  5. ^1 ^2 ^3 ^4Meta. "Introducing Llama 3.1: Our most capable models to date". AI at Meta blog, 23 July 2024. ai.meta.com/...meta-llama-3-1
  6. ^1 ^2 ^3Meta. "Llama 3.2: Revolutionizing edge AI and vision with open, customizable models". AI at Meta blog, 25 September 2024. ai.meta.com/...ect-2024-vision-edge-mobile-devices
  7. ^1 ^2 ^3 ^4 ^5Meta. "Sharing new open source protection tools and advancements in AI privacy and security". AI at Meta blog, 29 April 2025. ai.meta.com/...ders-program-llama-protection-tools
  8. ^1 ^2 ^3Meta. "Llama Protections". Meta developer site, accessed 19 November 2026. dev.meta.ai/...llama-protections
  9. ^1 ^2 ^3 ^4Meta. "Llama Guard 4 | Model Cards and Prompt formats". Meta developer documentation, accessed 19 November 2026. dev.meta.ai/...llama-guard-4
  10. ^1 ^2 ^3 ^4Meta. "meta-llama/Llama-Guard-4-12B". Hugging Face, accessed 19 November 2026. huggingface.co/...Llama-Guard-4-12B
  11. ^1 ^2 ^3 ^4Meta. "Purple Llama" (repository README). GitHub, accessed 19 November 2026. github.com/...PurpleLlama
  12. ^1 ^2Maris, J. "Meta's LLaMa license is still not Open Source". Open Source Initiative, 18 February 2025. opensource.org/...license-is-still-not-open-source
  13. ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8 ^9 ^10 ^11Llama Team. "Meta Llama Guard 2" (model card). PurpleLlama repository, GitHub, 2024. github.com/...MODEL_CARD.md
  14. ^1 ^2Grattafiori, A., Dubey, A., Jauhri, A., et al. "The Llama 3 Herd of Models". arXiv:2407.21783, 31 July 2024. arxiv.org/...2407.21783
  15. ^1 ^2 ^3Chi, J., Karn, U., Zhan, H., Smith, E., Rando, J., Zhang, Y., Plawiak, K., Delpierre Coudert, Z., Upasani, K., Pasupuleti, M. "Llama Guard 3 Vision: Safeguarding Human-AI Image Understanding Conversations". arXiv:2411.10414, 15 November 2024. arxiv.org/...2411.10414
  16. ^1 ^2Mangaokar, N., Hooda, A., Choi, J., Chandrashekaran, S., Fawaz, K., Jha, S., Prakash, A. "PRP: Propagating Universal Perturbations to Attack Large Language Model Guard-Rails". arXiv:2402.15911, 24 February 2024. arxiv.org/...2402.15911
  17. ^1 ^2Waibl, L., Michalak, F., Mariaccia, H. "BELLS-O: Evaluating the Operational Trade-offs of LLM Supervision Systems". arXiv:2606.20668 (accepted at NeurIPS 2026), 12 June 2026. arxiv.org/...2606.20668
  18. ^1 ^2 ^3Meta. "Llama Guard 3 | Model Cards and Prompt formats". Meta developer documentation, accessed 19 November 2026. dev.meta.ai/...llama-guard-3
  19. ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8 ^9 ^10 ^11 ^12Meta. "Llama Guard 3-8B Model Card". PurpleLlama repository, GitHub. github.com/...MODEL_CARD.md
  20. ^1 ^2Meta. "Llama Guard model card" (MODEL_CARD.md). PurpleLlama repository, GitHub. github.com/...MODEL_CARD.md
  21. ^1 ^2Meta. "meta-llama/LlamaGuard-7b". Hugging Face, accessed 19 November 2026. huggingface.co/...LlamaGuard-7b
  22. ^1 ^2Meta. "meta-llama/Meta-Llama-Guard-2-8B". Hugging Face, accessed 19 November 2026. huggingface.co/...Meta-Llama-Guard-2-8B
  23. ^1 ^2Meta. "meta-llama/Llama-Guard-3-8B". Hugging Face, accessed 19 November 2026. huggingface.co/...Llama-Guard-3-8B
  24. ^1 ^2Meta. "meta-llama/Llama-Guard-3-1B". Hugging Face, accessed 19 November 2026. huggingface.co/...Llama-Guard-3-1B
  25. ^1 ^2Meta. "meta-llama/Llama-Guard-3-11B-Vision". Hugging Face, accessed 19 November 2026. huggingface.co/...Llama-Guard-3-11B-Vision
  26. ^1 ^2 ^3 ^4 ^5Meta. "Llama Guard 3-1B Model Card". PurpleLlama repository, GitHub. github.com/...MODEL_CARD.md
  27. ^Fedorov, I., Plawiak, K., Wu, L., Elgamal, T., Suda, N., Smith, E., Zhan, H., Chi, J., et al. "Llama Guard 3-1B-INT4: Compact and Efficient Safeguard for Human-AI Conversations". arXiv:2411.17713, 18 November 2024. arxiv.org/...2411.17713
  28. ^1 ^2 ^3 ^4 ^5Meta. "Llama Guard 3-11B-vision Model Card". PurpleLlama repository, GitHub. github.com/...MODEL_CARD.md
  29. ^1 ^2Vidgen, B., Agrawal, A., Ahmed, A. M., et al. "Introducing v0.5 of the AI Safety Benchmark from MLCommons". arXiv:2404.12241, 18 April 2024. arxiv.org/...2404.12241
  30. ^1 ^2Ghosh, S., Frase, H., Williams, A., et al. "AILuminate: Introducing v1.0 of the AI Risk and Reliability Benchmark from MLCommons". arXiv:2503.05731, 19 February 2025. arxiv.org/...2503.05731
  31. ^1 ^2Meta. "Model Card - Prompt Guard". PurpleLlama repository, GitHub. github.com/...MODEL_CARD.md
  32. ^1 ^2Meta. "Llama Prompt Guard 2 Model Card". PurpleLlama repository, GitHub. github.com/...MODEL_CARD.md
  33. ^Meta. "CodeShield" (README). PurpleLlama repository, GitHub. github.com/...README.md
  34. ^Meta. "MIT License" (CodeShield LICENSE file). PurpleLlama repository, GitHub. github.com/...LICENSE
  35. ^Meta. "MIT License" (LlamaFirewall LICENSE file). PurpleLlama repository, GitHub. github.com/...LICENSE
  36. ^1 ^2 ^3Chennabasappa, S., Nikolaidis, C., Song, D., Molnar, D., Ding, S., Wan, S., Whitman, S., Deason, L., Doucette, N., Montilla, A., Gampa, A., de Paola, B., Gabi, D., Crnkovich, J., Testud, J.-C., He, K., Chaturvedi, R., Zhou, W., Saxe, J. "LlamaFirewall: An open source guardrail system for building secure AI agents". arXiv:2505.03574, 6 May 2025. arxiv.org/...2505.03574
  37. ^Han, S., Rao, K., Ettinger, A., Jiang, L., Lin, B. Y., Lambert, N., Choi, Y., Dziri, N. "WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMs". arXiv:2406.18495 (NeurIPS 2024), 26 June 2024. arxiv.org/...2406.18495
  38. ^Bassani, E., Sanchez, I. "GuardBench: A Large-Scale Benchmark for Guardrail Models". Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 18393-18409, November 2024. aclanthology.org/2024.emnlp-main.1022
  39. ^Liu, H., Huang, H., Gu, X., Wang, H., Wang, Y. "On Calibration of LLM-based Guard Models for Reliable Content Moderation". arXiv:2410.10414 (accepted to ICLR 2025), 14 October 2024. arxiv.org/...2410.10414
  40. ^Zeng, W., Liu, Y., Mullins, R., Peran, L., Fernandez, J., Harkous, H., Narasimhan, K., Proud, D., Kumar, P., Radharapu, B., Sturman, O., Wahltinez, O. "ShieldGemma: Generative AI Content Moderation Based on Gemma". arXiv:2407.21772, 31 July 2024. arxiv.org/...2407.21772
  41. ^Harsh, R. R., Sarmah, B., Pasquali, S. "Benchmarking Open-Source Safety Guard Models: A Comprehensive Evaluation". arXiv:2605.28830, 10 April 2026. arxiv.org/...2605.28830
  42. ^Zhou, Y., Ye, W., Liu, Y., Dong, Z., Yao, J., Ge, J. "Style Over Substance: Content-Invariant Wrappers Flip LLM Safety-Judge Verdicts". arXiv:2609.08236, 8 September 2026. arxiv.org/...2609.08236
  43. ^Kanwat, U. "Fooling LLM Safety Guards into Judging the Wrong Text". arXiv:2610.31695, 20 October 2026. arxiv.org/...2610.31695
  44. ^Claburn, T. "Meta's AI safety system defeated by the space bar". The Register, 29 July 2024. theregister.com/...meta_ai_safety
  45. ^Hackett, W., Birch, L., Trawicki, S., Suri, N., Garraghan, P. "Bypassing LLM Guardrails: An Empirical Analysis of Evasion Attacks against Prompt Injection and Jailbreak Detection Systems". arXiv:2504.11168, 15 April 2025. arxiv.org/...2504.11168
  46. ^Chester, A. "Tokenization Confusion". SpecterOps blog, 3 June 2025. specterops.io/...tokenization-confusion
  47. ^Ollama. "llama-guard3". Ollama library, accessed 19 November 2026. ollama.com/...llama-guard3
  48. ^Groq. "Model Deprecation". GroqDocs, accessed 19 November 2026. console.groq.com/...deprecations
  49. ^Meta. "meta-llama/Prompt-Guard-86M". Hugging Face, accessed 19 November 2026. huggingface.co/...Prompt-Guard-86M
  50. ^Meta. "meta-llama/Llama-Prompt-Guard-2-86M". Hugging Face, accessed 19 November 2026. huggingface.co/...Llama-Prompt-Guard-2-86M
  51. ^Meta. "meta-llama/Llama-Prompt-Guard-2-22M". Hugging Face, accessed 19 November 2026. huggingface.co/...Llama-Prompt-Guard-2-22M
  52. ^1 ^2Meta. "Llama 4 Community License Agreement" (LICENSE file distributed with Llama Guard 4). PurpleLlama repository, GitHub. github.com/...LICENSE
  53. ^1 ^2Meta. "Llama 4 Acceptable Use Policy" (USE_POLICY.md distributed with Llama Guard 4). PurpleLlama repository, GitHub. github.com/...USE_POLICY.md
  54. ^Meta. "Llama 3.2 Acceptable Use Policy" (USE_POLICY.md distributed with Llama Guard 3-11B-vision). PurpleLlama repository, GitHub. github.com/...USE_POLICY.md
  55. ^Meta. "Llama 3.2 Community License Agreement" (LICENSE file in the Llama Guard 3-8B folder). PurpleLlama repository, GitHub. github.com/...LICENSE
  56. ^Meta. "Llama 2 Community License Agreement" (LICENSE file in the Llama Guard 2 folder). PurpleLlama repository, GitHub. github.com/...LICENSE

Improve this article

Add missing citations, update stale details, or write a clearer explanation. Anyone can edit: changes go live when you publish, and every edit is checked by an editor.

1 revision · v1 · 5,378 words · full history

Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify

Research and drafting on this wiki are AI-assisted, under named human editorial standards. How AI is used here

Reviewer note: Independent fact-check before publication on November 19, 2026: 168 claims checked against 90 cited and independent sources; 0 material and 9 minor corrections applied before publication.

Cite this page: AI Wiki. "Llama Guard." aiwiki.ai, updated 18 Nov 2026, fact-checked 18 Nov 2026. CC BY 4.0. https://aiwiki.ai/wiki/llama_guard

Edit article