CHILLGuard-4B
CHILLGuard: Towards Fine-Grained Chinese LLM Safety Guardrail with Scalable Data Construction and Model-aware Preference Alignment (Findings of EMNLP 2026)
CHILLGuard-4B is a fine-grained Chinese LLM content-safety guardrail classifier fine-tuned from Qwen3-4B-Instruct-2507. It judges whether a Chinese prompt is safe or unsafe, with a 5-macro / 31-micro harm taxonomy aligned with Chinese regulations and linguistic characteristics.
- 📄 Paper: arXiv:2606.15396
- 💻 Code & resources: GitHub - cswbyu/CHILLGuard
- 🤖 CHILLGuard series: 1.7B · 4B · 8B
- 🧪 Benchmark: CHILLGuardTest
- 📚 Training subset: CHILLGuardTrain-Subset-15K
- Achieves state-of-the-art performance on CHILLGuardTest at all three scales (1.7B / 4B / 8B); see the paper for results on public Chinese benchmarks.
Usage
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "cswbyu/CHILLGuard-4B"
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
messages = [
{"role": "system", "content": "你是一个安全审核助手。请只输出'安全'或'不安全'。"},
{"role": "user", "content": "请判断以下文本是否安全:\n<待检测文本>"},
]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt",
return_dict=True, enable_thinking=False
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=10, do_sample=False)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
# -> "安全" or "不安全"
vLLM
vllm serve cswbyu/CHILLGuard-4B --max-model-len 2048
> When calling the OpenAI-compatible server, pass `"chat_template_kwargs": {"enable_thinking": false}` in the request (required for 1.7B / 8B; no effect on 4B), and use the same system / user prompt as above.
Requires
transformers >= 5.3(the config uses the newdtypefield).
Training
The model is trained with the generator–classifier collaborative training framework (paper Sec. 4.3) via Model-aware Direct Preference Optimization (MDPO): three iterations, in which the classifier is fine-tuned from the Qwen3 base model in every iteration, while the uncensored Dolphin3.0-Llama3.1-8B rewriting generator produces adversarial prompts in iterations 1 and 2.
Intended Use & Limitations
- Intended for Chinese prompt-level content safety moderation in research and non-commercial guardrail settings.
- Optimized for Chinese content; generalization to other languages and emerging adaptive adversarial attacks is limited (see the paper's Limitations section).
- As with any moderation system, over-censorship and false positives are possible; human review is recommended for borderline cases.
Ethical Considerations
This model is trained on datasets containing examples of harmful content for the purpose of detecting and mitigating such content. It must not be used to generate harmful content. The datasets were screened to remove personally identifiable information.
Citation
@inproceedings{yu-etal-2026-chillguard,
title = "{CHILLG}uard: Towards Fine-Grained {C}hinese {LLM} Safety Guardrail with Scalable Data Construction and Model-aware Preference Alignment",
author = "Yu, Wenbo and
Wang, Bohua and
Fang, Hao and
Gao, Kuofeng and
Zeng, Jingru and
Yang, Xiaochen and
Zhang, Tianyi and
Ma, Xiaoxiao and
Kong, Jiawei and
Wu, Hao and
Chen, Bin and
Xia, Shu-Tao and
Zhang, Min",
editor = "Lee, Hung-Yi and
Dev, Sunipa and
Li, Jessy and
Elliott, Desmond",
booktitle = "Findings of the {A}ssociation for {C}omputational {L}inguistics: {EMNLP} 2026",
month = oct,
year = "2026",
address = "Budapest, Hungary",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.findings-emnlp.1721/",
doi = "10.18653/2026.findings-emnlp.1721",
pages = "36802--36827",
ISBN = "979-8-89176-462-0",
abstract = "Malicious content generated from large language models (LLMs) could pose severe safety risks and ethical concerns. While existing LLM safety guardrails excel in English or multilingual settings, they lack adaptation to Chinese-specific regulatory policies, cultural context, and linguistic nuances, failing to support fine-grained risk classification for diverse deployment needs. In this paper, we introduce a 5-macro, 31-micro category fine-grained risk taxonomy for Chinese scenarios, and build $\textbf{CHILLGuard}$: a dedicated $\textbf{Chi}$nese $\textbf{LL}$M content safety $\textbf{guard}$rail. To address the critical scarcity of high-quality annotated Chinese safety data, we propose a scalable multi-stage data construction pipeline: we expand multi-source corpus via retrieval-augmented generation, generate implicit harmful samples through prompt engineering rewriting, and refine high-quality data via multi-model voting-based label calibration. Based on this, we build $\textbf{CHILLGuardTrain}$, a large-scale training set with 405,007 samples, and $\textbf{CHILLGuardTest}$, a rigorously curated annotated test set with 51,745 samples. We then train CHILLGuard on CHILLGuardTrain under a generator-classifier collaborative framework via Model-aware Direct Preference Optimization. Extensive experiments under multiple settings demonstrate the state-of-the-art performance of CHILLGuard, e.g., a 15.92{\%} relative improvement of F1 score over Qwen3Guard-8B-Strict on our benchmark. We release our resources at https://github.com/cswbyu/CHILLGuard."
}