Mindket

Qwen3Guard-Gen-0.6B

Newversion 1 · updated

Overview

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.

At a glance

You need
  • Python with pip
  • Transformers 4.51.0 or newer, with the latest version recommended
  • Memory for the weights, about 1.5 GB in BF16 or about 376 MB at 4-bit (an estimate)
Runs in
  • Python scripts that use the transformers library, version 4.51.0 or newer
  • Windows, macOS or Linux, after you download the files with Hugging Face's hub tool
  • Chat pipelines, as a filter on prompts and on replies
Start with
pip install -U huggingface_hub
hf download Qwen/Qwen3Guard-Gen-0.6B

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

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.

IndustryWho uses itHow they use itExample
SoftwareChatbot developersScreen user prompts before the main model sees themFlag an unsafe request
AI applicationsTeams running LLMsCheck model replies before showing themLabel a reply as safe or unsafe
Trust and safetyModeration teamsTriage content into severity levelsRoute controversial items to a human
ResearchSafety researchersStudy prompt and response classificationTest 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

  • Python scripts that use the transformers library, version 4.51.0 or newer
  • Windows, macOS or Linux, after you download the files with Hugging Face's hub tool
  • Chat pipelines, as a filter on prompts and on replies
Use caseWhoWhat they get back
Prompt moderationChat app developersA safety label and categories for a user message
Response moderationTeams running LLMsA label, categories and a refusal flag for a model reply
Severity triageModeration teamsOne of three levels: safe, controversial or unsafe

How to set it up

  • Python with pip
  • Transformers 4.51.0 or newer, with the latest version recommended
  • Memory for the weights, about 1.5 GB in BF16 or about 376 MB at 4-bit (an estimate)
  1. Install the Hugging Face hub package.
  2. Download the model files.
  3. Load the model with transformers, as the snippet below shows.
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.

ToolWhat it does
extract_label_and_categoriesReads the safety label and risk categories from the model output
apply_chat_templateWraps the user, or user and assistant, messages for the model
generateWrites 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.

  1. You pass a prompt or a prompt and reply
  2. The model writes a short safety verdict
  3. A helper extracts label and categories
  4. Your code allows, flags or blocks the text

Good to know

  • Labels: safe, controversial and unsafe, plus risk categories such as violence, illegal acts, personal data and jailbreak attempts
  • Languages: 119 languages and dialects
  • License: Apache 2.0
  • Cost to run: none named, no API key or account, only hardware with enough memory
  • Data it reaches: it downloads model files from Hugging Face and reads the text you ask it to check
  • Not for: the source names no forbidden uses, and it classifies text rather than chatting, so it is a filter and not a final authority

README and files

README

Qwen3Guard-Gen-0.6B

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.

About

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:

  • Python scripts that use the transformers library, version 4.51.0 or newer
  • Windows, macOS or Linux, after you download the files with Hugging Face's hub tool
  • Chat pipelines, as a filter on prompts and on replies
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:

  • Python with pip
  • Transformers 4.51.0 or newer, with the latest version recommended
  • Memory for the weights, about 1.5 GB in BF16 or about 376 MB at 4-bit (an estimate)
  1. Install the Hugging Face hub package.
  2. Download the model files.
  3. Load the model with transformers, as the snippet below shows.
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:

  • Labels: safe, controversial and unsafe, plus risk categories such as violence, illegal acts, personal data and jailbreak attempts
  • Languages: 119 languages and dialects
  • License: Apache 2.0
  • Cost to run: none named, no API key or account, only hardware with enough memory
  • Data it reaches: it downloads model files from Hugging Face and reads the text you ask it to check
  • Not for: the source names no forbidden uses, and it classifies text rather than chatting, so it is a filter and not a final authority

On Hugging Face, 13 November 2026

  • Task: text generation
  • Library: transformers
  • Parameters: 752M
  • Weights: about 1.5 GB in BF16; about 376 MB at 4-bit (estimate)
  • Formats: Safetensors
  • Downloads in the last 30 days: 191,489
  • Likes: 102
  • License: apache-2.0
  • Based on: Qwen/Qwen3-0.6B
  • Quantized versions: 17
  • Fine-tunes: 33
  • Tags: transformers, safetensors, qwen3, text-generation, conversational

Links

Get the model

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.

Files
README.md  7 KB

1 file, 7 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-13

Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

ProductDownloads, last 30 daysLikesParametersLicenseLast change
Qwen3Guard-Gen-0.6B This page191,489102752Mapache-2.0
Qwen3-0.6BShares qwen3 · text-generation · conversational19,718,5991,894752Mapache-2.0
Qwen3-14BShares qwen3 · text-generation · conversational12,965,37654014.8Bapache-2.0
Qwen3-8BShares qwen3 · text-generation · conversational6,269,1412,1848.2Bapache-2.0
Qwen3-1.7BShares qwen3 · text-generation · conversational3,203,4906182Bapache-2.0
Qwen3-4BShares qwen3 · text-generation · conversational3,186,5317984Bapache-2.0
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

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.

Searched

More from Mindket

See all from Mindket

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…

New29.4k

Guizang PPT Skill

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…

New29.8k

Claude Code Skills & Plugins

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…

New29.8k

Similar in Developer

See all in Developer

buzz

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…

New37.3k

plannotator

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.

New10.5k

open-code-review

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…

New50.7k