For more configuration options (e.g., batch size, device selection, custom prompt templates), please refer to single_infer.py and batch_infer.py.
Note: The inference scripts support both NPU and GPU devices.
🚩Citation
Please cite our repository if you use ChineseGuard in your work. Thanks!
@misc{liu2025chineseharmbenchchineseharmfulcontent,
title={ChineseHarm-Bench: A Chinese Harmful Content Detection Benchmark},
author={Kangwei Liu and Siyuan Cheng and Bozhong Tian and Xiaozhuan Liang and Yuyang Yin and Meng Han and Ningyu Zhang and Bryan Hooi and Xi Chen and Shumin Deng},
year={2025},
eprint={2506.10960},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2506.10960},
}