YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
π RoBERTa-Large Sentiment Analysis (3-Class) β Fine-Tuned Model
This repository contains a fine-tuned RoBERTa-Large model built for 3βclass sentiment analysis. The model predicts numeric sentiment labels:
- 0 = negative
- 1 = neutral
- 2 = positive
The model is trained using HuggingFace Transformers and saved in safetensors format.
π Model Summary
| Attribute | Value |
|---|---|
| Base Model | roberta-large |
| Task | Text Classification (3βclass sentiment) |
| Labels | 0 (negative), 1 (neutral), 2 (positive) |
| Hidden Size | 1024 |
| Layers | 24 |
| Attention Heads | 16 |
| Tokenizer Vocab Size | 50,265 |
| Format | safetensors |
| Framework | PyTorch |
| Pipeline Tag | text-classification |
π¦ Usage (HuggingFace Pipeline)
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="Tuhin20/roberta-sentiment-finetuned-final",
tokenizer="Tuhin20/roberta-sentiment-finetuned-final"
)
# Output labels will be numeric (0, 1, 2)
# 0 = negative, 1 = neutral, 2 = positive
result = classifier([
"I love this app!",
"The service was okay.",
"Worst experience ever."
])
print(result)
π¦ Manual Loading (Model + Tokenizer)
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
model = AutoModelForSequenceClassification.from_pretrained(
"Tuhin20/roberta-sentiment-finetuned-final"
)
tokenizer = AutoTokenizer.from_pretrained(
"Tuhin20/roberta-sentiment-finetuned-final"
)
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
print(classifier(["I love this!", "Terrible service."]))
π Training Metrics
| Epoch | Train Loss | Val Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|
| 1 | 0.5979 | 0.5779 | 0.7465 | 0.7473 | 0.7508 | 0.7465 |
| 2 | 0.4501 | 0.6117 | 0.7525 | 0.7521 | 0.7552 | 0.7525 |
π§ Training Configuration
- Base model: roberta-large
- Optimizer: AdamW
- Loss: CrossβEntropy
- Training Epochs: 2
- Scheduler: Linear warmup + decay
- Problem type: single_label_classification
- Dataset: Custom sentiment dataset (3 labels)
π Intended Use Cases
- App / Product Reviews
- Customer Feedback Analysis
- Social Media Sentiment
- General Sentiment Processing (3βclass)
β οΈ Limitations
- Optimized for English text
- Neutral class may be ambiguous
- Not suitable for legal/medical/safetyβcritical tasks
- Does not detect sarcasm or deep context
π· Tags
roberta-large, sentiment-analysis, 3-class, nlp, text-classification, transformers
π License
This model is not licensed by anyone and currently has no explicit license. You may add one later if required.
β¨ Author
Developed and fineβtuned by Tuhin20.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support