CoolFace
Modelpublic

airzipm/sentiment-analysis-roberta

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes28downloads
Model Card

๐ŸŽญ Sentiment Analysis โ€” airzipm

A powerful 3-class sentiment analysis model fine-tuned from roberta-base on a combined corpus of 200 000+ samples spanning movie reviews, short sentences, tweets, and restaurant reviews.

๐Ÿท๏ธ Labels

IDLabelDescription
0NegativeNegative sentiment / opinion
1NeutralNeutral / mixed sentiment
2PositivePositive sentiment / opinion

๐Ÿ“Š Performance

MetricValue
Val Accuracy0.8239
Val F1 (macro)0.7827

๐Ÿš€ Quick Usage

python
from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="airzipm/sentiment-analysis-roberta",
)

# Single prediction
print(classifier("This movie was absolutely amazing!"))
# [{'label': 'Positive', 'score': 0.97}]

# Batch prediction
texts = [
    "Great product, highly recommend!",
    "It was okay, nothing special.",
    "Terrible experience, waste of money.",
]
for t, r in zip(texts, classifier(texts)):
    print(f"{t[:45]:50s} โ†’ {r['label']} ({r['score']:.1%})")

๐Ÿ› ๏ธ Training Details

SettingValue
Base modelroberta-base
Max token length128
Batch size32
Learning rate2e-5
OptimizerAdamW + warmup
Mixed precisionFP16
Label smoothing0.1
Class weightsBalanced

๐Ÿ“ฆ Training Data

DatasetDomainSamples
IMDBMovie reviews50 000
SST-2Short sentences50 000
Tweet EvalTwitter posts50 000
Yelp ReviewBusiness review50 000

๐Ÿ–ผ๏ธ Training Curves & Confusion Matrix

See training_curves.png and confusion_matrix.png in this repository.

๐Ÿ‘ค Author

Created by airzipm โ€” Hugging Face Profile