CoolFace
Modelpublic

samandar1105/sentiment-classifier

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes10downloads
Model Card

RoBERTa Fine-Tuned for Sentiment Analysis

This model classifies English text as either Positive ๐Ÿ˜Š or Negative ๐Ÿ˜ž.

Fine-tuned from roberta-base on a combination of SST-2 (Stanford Sentiment Treebank) and IMDB movie reviews.

Performance

MetricScore
Accuracy0.9292 (92.92%)
F1 Score0.9413

Evaluated on 20,000 held-out IMDB test samples.

How to Use

python
from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="samandar1105/sentiment-classifier"
)

result = classifier("This movie was absolutely fantastic!")
print(result)
# [{'label': 'positive', 'score': 0.998}]

Labels

IDLabelMeaning
0negativeNegative sentiment
1positivePositive sentiment

Training Details

ParameterValue
Base modelroberta-base
Training dataSST-2 (67K) + IMDB (25K) = 92K samples
Epochs4
Batch size32
Learning rate2e-5
Max sequence length256
Warmup ratio0.1
Weight decay0.01

Limitations

  • โ€”Trained on English text only
  • โ€”Optimized for movie/review-style text
  • โ€”Binary only (positive / negative) โ€” no neutral class