You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

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
-
Safetensors
Model size
0.4B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support