GoEmotions Fine-tuned Model
이 모델은 GoEmotions 데이터셋 및 TRPG 문장으로 훈련된 다중 감정 분류 모델입니다.
모델 정보
- Base Model: Mango-Juice/trpg_mlm
- Task: Multi-label Emotion Classification
- Labels: 28개의 감정 라벨
- Training: 2차 파인튜닝 완료 (goEmotions 데이터 및 TRPG 문장 데이터)
감정 라벨 목록
- admiration
- amusement
- anger
- annoyance
- approval
- caring
- confusion
- curiosity
- desire
- disappointment
- disapproval
- disgust
- embarrassment
- excitement
- fear
- gratitude
- grief
- joy
- love
- nervousness
- optimism
- pride
- realization
- relief
- remorse
- sadness
- surprise
- neutral
사용 방법
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# 모델과 토크나이저 로드
tokenizer = AutoTokenizer.from_pretrained("Mango-Juice/trpg_emotion_classification")
model = AutoModelForSequenceClassification.from_pretrained("Mango-Juice/trpg_emotion_classification")
# 추론
def predict_emotions(text):
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=128)
with torch.no_grad():
logits = model(**inputs).logits
probs = torch.sigmoid(logits).cpu().numpy()[0]
emotion_labels = ['admiration', 'amusement', 'anger', 'annoyance', 'approval', 'caring', 'confusion', 'curiosity', 'desire', 'disappointment', 'disapproval', 'disgust', 'embarrassment', 'excitement', 'fear', 'gratitude', 'grief', 'joy', 'love', 'nervousness', 'optimism', 'pride', 'realization', 'relief', 'remorse', 'sadness', 'surprise', 'neutral']
return {emotion: float(prob) for emotion, prob in zip(emotion_labels, probs)}
# 예시
text = "I am so happy today!"
emotions = predict_emotions(text)
print(emotions)
성능
- Fine-tuning 완료된 모델로 향상된 감정 분류 성능 제공
- 희소 클래스에 대한 데이터 증강 적용
훈련 세부사항
- 데이터 증강: 파라프레이징 및 역번역 기반 오버샘플링
- 손실 함수: Focal Loss with Label Smoothing
- 옵티마이저: AdamW
- 스케줄러: ReduceLROnPlateau
- Downloads last month
- 9
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support