KoBERT 친밀도 예측 모델
이 모델은 대화 텍스트에서 화자 간의 친밀도를 예측하는 KoBERT 기반 모델입니다.
모델 설명
- 베이스 모델: KoBERT
- 출력: 친밀도 점수 (0~5 범위)
- 입력: 대화 텍스트
- 학습 데이터: 대화 텍스트와 친밀도 레이블
사용 예시
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# 모델과 토크나이저 로드
model = AutoModelForSequenceClassification.from_pretrained("kelly9457/bindly-I")
tokenizer = AutoTokenizer.from_pretrained("kelly9457/bindly-I")
# 텍스트 예시
text = "대화 텍스트를 입력하세요"
# 입력 전처리
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=128)
# 예측
with torch.no_grad():
outputs = model(**inputs)
intimacy_score = outputs["intimacy_scores"].item()
\print(f"예측된 친밀도 점수: {intimacy_score:.2f}/5.0")
모델 특징
- SmoothL1Loss를 사용하여 학습
- 친밀도 점수를 0~5 범위로 정규화
- AdamW 옵티마이저 사용
- Downloads last month
- 5