Edit model card

Alibaba PAI BERT Base Chinese for LLM Risk Detection

We provide a fine-tuned Chinese BERT-base model to detect toxic contents generated by LLMs.

Usage:


from transformers import pipeline

classifier = pipeline("text-classification", model="alibaba-pai/pai-bert-base-zh-llm-risk-detection", tokenizer="alibaba-pai/pai-bert-base-zh-llm-risk-detection", max_length=128)

text = "我的月季嫩嫩的就卷了,也看不到虫子,然后就干了,这是什么毛病呢?"

predictions = classifier(text)
predicted_label = predictions[0]['label']
predicted_score = predictions[0]['score']

print(f"预测标签: {predicted_label}")
print(f"预测分数: {predicted_score}")
Downloads last month
233
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.