Downloads · 30 days
1.5K
1% of all-time downloads
FISA-conclave/klue-roberta-news-sentiment
klue-roberta-news-sentiment is a text classification model from FISA-conclave. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
이 모델은 뉴스 기사 속 특정 기업에 대한 감정(호재/악재/중립)을 분석하기 위해 fine-tuning된 KLUE-RoBERTa 모델입니다.
Downloads · 30 days
1.5K
1% of all-time downloads
All-time downloads
164K
Public
Parameters
111M
443 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors443 MB · 100%
From the Hugging Face model README
이 모델은 뉴스 기사 속 특정 기업에 대한 감정(호재/악재/중립)을 분석하기 위해 fine-tuning된 KLUE-RoBERTa 모델입니다.
0: negative (악재/부정) - 해당 기업에 대한 부정적 내용1: neutral (중립) - 해당 기업에 대한 중립적 내용2: positive (호재/긍정) - 해당 기업에 대한 긍정적 내용| Metric | Score |
|---|---|
| Accuracy | 0.8426 |
| F1-Macro | 0.8468 |
| F1-Weighted | 0.8422 |
{
"learning_rate": 9.78310992630157e-06,
"num_train_epochs": 8,
"weight_decay": 0.06436845335086991,
"warmup_ratio": 0.10859899755289561,
"per_device_train_batch_size": 32
}
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# 모델 로드
model_name = "FISA-conclave/klue-roberta-news-sentiment"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# 예측
text = "삼성전자의 3분기 실적이 시장 예상을 크게 상회했다."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=1)[0]
pred = torch.argmax(probs).item()
labels = {0: "negative", 1: "neutral", 2: "positive"}
print(f"예측: {labels[pred]} ({probs[pred]:.2%})")
@misc{klue-roberta-news-sentiment,
author = {Tobykim},
title = {KLUE-RoBERTa News Sentiment Analysis},
year = {2024},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/FISA-conclave/klue-roberta-news-sentiment}}
}
Apache 2.0