llamaguard
Meta's 7-8B specialized moderation model for LLM input/output filtering.
Skill by Orchestra-Research
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/orchestra-research-llamaguard
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops, ml, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/llamaguard
What's inside
- Skill name
llamaguard- Description
- 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.
- License
- MIT
- Instructions
- 329 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- files: referenced but missing: references/custom-categories.md, references/benchmarks.md, references/deployment.md
Files (1)
- SKILL.md
SKILL.md (first lines)
# LlamaGuard - AI Content Moderation
## Quick start
LlamaGuard is a 7-8B parameter model specialized for content safety classification.
**Installation**:
```bash
pip install transformers torch
# Login to HuggingFace (required)
huggingface-cli login
```
**Basic usage**:
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "meta-llama/LlamaGuard-7b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
def moderate(chat):
input_ids = tokenizer.apply_chat_template(chat, return_tensors="pt").to(model.device)
output = model.generate(input_ids=input_ids, max_new_tokens=100)
return tokenizer.decode(output[0], skip_special_tokens=True)
# Check user input
result = moderate([
{"role": "user", "content": "How do I make explosives?"}
])
print(result)
# Output: "unsafe\nS3" (Criminal Planning)
```
## Common workflows
### Workflow 1: Input filtering (prompt moderation)
**Check user prompts before LLM**:
```python
def check_input(user_message):
result = moderate([{"role": "user", "content": user_message}])
if result.startswith("unsafe"):
category = result.split("\n")[1]
return False, category # Blocked
else:
return True, None # Safe
# Example
safe, category = check_input("How do I hack a website?")
if not safe:
print(f"Request blocked: {category}")
# Return error to user
else:
# Send to LLM
response = llm.generate(user_message)
```
**Safety categories**:
- **S1**: Violence & Hate
- **S2**: Sexual Content
- **S3**: Guns & Illegal Weapons
- **S4**: Regulated Substances
- **S5**: Suicide & Self-Harm
- **S6**: Criminal Planning
### Workflow 2: Output filtering (response moderation)
**Check LLM responses before showing to user**:
```python
def check_output(user_message, bot_response):
conversation = [
{"role": "user", "content": user_message},
{"role": "assistant", "content": bot_response}
]
result = moderate(conversation)
if result.startswith("unsafe"):
category = result.split("\n")[1]
return False, category
else:
return True, None
# Example
user_msg = "Tell me about harmful substances"
bot_msg = llm.generate(user_msg)
safe, category = check_output(user_msg, bot_msg)
if not safe:
print(f"Response blocked: {category}")
# Return generic response
return "I cannot provide that information."
else:
return bot_msg
```
### Workflow 3: vLLM deployment (fast inference)
**Production-ready serving**:
```python
from vllm import LLM, SamplingParams
# Initialize vLLM
llm = LLM(model="meta-llama/LlamaGuard-7b", tensor_parallel_size=1)
# Sampling params
sampling_params = SamplingParams(
temperature=0.0, # Deterministic
max_tokens=100
)
def moderate_vllm(chat):
# Format prompt
prompt = tokenizer.apply_chat_template(chat, tokenize=False)
# Generate
output = llm.generate([prompt], sampling_params)From Orchestra-Research/AI-Research-SKILLs, MIT.
More from Orchestra-Research/AI-Research-SKILLs
- 0.686score
pinecone
Orchestra-Research
Managed vector database for production AI applications.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ml-training-recipes
Orchestra-Research
Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
chroma
Orchestra-Research
Open-source embedding database for AI applications.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
faiss
Orchestra-Research
Facebook's library for efficient similarity search and clustering of dense vectors.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-lightning
Orchestra-Research
High-level PyTorch framework with Trainer class, automatic distributed training (DDP/FSDP/DeepSpeed), callbacks system, and minimal boilerplate.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
gptq
Orchestra-Research
Post-training 4-bit quantization for LLMs with minimal accuracy loss.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentencepiece
Orchestra-Research
Language-independent tokenizer treating text as raw Unicode.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
langchain
Orchestra-Research
Framework for building LLM-powered applications with agents, chains, and RAG.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ray-data
Orchestra-Research
Scalable data processing for ML workloads.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
nemo-curator
Orchestra-Research
GPU-accelerated data curation for LLM training.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-fsdp2
Orchestra-Research
Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentence-transformers
Orchestra-Research
Framework for state-of-the-art sentence, text, and image embeddings.
SkillCFreshness: C★ 13.9KClaude Code +9
Signals
- Stars
- 13,906
- Forks
- 973
- Open issues
- 11
- Last commit (this folder)
- Nov 20, 2025 (11 months ago)
- Last release
- Jun 16, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- orchestra-research.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Orchestra-Research
- 0.686score
pytorch-lightning
Orchestra-Research
High-level PyTorch framework with Trainer class, automatic distributed training (DDP/FSDP/DeepSpeed), callbacks system, and minimal boilerplate.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
nemo-curator
Orchestra-Research
GPU-accelerated data curation for LLM training.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ray-data
Orchestra-Research
Scalable data processing for ML workloads.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-fsdp2
Orchestra-Research
Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentencepiece
Orchestra-Research
Language-independent tokenizer treating text as raw Unicode.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
gptq
Orchestra-Research
Post-training 4-bit quantization for LLMs with minimal accuracy loss.
SkillCFreshness: C★ 13.9KClaude Code +9
Cite this page
llamaguard skill. Agent Mart. https://agentmart.dev/skills/orchestra-research-llamaguard (last updated 2026-10-24)