GTC-Guard-0 / README.md
clarenceleo's picture
Upload 10 files
7be6323 verified
|
Raw
History Blame Contribute Delete
1.07 kB
---
language: en
tags:
- text-classification
- safety
- toxicity-detection
- tai-research
pipeline_tag: text-classification
---
# GTC-Guard-0
TAI Guardian 系列的第一个安全模型,一个轻量级文本二分类器。
## 模型描述
判断输入文本是否包含有害/不安全内容。输出 `SAFE``UNSAFE`
- **参数量**: < 10M (实际约8.2M)
- **架构**: TF-IDF + Logistic Regression
- **训练数据**: Jigsaw Toxic Comment + 人工标注边界案例
## 使用方法
```python
import joblib
model = joblib.load('gtc_guard0_model.pkl')
vectorizer = joblib.load('gtc_guard0_vectorizer.pkl')
def predict(text):
vec = vectorizer.transform([text])
prob = model.predict_proba(vec)[0, 1]
return 'UNSAFE' if prob > 0.5 else 'SAFE'
print(predict("hello")) # SAFE
print(predict("i will kill you")) # UNSAFE
```
## 局限性
- 无法理解上下文(如 "damn" 的正面用法可能误报)
- 仅支持英文
- 基于小数据集训练,覆盖率有限
## 版本历史
- **GTC-Guard-0** (2026-05-23)
## 作者
TAI Research