beomi/kcELECTRA-base-v2022를 기반으로,
jeanlee/kmhas_korean_hate_speech 데이터셋을 사용해 한국어 혐오 표현 분류 태스크에 맞춰 파인튜닝한 모델입니다.label=1 (혐오), label=0 (비혐오)8 (not_hate_speech)은 0, 그 외는 1로 binary classification 처리| 항목 | 값 |
|---|---|
| Train Epochs | 3 |
| Batch Size | 16 |
| Optimizer | AdamW |
| Learning Rate | 5e-5 |
| Evaluation Metric | Accuracy (추가 가능) |
1from transformers import pipeline
2
3model = pipeline("text-classification", model="jinkyeongk/kcELECTRA-toxic-detector")
4
5text = "너 진짜 못생겼다"
6result = model(text)
7
8print(result)
9# [{'label': 'LABEL_1', 'score': 0.987}] ← 혐오