llamaguard

Classify user input and system outputs across six safety categories.

52|6|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/ovachiever/droid-tings --skill llamaguard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llamaguard
Source: https://github.com/ovachiever/droid-tings/tree/main/skills/llamaguard
Command: npx skills add https://github.com/ovachiever/droid-tings --skill llamaguard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, vllm.

What problem does it solve?

This Skill introduces LlamaGuard for safe input/output moderation with high accuracy, including optional deployments via vLLM, HuggingFace, and NeMo Guardrails.

Core Features & Use Cases

  • Moderation Core: 6 safety categories (violence/hate, sexual content, weapons, substances, self-harm, criminal planning).
  • Deployment Options: vLLM, HuggingFace, and cloud/edge deployments for fast moderation.
  • API & Endpoints: FastAPI/REST style moderation endpoints with batch processing.
  • Input/Output Filtering: Pre- and post-LLM moderation to ensure safe user interactions.
  • Performance: High throughput with optimized inference.

Quick Start

Deploy LlamaGuard with a chosen backend (vLLM/HuggingFace/NeMo Guardrails) and route user input through the moderator before invoking LLMs.

Frequently Asked Questions about llamaguard

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

FAQPage Schema
How do I moderate user input and LLM responses for safety?

Input and output moderation classifies text across six safety categories (violence, sexual content, weapons, substances, self-harm, criminal planning) using LlamaGuard. Deploy it with vLLM, HuggingFace, or NeMo Guardrails to filter prompts before reaching your LLM and responses before returning to users, ensuring production safety compliance.

Can I use LlamaGuard with vLLM and HuggingFace transformers?

Yes. LlamaGuard integrates with vLLM for high-throughput inference and HuggingFace transformers for model loading and inference. Both backends support deterministic safety classification, enabling you to route moderation through your existing inference stack without separate infrastructure.

What are the six safety categories LlamaGuard enforces?

LlamaGuard classifies content into six categories: violence and hate speech (S1), sexual content (S2), weapons (S3), illegal substances (S4), self-harm (S5), and criminal planning (S6). Each category receives a deterministic safety score for filtering decisions in API endpoints and production pipelines.

How do I deploy LlamaGuard for batch processing and API endpoints?

Deploy LlamaGuard using FastAPI or REST endpoints with vLLM or HuggingFace backends to handle batch moderation requests. Route multiple user inputs and system outputs through the moderator before LLM invocation, enabling scalable safety filtering across chat interactions and production deployments.

Does LlamaGuard work with NeMo Guardrails and SageMaker?

Yes. LlamaGuard integrates with NeMo Guardrails for orchestrated safety workflows and supports cloud deployment on SageMaker and edge environments. This enables deterministic safety classification as part of larger guardrail orchestration and managed inference pipelines.

What's the performance impact of adding LlamaGuard moderation to my LLM pipeline?

LlamaGuard provides high-throughput moderation with optimized inference using vLLM or HuggingFace transformers and torch, minimizing latency overhead. Pre- and post-LLM filtering adds minimal latency while maintaining deterministic safety classification across concurrent requests in production.