Qwen3Guard Technical Report

Haiquan Zhao, Chenhan Yuan, Fei Huang, Xiaomeng Hu, Yichang Zhang, An Yang, Bowen Yu, Dayiheng Liu, Jingren Zhou, Junyang Lin, Baosong Yang, Chen Cheng, Jialong Tang, Jiandong Jiang, Jianwei Zhang, Jijie Xu, Ming Yan, Minmin Sun, Pei Zhang, Pengjun Xie, Qiaoyu Tang, Qin Zhu, Rong Zhang, Shibin Wu, Shuo Zhang, Tao He, Tianyi Tang, Tingyu Xia, Wei Liao, Weizhou Shen, Wenbiao Yin, Wenmeng Zhou, Wenyuan Yu, Xiaobin Wang, Xiaodong Deng, Xiaodong Xu, Xinyu Zhang, Yang Liu, Yeqiu Li, Yong Jiang, Yu Wan, Yuxin ZhouarXiv 2025 · OpenReview

Abstract

As large language models (LLMs) become more capable and widely used, ensuring the safety of their outputs is increasingly critical. Existing guardrail models, though useful in static evaluation settings, face two major limitations in real-world applications: (1) they typically output only binary "safe/unsafe" labels, which can be interpreted inconsistently across diverse safety policies, rendering them incapable of accommodating varying safety tolerances across domains; and (2) they require complete model outputs before performing safety checks, making them fundamentally incompatible with streaming LLM inference, thereby preventing timely intervention during generation and increasing exposure to harmful partial outputs. To address these challenges, we present Qwen3Guard, a series of multilingual safety guardrail models with two specialized variants: Generative Qwen3Guard, which casts safety classification as an instruction-following task to enable fine-grained tri-class judgments (safe, controversial, unsafe); and Stream Qwen3Guard, which introduces a token-level classification head for real-time safety monitoring during incremental text generation. Both variants are available in three sizes (0.6B, 4B, and 8B parameters) and support up to 119 languages and dialects, providing comprehensive, scalable, and low-latency safety moderation for global LLM deployments. Evaluated across English, Chinese, and multilingual benchmarks, Qwen3Guard achieves state-of-the-art performance in both prompt and response safety classification. All models are released under the Apache 2.0 license for public use.

Introduction

Ensuring that Large Language Models (LLMs) stay within safety boundaries is a dynamic challenge. Most existing "guardrail" models operate as binary classifiers, labeling content as either "safe" or "unsafe." However, real-world safety policies are rarely so simplistic. Furthermore, standard moderation models typically require the entire LLM output to be generated before a safety check can occur. This introduces significant latency and risks exposing users to harmful content before the generation is complete.

Qwen3Guard addresses these gaps by introducing a suite of multilingual safety models (0.6B to 8B parameters). By incorporating a "controversial" category and a specialized streaming architecture, Qwen3Guard offers a flexible and low-latency solution for real-time LLM moderation.

Methodology

Qwen3Guard is developed in two primary variants to serve different operational needs.

Generative Qwen3Guard

This variant treats safety assessment as an instruction-following task. It is trained to categorize inputs into three classes: Safe, Unsafe, or Controversial. The "Controversial" label is a key innovation designed to handle nuanced safety policies. To generate this data, the team employed a "Strict vs. Loose" strategy, training two models with different safety biases. Disagreements between these models were labeled as "Controversial," allowing developers to toggle between "Strict Mode" (treating controversial as unsafe) and "Loose Mode" (treating controversial as safe) depending on the application context.

Instruction-following prompt structure for Generative Qwen3Guard

Stream Qwen3Guard

To enable real-time intervention, Stream Qwen3Guard adds lightweight classification heads to the final layer of the transformer. This allows for token-level safety monitoring during the generation process. The model is trained using a "rollout" method, where partial sentences are evaluated based on the safety of multiple potential completions. This approach allows the model to identify "trigger tokens" that signal a transition into unsafe content, facilitating immediate generation termination.

Datasets and Evaluation

The models were trained on a comprehensive dataset of 1.19 million samples across 119 languages. The training data includes human-annotated and synthetic examples, specifically utilizing "paired positive-negative examples" to ensure the model distinguishes intent rather than just keywords.

Evaluation was conducted across several standard benchmarks:

  • English: ToxicChat, OpenAI Moderation, Aegis 2.0, HarmBench, and WildGuard.
  • Multilingual: RTP-LX and PolyGuard.
  • Reasoning: A specialized "Think" dataset for moderating the internal reasoning traces of models like DeepSeek-R1.

Results and Discussion

Qwen3Guard-8B-Gen achieved state-of-the-art performance across 14 public benchmarks, frequently outperforming established models such as LlamaGuard3-8B and WildGuard-7B. Notably, the 0.6B parameter variant demonstrated remarkable efficiency, rivaling the performance of much larger models and making it ideal for edge deployment.

Performance of Qwen3Guard variants across English, Chinese, and Multilingual benchmarks

In streaming scenarios, Stream Qwen3Guard achieved an exact hit rate of nearly 86% in identifying the first unsafe sentence. Furthermore, when integrated into Reinforcement Learning (RL) pipelines as a reward signal, the guard improved model safety from approximately 60% to over 97% on WildGuard scores without compromising helpfulness.

Conclusion and Future Work

Qwen3Guard represents a significant step toward flexible, real-time safety moderation. By moving beyond binary classification and enabling token-level monitoring, it provides developers with the tools necessary to adapt to diverse safety requirements. While the models show high performance, they remain subject to adversarial attacks and cultural biases inherent in training data. Future work will focus on geolocation-aware policies and enhancing robustness against sophisticated jailbreak attempts.

Summary updated

BibTeX
@misc{zhao2025qwen,
  author = {Haiquan Zhao and Chenhan Yuan and Fei Huang and Xiaomeng Hu and Yichang Zhang and An Yang and Bowen Yu and Dayiheng Liu and Jingren Zhou and Junyang Lin and Baosong Yang and Chen Cheng and Jialong Tang and Jiandong Jiang and Jianwei Zhang and Jijie Xu and Ming Yan and Minmin Sun and Pei Zhang and Pengjun Xie and Qiaoyu Tang and Qin Zhu and Rong Zhang and Shibin Wu and Shuo Zhang and Tao He and Tianyi Tang and Tingyu Xia and Wei Liao and Weizhou Shen and Wenbiao Yin and Wenmeng Zhou and Wenyuan Yu and Xiaobin Wang and Xiaodong Deng and Xiaodong Xu and Xinyu Zhang and Yang Liu and Yeqiu Li and Yi Zhang and Yong Jiang and Yu Wan and Yuxin Zhou},
  title = {{Qwen3Guard Technical Report}},
  year = {2025},
  eprint = {2510.14276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.14276},
}
Figure