mokawa3018/cmj-chinese-aigc-text-detector
cmj-chinese-aigc-text-detector
This repository provides a fine-tuned Chinese AIGC text detector with both PyTorch and ONNX weights.
GitHub project: https://github.com/mokawa3018-ctrl/cmj-chinese-aigc-text-detector
Task
Binary classification for Chinese text:
0 = human
1 = AIThe model is intended as an auxiliary signal for AIGC text detection. It should not be used as the only basis for punishment, academic misconduct decisions, identity judgment, or other high-stakes decisions.
Base Model And Upstream Sources
This model was fine-tuned from yuchuantian/AIGC_detector_zhv3.
Upstream references:
- Base detector: https://huggingface.co/yuchuantian/AIGCdetectorzhv3
- Upstream code: https://github.com/YuchuanTian/AIGCtextdetector
- Chinese RoBERTa base: https://huggingface.co/hfl/chinese-roberta-wwm-ext
- Project repository: https://github.com/mokawa3018-ctrl/cmj-chinese-aigc-text-detector
The upstream model and code pages are marked Apache-2.0. HC3-Chinese is marked CC-BY-SA-4.0 on its dataset page. This model card does not claim unconditional commercial use; downstream users should review the upstream model, code, data, generated-data, and hosting terms for their own use case.
Training Data
The selected model was trained with a 1:1 balanced Chinese dataset:
- human samples: 850 train / 150 validation
- AI samples: 850 train / 150 validation
- AI generation sources were balanced across five model families in the training split
- train and validation were split by
pair_idto reduce question-level leakage
The training data combined HC3-Chinese and authorized multi-model generated text. Full training and test data are not included in this model repository.
Training Parameters
epochs: 1
batch_size: 16
validation_batch_size: 8
max_length: 512
learning_rate: 0.00002
weight_decay: 0.01
seed: 0
optimizer: AdamW
scheduler: no explicit scheduler found
loss: classification loss + 0.4 * PU loss
pu_type: dual_softmax_dyn_dtrun
prior: 0.2
length_threshold: 55Files
PyTorch / Transformers files are stored at the repository root:
config.json
pytorch_model.bin
tokenizer.json
tokenizer_config.json
special_tokens_map.json
vocab.txtONNX files are stored under onnx/:
onnx/model.onnx
onnx/config.json
onnx/tokenizer.json
onnx/tokenizer_config.json
onnx/special_tokens_map.json
onnx/vocab.txtEvaluation
Final balanced PyTorch model on fixed test sets:
HC3-Chinese 7,696-row test:
ONNX consistency, verified in the original server environment:
max absolute logits difference: 1.43e-6
max absolute probability difference: 2.31e-7
sample prediction labels: fully consistentONNX fixed test results:
ONNX Interface
ONNX export configuration used:
inputs: input_ids, attention_mask, token_type_ids
output: logits
opset: 14
dynamic batch: enabled
dynamic sequence length: enabledKnown Limitations
- Performance reflects the tested data and current splits, not all Chinese domains.
- The model may be sensitive to text length, topic distribution, prompt style, and unseen generators.
- Error analysis showed weaker performance on
nlpcc_dbqa, with legal and finance categories also requiring more attention than medicine, encyclopedia, psychology, and open-question text. - AIGC detection is probabilistic and should be combined with human review and other evidence.
License And Attribution
This repository includes Apache-2.0 license text because the upstream model and code pages are marked Apache-2.0. HC3-Chinese is marked CC-BY-SA-4.0. The model was trained from upstream work and should not be described as a from-scratch model.
Please preserve upstream attribution when reusing the model or code, and review all upstream and data licenses before redistribution or production use.
