Downloads · 30 days
651
60% of all-time downloads
hongssi/final_abuse_manual_model
final_abuse_manual_model is a machine learning model from hongssi. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
hongssi/finalabusemanualmodel은 한국어 문장에서 욕설, 혐오 표현, 모욕성 발언 등을 탐지하는 다중 레이블 분류 모델입니다. Smilegate의 UNSMILE 데이터셋 을 기반으로, beomi/KcELECTRA-small 모델을 파인튜닝하여 제작되었습니다.
Downloads · 30 days
651
60% of all-time downloads
All-time downloads
1.1K
Public
Parameters
109M
436 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
hongssi/final_abuse_manual_model은 한국어 문장에서 욕설, 혐오 표현, 모욕성 발언 등을 탐지하는 다중 레이블 분류 모델입니다.
Smilegate의 UNSMILE 데이터셋 을 기반으로, beomi/KcELECTRA-small 모델을 파인튜닝하여 제작되었습니다.
beomi/KcELECTRA-small[
"여성/가족", "남성", "성소수자", "인종/국적", "연령",
"지역", "종교", "기타 혐오", "악플/욕설", "clean", "개인지칭"
]
한 문장이 여러 라벨에 해당될 수 있습니다 (multi-label classification)
| 항목 | 값 |
|---|---|
| 데이터셋 | UNSMILE |
| 샘플 수 | 95,000+ 문장 |
| 모델 구조 | ELECTRA-small, classification head (11 output nodes) |
| 토큰화 | KcELECTRA tokenizer (uncased, 128 tokens max) |
| 입력 길이 | max_length=128 |
| 손실 함수 | Binary Cross Entropy (BCEWithLogitsLoss) |
| 옵티마이저 | AdamW |
| 러닝레이트 | 5e-5 |
| 배치사이즈 | 32 |
| 학습 에폭 | 5 epochs |
| 평가 지표 | Macro F1 Score, Binary Accuracy |
| 클래스 | F1 점수 |
|---|---|
| 악플/욕설 | 0.87 |
| 여성/가족 | 0.84 |
| 성소수자 | 0.78 |
| clean | 0.91 |
| 기타 평균 | Macro F1: 0.83 |
평가 기준은 UNSMILE validation set 기반이며, 실사용 환경에서 전처리 및 사전 탐지 시스템과 함께 사용할 수 있습니다.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
labels = [
"여성/가족", "남성", "성소수자", "인종/국적", "연령",
"지역", "종교", "기타 혐오", "악플/욕설", "clean", "개인지칭"
]
model_id = "hongssi/final_abuse_manual_model"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
model.eval()
text = "야 너는 사람도 아니다"
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=128)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.sigmoid(outputs.logits)[0]
results = {label: float(prob) for label, prob in zip(labels, probs)}
print(results)
본 모델은 Aho-Corasick 기반의 욕설 사전 탐지와 함께 사용할 경우, 모델이 탐지하지 못한 명시적 비속어도 보완할 수 있어 실사용에서 더욱 안정적인 운영이 가능합니다.
---