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

Metric Score
Accuracy 0.9292 (92.92%)
F1 Score 0.9413

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

How to Use

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

ID Label Meaning
0 negative Negative sentiment
1 positive Positive sentiment

Training Details

Parameter Value
Base model roberta-base
Training data SST-2 (67K) + IMDB (25K) = 92K samples
Epochs 4
Batch size 32
Learning rate 2e-5
Max sequence length 256
Warmup ratio 0.1
Weight decay 0.01

Limitations

  • Trained on English text only
  • Optimized for movie/review-style text
  • Binary only (positive / negative) โ€” no neutral class
Downloads last month
100
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Datasets used to train samandar1105/sentiment-classifier

Space using samandar1105/sentiment-classifier 1

Evaluation results