zjunlp / ChineseGuard-3B

huggingface.co
Total runs: 3
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: June 13 2025
text-classification

Introduction of ChineseGuard-3B

Model Details of ChineseGuard-3B

🚀Installation
  1. Clone the repositories:

    git clone https://github.com/zjunlp/ChineseHarm-bench
    cd ChineseHarm-bench
    git clone https://github.com/hiyouga/LLaMA-Factory
    
  2. Install dependencies:

    cd LLaMA-Factory
    pip install -e ".[torch,metrics]" 
    
📚Inference

We release the following variants of our harmful content detection model:

🔹 Single Inference (Example)

Run single-input inference using the ChineseGuard-3B model:

SCRIPT_PATH="../infer/single_infer.py"
model_name="zjunlp/ChineseGuard-3B"
text="代发短信,有想做的联系我,无押金"

python $SCRIPT_PATH \
    --model_name $model_name \
    --text $text

🔸 Batch Inference (Multi-NPU or Multi-GPU)

To run inference on the entire ChineseHarm-Bench using ChineseGuard-3B and 8 NPUs:

SCRIPT_PATH="../infer/batch_infer.py"
model_name="zjunlp/ChineseHarm-3B"
file_name="../benchmark/bench.json"
output_file="../benchmark/bench_ChineseHarm-3B.json"

python $SCRIPT_PATH \
    --model_name $model_name \
    --file_name $file_name \
    --output_file $output_file \
    --num_npus 8

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}, 
}

Runs of zjunlp ChineseGuard-3B on huggingface.co

3
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About ChineseGuard-3B huggingface.co Model

More ChineseGuard-3B license Visit here:

https://choosealicense.com/licenses/cc-by-nc-4.0

ChineseGuard-3B huggingface.co

ChineseGuard-3B huggingface.co is an AI model on huggingface.co that provides ChineseGuard-3B's model effect (), which can be used instantly with this zjunlp ChineseGuard-3B model. huggingface.co supports a free trial of the ChineseGuard-3B model, and also provides paid use of the ChineseGuard-3B. Support call ChineseGuard-3B model through api, including Node.js, Python, http.

ChineseGuard-3B huggingface.co Url

https://huggingface.co/zjunlp/ChineseGuard-3B

zjunlp ChineseGuard-3B online free

ChineseGuard-3B huggingface.co is an online trial and call api platform, which integrates ChineseGuard-3B's modeling effects, including api services, and provides a free online trial of ChineseGuard-3B, you can try ChineseGuard-3B online for free by clicking the link below.

zjunlp ChineseGuard-3B online free url in huggingface.co:

https://huggingface.co/zjunlp/ChineseGuard-3B

ChineseGuard-3B install

ChineseGuard-3B is an open source model from GitHub that offers a free installation service, and any user can find ChineseGuard-3B on GitHub to install. At the same time, huggingface.co provides the effect of ChineseGuard-3B install, users can directly use ChineseGuard-3B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

ChineseGuard-3B install url in huggingface.co:

https://huggingface.co/zjunlp/ChineseGuard-3B

Url of ChineseGuard-3B

ChineseGuard-3B huggingface.co Url

Provider of ChineseGuard-3B huggingface.co

zjunlp
ORGANIZATIONS

Other API from zjunlp

huggingface.co

Total runs: 915
Run Growth: 623
Growth Rate: 68.09%
Updated:March 04 2024
huggingface.co

Total runs: 514
Run Growth: -1.4K
Growth Rate: -273.15%
Updated:March 04 2024
huggingface.co

Total runs: 36
Run Growth: -50
Growth Rate: -138.89%
Updated:May 06 2024
huggingface.co

Total runs: 27
Run Growth: 10
Growth Rate: 37.04%
Updated:January 27 2024
huggingface.co

Total runs: 16
Run Growth: -14
Growth Rate: -87.50%
Updated:March 21 2023
huggingface.co

Total runs: 11
Run Growth: 0
Growth Rate: 0.00%
Updated:October 01 2025
huggingface.co

Total runs: 10
Run Growth: 3
Growth Rate: 30.00%
Updated:October 01 2025
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:July 28 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 22 2022
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 07 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 09 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 17 2023