llamaguard

Classify and filter unsafe content in prompts and model responses.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/handsomelong922/my-codex-skills --skill llamaguard-handsomelong922
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llamaguard
Source: https://github.com/handsomelong922/my-codex-skills/tree/main/skills/llamaguard
Command: npx skills add https://github.com/handsomelong922/my-codex-skills --skill llamaguard-handsomelong922

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, vllm.

What problem does it solve?

Meta's LlamaGuard is a 7-8B parameter model specialized for content safety classification and prompt filtering to prevent unsafe conversations. It covers six safety categories: violence/hate, sexual content, weapons, substances, self-harm, and criminal planning, delivering robust moderation across inputs and outputs.

Core Features & Use Cases

  • Input filtering before LLM responses to block unsafe prompts.
  • Output moderation of LLM results to prevent disallowed content from being shown.
  • Production deployments with vLLM, HuggingFace, and NeMo Guardrails for scalable safety in real-time chats.

Quick Start

Load the LlamaGuard model, initialize tokenizers, and begin moderating conversations by feeding prompts and inspecting the safety category.

Frequently Asked Questions about llamaguard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I filter unsafe prompts and moderate LLM outputs?

Filter unsafe prompts and moderate LLM outputs by loading the LlamaGuard transformer model to classify content across six safety categories, blocking disallowed inputs and responses before they reach the user.

What is content moderation with LlamaGuard and how does it work?

Content moderation with LlamaGuard uses a 7-8B parameter transformer model to classify text safety across categories like violence, sexual content, and criminal planning, inspecting prompts and responses to determine if they are safe.

Can I use NeMo Guardrails and vLLM for production content moderation?

Yes, you can deploy scalable real-time content moderation using NeMo Guardrails and vLLM, enabling high-throughput safety classification and prompt filtering in production chat environments.

Do I need a GPU to run LlamaGuard for safety classification?

Yes, running LlamaGuard for safety classification requires a GPU-accelerated runtime along with dependencies including transformers, torch, and vllm to handle the 7-8B parameter model efficiently.

What safety categories does LlamaGuard content moderation cover?

LlamaGuard content moderation covers six safety categories: violence/hate, sexual content, weapons, substances, self-harm, and criminal planning, delivering robust classification for both inputs and outputs.