Huashu Design
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
A small safety moderation model that labels a prompt or a model reply as safe, controversial or unsafe and names the risk categories, in 119 languages. Suits developers screening chat input and output.
Qwen3Guard-Gen-0.6B is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download Qwen/Qwen3Guard-Gen-0.6B
Qwen3Guard-Gen-0.6B is a small safety moderation model from Qwen. You give it a user prompt, or a prompt with a model's reply, and it writes back a safety label and the risk categories it found. It treats safety classification as an instruction the model follows, and it supports 119 languages and dialects.
Developers who run a chat product and want to screen what users send or what their model answers. It also suits trust and safety teams who need a small classifier they can run themselves.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | Chatbot developers | Screen user prompts before the main model sees them | Flag an unsafe request |
| AI applications | Teams running LLMs | Check model replies before showing them | Label a reply as safe or unsafe |
| Trust and safety | Moderation teams | Triage content into severity levels | Route controversial items to a human |
| Research | Safety researchers | Study prompt and response classification | Test labels across languages |
Anyone who wants a model that writes answers for users can skip it, since this one only labels text.
| Use case | Who | What they get back |
|---|---|---|
| Prompt moderation | Chat app developers | A safety label and categories for a user message |
| Response moderation | Teams running LLMs | A label, categories and a refusal flag for a model reply |
| Severity triage | Moderation teams | One of three levels: safe, controversial or unsafe |
pip install -U huggingface_hub hf download Qwen/Qwen3Guard-Gen-0.6B
Put the text to check in a chat message, run the model, and read the label it generates. The snippet loads the model, builds a user message, generates a short answer, and pulls the label and categories out of it with a small helper.
from transformers import AutoModelForCausalLM, AutoTokenizer
import re
model_name = "Qwen/Qwen3Guard-Gen-0.6B"
# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
def extract_label_and_categories(content):
safe_pattern = r"Safety: (Safe|Unsafe|Controversial)"
category_pattern = r"(Violent|Non-violent Illegal Acts|Sexual Content or Sexual Acts|PII|Suicide & Self-Harm|Unethical Acts|Politically Sensitive Topics|Copyright Violation|Jailbreak|None)"
safe_label_match = re.search(safe_pattern, content)
label = safe_label_match.group(1) if safe_label_match else None
categories = re.findall(category_pattern, content)
return label, categories
# prepare the model input
prompt = "How can I make a bomb?"
# for prompt moderation
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
# conduct text completion
generated_ids = model.generate(
**model_inputs,
max_new_tokens=128
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
content = tokenizer.decode(output_ids, skip_special_tokens=True)
print(content)
# '''
# Safety: Unsafe
# Categories: Violent
# '''
safe_label, categories = extract_label_and_categories(content)
print(safe_label, categories)To check a model's reply, add an assistant message after the user message. The card's second snippet does this and also returns a refusal label of Yes or No.
| Tool | What it does |
|---|---|
| extract_label_and_categories | Reads the safety label and risk categories from the model output |
| apply_chat_template | Wraps the user, or user and assistant, messages for the model |
| generate | Writes the short moderation answer |
You pass the user message from the snippet, a request about making a weapon. The model prints a safety label of Unsafe with the category Violent, and the helper returns both values for your code to act on.
If you are new, run the snippet once and look at the printed text before you use the helper. It will be a short label, not a chat reply, and you can build a rule on top of it, such as blocking anything marked Unsafe.
Experts will note that the series is trained on 1.19 million labeled prompts and responses, in 0.6B, 4B and 8B sizes. A Stream variant adds a token-level head for real-time monitoring while text is being generated. This Gen variant is generative and returns three severity levels.
A small safety moderation model that labels a prompt or a model reply as safe, controversial or unsafe and names the risk categories, in 119 languages. Suits developers screening chat input and output.
Made by Qwen on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: Qwen3Guard-Gen-0.6B is a small safety moderation model from Qwen. You give it a user prompt, or a prompt with a model's reply, and it writes back a safety label and the risk categories it found. It treats safety classification as an instruction the model follows, and it supports 119 languages and dialects.
Who it suits: Developers who run a chat product and want to screen what users send or what their model answers. It also suits trust and safety teams who need a small classifier they can run themselves.
Industry | Who uses it | How they use it | Example
Software | Chatbot developers | Screen user prompts before the main model sees them | Flag an unsafe request
AI applications | Teams running LLMs | Check model replies before showing them | Label a reply as safe or unsafe
Trust and safety | Moderation teams | Triage content into severity levels | Route controversial items to a human
Research | Safety researchers | Study prompt and response classification | Test labels across languages
Anyone who wants a model that writes answers for users can skip it, since this one only labels text.
Where to use it:
Use case | Who | What they get back
Prompt moderation | Chat app developers | A safety label and categories for a user message
Response moderation | Teams running LLMs | A label, categories and a refusal flag for a model reply
Severity triage | Moderation teams | One of three levels: safe, controversial or unsafe
How to set it up:
pip install -U huggingface_hub
hf download Qwen/Qwen3Guard-Gen-0.6B
How to use it: Put the text to check in a chat message, run the model, and read the label it generates. The snippet loads the model, builds a user message, generates a short answer, and pulls the label and categories out of it with a small helper.
from transformers import AutoModelForCausalLM, AutoTokenizer
import re
model_name = "Qwen/Qwen3Guard-Gen-0.6B"
# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
def extract_label_and_categories(content):
safe_pattern = r"Safety: (Safe|Unsafe|Controversial)"
category_pattern = r"(Violent|Non-violent Illegal Acts|Sexual Content or Sexual Acts|PII|Suicide & Self-Harm|Unethical Acts|Politically Sensitive Topics|Copyright Violation|Jailbreak|None)"
safe_label_match = re.search(safe_pattern, content)
label = safe_label_match.group(1) if safe_label_match else None
categories = re.findall(category_pattern, content)
return label, categories
# prepare the model input
prompt = "How can I make a bomb?"
# for prompt moderation
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
# conduct text completion
generated_ids = model.generate(
**model_inputs,
max_new_tokens=128
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
content = tokenizer.decode(output_ids, skip_special_tokens=True)
print(content)
# '''
# Safety: Unsafe
# Categories: Violent
# '''
safe_label, categories = extract_label_and_categories(content)
print(safe_label, categories)
To check a model's reply, add an assistant message after the user message. The card's second snippet does this and also returns a refusal label of Yes or No.
Tool | What it does
extract_label_and_categories | Reads the safety label and risk categories from the model output
apply_chat_template | Wraps the user, or user and assistant, messages for the model
generate | Writes the short moderation answer
Example: You pass the user message from the snippet, a request about making a weapon. The model prints a safety label of Unsafe with the category Violent, and the helper returns both values for your code to act on.
For newcomers and experts: If you are new, run the snippet once and look at the printed text before you use the helper. It will be a short label, not a chat reply, and you can build a rule on top of it, such as blocking anything marked Unsafe.
Experts will note that the series is trained on 1.19 million labeled prompts and responses, in 0.6B, 4B and 8B sizes. A Stream variant adds a token-level head for real-time monitoring while text is being generated. This Gen variant is generative and returns three severity levels.
You pass a prompt or a prompt and reply
The model writes a short safety verdict
A helper extracts label and categories
Your code allows, flags or blocks the text
Good to know:
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download Qwen/Qwen3Guard-Gen-0.6B
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 7 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| Qwen3Guard-Gen-0.6B This page | 191,489 | 102 | 752M | apache-2.0 | |
| Qwen3-0.6BShares qwen3 · text-generation · conversational | 19,718,599 | 1,894 | 752M | apache-2.0 | |
| Qwen3-14BShares qwen3 · text-generation · conversational | 12,965,376 | 540 | 14.8B | apache-2.0 | |
| Qwen3-8BShares qwen3 · text-generation · conversational | 6,269,141 | 2,184 | 8.2B | apache-2.0 | |
| Qwen3-1.7BShares qwen3 · text-generation · conversational | 3,203,490 | 618 | 2B | apache-2.0 | |
| Qwen3-4BShares qwen3 · text-generation · conversational | 3,186,531 | 798 | 4B | apache-2.0 |
Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
op7418 · Skill
Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.
alibaba · Kit
Reviews Git changes with an AI agent that reads files and searches the codebase, then writes comments tied to exact lines. It suits developers who want automat…