safety-alignment-llamaguard
Meta's 7-8B specialized moderation model for LLM input/output filtering. 6 safety categories - violence/hate, sexual content, weapons, substances, self-harm, criminal planning. 94-95% accuracy. Deploy with vLLM, HuggingFace, Sagemaker. Integrates with NeMo Guardrails.
Target: Learning & research. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original text
Topics in the source
- LlamaGuard - AI Content Moderation
- Quick start
- Common workflows
- Workflow 1: Input filtering (prompt moderation)
- Workflow 2: Output filtering (response moderation)
- Workflow 3: vLLM deployment (fast inference)
- Workflow 4: API endpoint (FastAPI)
- Workflow 5: NeMo Guardrails integration
LlamaGuard is a 7-8B parameter model specialized for content safety classification. Installation: Basic usage: Check user prompts before LLM: Safety categories: S1: Violence & Hate S2: Sexual Content S3: Guns & Illegal Weapons S4: Regulated Substances S5: Suicide & Self-Harm S6: Criminal Planning Check LLM responses before showing to user: Production-ready serving: Throughput: 50-100 requests/sec on single A100 Serve as moderation API: Usage: Use with NVIDIA Guardrails: Use LlamaGuard when: Need pre-trained moderation model Want high accuracy (94-95%) Have GPU resources (7-8B model) Need detailed safety categories Building production LLM apps Model versions: LlamaGuard 1 (7B): Original, 6 categories LlamaGuard 2 (8B): Improved, 6 categories LlamaGuard 3 (8B): Latest (2024), enhanced Use alternatives instead: OpenAI Moderation API: Simpler, API-based, free Perspective API: Google's toxicity detection NeMo Guardrails: More comprehensive safety framework Constitutional AI: Training-time safety Issue: Model access denied Login to HuggingFace: Accept license on model page: https://huggingface.co/meta-llama/LlamaGuard-7b Issue: High latency (>500ms) Use vLLM for 10× speedup: Enable tenso
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- davila7/claude-code-templates
- Source file
- cli-tool/components/skills/ai-research/safety-alignment-llamaguard/SKILL.md
- Fixed revision
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:43.436Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.