abhilash88 / roberta-sentimentic

huggingface.co
Total runs: 8
24-hour runs: 0
7-day runs: 3
30-day runs: 2
Model's Last Updated: July 11 2025
text-classification

Introduction of roberta-sentimentic

Model Details of roberta-sentimentic

RoBERTa-Sentimentic ๐ŸŽญ

Model License HuggingFace Model Python 3.8+

A state-of-the-art sentiment analysis model achieving 89.2% accuracy on IMDB and 91.5% on Stanford SST-2

RoBERTa-Sentimentic is a fine-tuned RoBERTa model specifically optimized for sentiment analysis across multiple domains. Trained on 50,000+ samples from IMDB movie reviews and Stanford Sentiment Treebank, it demonstrates exceptional performance in binary sentiment classification with robust cross-domain transfer capabilities.

๐Ÿš€ Quick Start
from transformers import pipeline

# Load the model
classifier = pipeline("sentiment-analysis", model="abhilash88/roberta-sentimentic")

# Single prediction
result = classifier("This movie is absolutely fantastic!")
print(result)
# [{'label': 'POSITIVE', 'score': 0.998}]

# Batch predictions
texts = [
    "Amazing cinematography and outstanding performances!",
    "Boring plot with terrible acting.",
    "A decent movie, nothing extraordinary."
]
results = classifier(texts)
for text, result in zip(texts, results):
    print(f"Text: {text}")
    print(f"Sentiment: {result['label']} (confidence: {result['score']:.3f})")
๐Ÿ“Š Performance Overview

RoBERTa-Sentimentic Performance

Benchmark Results
Dataset Pre-trained RoBERTa RoBERTa-Sentimentic Improvement
IMDB Movie Reviews 49.5% 89.2% +39.7%
Stanford SST-2 49.1% 91.5% +42.4%
Cross-domain (IMDBโ†’SST) 49.1% 87.7% +38.6%
Key Metrics
  • ๐ŸŽฏ Overall Accuracy : 90.4% (average across datasets)
  • โšก Inference Speed : ~100 samples/second (GPU)
  • ๐Ÿ”„ Cross-domain Transfer : 87.7% (excellent generalization)
  • ๐Ÿ’พ Model Size : 499MB (RoBERTa-base)
  • ๐Ÿ“ Max Input Length : 512 tokens
๐ŸŽฏ Model Performance Analysis

Cross-Domain Transfer

Confusion Matrices
IMDB Dataset Results
                Predicted
Actual    Negative  Positive
Negative      2789       336
Positive       341      2784

Precision: 89.2% | Recall: 89.1% | F1-Score: 89.1%
Stanford SST-2 Results
                Predicted
Actual    Negative  Positive
Negative       412        16
Positive        58       386

Precision: 91.5% | Recall: 91.4% | F1-Score: 91.5%
Before vs After Comparison
Metric Pre-trained Fine-tuned Improvement
IMDB Accuracy 49.5% 89.2% ๐Ÿ”ฅ +80.2% relative
SST-2 Accuracy 49.1% 91.5% ๐Ÿ”ฅ +86.4% relative
Average Confidence 0.51 0.94 +84.3%
Error Rate 50.7% 9.6% -81.1%
๐Ÿ› ๏ธ Technical Details

Model Architecture

Architecture
  • Base Model : roberta-base (125M parameters)
  • Task Head : Linear classification layer with dropout (0.1)
  • Output : Binary classification (Negative: 0, Positive: 1)
  • Tokenizer : RoBERTa tokenizer with 50,265 vocabulary
Training Configuration
Model: roberta-base
Fine-tuning Strategy: Domain-specific + Cross-domain validation
Training Samples: 50,000+ (IMDB: 25k, SST-2: 25k)

Hyperparameters:
  Learning Rate: 2e-5
  Batch Size: 16
  Epochs: 3
  Weight Decay: 0.01
  Warmup Steps: 200
  Max Length: 256 tokens
  
Optimization:
  Optimizer: AdamW
  Scheduler: Linear with warmup
  Loss Function: CrossEntropyLoss (with class weights for SST-2)
  
Hardware: NVIDIA GPU (Google Colab)
Training Time: ~25 minutes total
Data Processing
  • Text Preprocessing : Tokenization, truncation to 512 tokens
  • Label Mapping : Standardized to binary (0: Negative, 1: Positive)
  • Class Balancing : Weighted loss for imbalanced datasets
  • Cross-Validation : Train on one domain, validate on another
๐Ÿ“ˆ Training Process

Training Progress

Phase 1: IMDB Fine-tuning
  • Dataset : 25,000 IMDB movie reviews
  • Strategy : Same-domain fine-tuning
  • Result : 89.2% accuracy (baseline: 49.5%)
Phase 2: Cross-domain Evaluation
  • Test : IMDB-trained model on Stanford SST-2
  • Result : 87.7% accuracy (excellent transfer)
Phase 3: SST-2 Specific Fine-tuning
  • Dataset : 25,000 Stanford SST-2 sentences
  • Strategy : Domain-specific optimization with class weights
  • Result : 91.5% accuracy (baseline: 49.1%)
๐ŸŽช Use Cases
๐ŸŽฌ Movie & Entertainment
  • Movie Review Analysis : Classify sentiment in movie reviews, ratings
  • Streaming Platforms : Content recommendation based on user sentiment
  • Box Office Prediction : Analyze early reviews for revenue forecasting
๐Ÿ“ฑ Social Media & Marketing
  • Brand Monitoring : Track sentiment around products/services
  • Social Media Analysis : Analyze tweet sentiment, post reactions
  • Campaign Effectiveness : Measure marketing campaign reception
๐Ÿ›๏ธ E-commerce & Business
  • Product Reviews : Classify customer feedback sentiment
  • Customer Support : Prioritize negative feedback for immediate attention
  • Market Research : Analyze consumer sentiment trends
๐Ÿ“ฐ Content & Media
  • News Sentiment : Classify article sentiment and bias
  • Content Moderation : Detect negative sentiment for review
  • Audience Engagement : Understand reader reaction to content
๐Ÿ”ฌ Model Evaluation
Strengths
  • โœ… High Accuracy : 89-91% across different domains
  • โœ… Cross-domain Transfer : 87.7% when transferring between domains
  • โœ… Robust Performance : Consistent results across text types
  • โœ… Fast Inference : Real-time prediction capabilities
  • โœ… Production Ready : Extensively tested and validated
Limitations
  • โš ๏ธ Domain Specificity : Best performance on movie/entertainment content
  • โš ๏ธ Binary Only : No neutral sentiment classification
  • โš ๏ธ English Only : Trained exclusively on English text
  • โš ๏ธ Context Length : Limited to 512 tokens (typical for most reviews)
  • โš ๏ธ Sarcasm Detection : May struggle with heavily sarcastic content
Comparison with Other Models
Model IMDB Accuracy SST-2 Accuracy Parameters
RoBERTa-Sentimentic 89.2% 91.5% 125M
RoBERTa-base (pre-trained) 49.5% 49.1% 125M
BERT-base-uncased ~87.0% ~88.0% 110M
DistilBERT-base ~85.5% ~86.2% 67M
๐Ÿš€ Getting Started
Installation
pip install transformers torch
Basic Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline

# Method 1: Using pipeline (recommended)
classifier = pipeline("sentiment-analysis", model="abhilash88/roberta-sentimentic")
result = classifier("Your text here")

# Method 2: Direct model usage
tokenizer = AutoTokenizer.from_pretrained("abhilash88/roberta-sentimentic")
model = AutoModelForSequenceClassification.from_pretrained("abhilash88/roberta-sentimentic")

inputs = tokenizer("Your text here", return_tensors="pt", truncation=True)
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
Advanced Usage
import torch
from transformers import pipeline

# Load model with specific device
device = 0 if torch.cuda.is_available() else -1
classifier = pipeline(
    "sentiment-analysis", 
    model="abhilash88/roberta-sentimentic",
    device=device
)

# Batch processing for efficiency
texts = ["Text 1", "Text 2", "Text 3", ...]
results = classifier(texts, batch_size=32)

# Get raw confidence scores
for text, result in zip(texts, results):
    label = result['label']
    confidence = result['score']
    print(f"Text: {text}")
    print(f"Sentiment: {label} (confidence: {confidence:.3f})")
๐Ÿ“Š Evaluation Metrics
Detailed Performance Report
IMDB Dataset
              precision    recall  f1-score   support

    NEGATIVE       0.89      0.89      0.89      3125
    POSITIVE       0.89      0.89      0.89      3125

    accuracy                           0.89      6250
   macro avg       0.89      0.89      0.89      6250
weighted avg       0.89      0.89      0.89      6250
Stanford SST-2 Dataset
              precision    recall  f1-score   support

    NEGATIVE       0.92      0.96      0.94       428
    POSITIVE       0.96      0.87      0.91       444

    accuracy                           0.92       872
   macro avg       0.94      0.91      0.92       872
weighted avg       0.94      0.92      0.92       872
๐Ÿ”ง Fine-tuning Process
Dataset Preparation
# IMDB Dataset Processing
imdb_train: 25,000 samples (balanced: 50% positive, 50% negative)
imdb_test: 6,250 samples

# Stanford SST-2 Processing  
sst_train: 67,349 samples โ†’ sampled 25,000 (balanced)
sst_validation: 872 samples (used for evaluation)

# Label Standardization
IMDB: {0: "NEGATIVE", 1: "POSITIVE"} โœ“
SST-2: {-1: "NEGATIVE", 1: "POSITIVE"} โ†’ {0: "NEGATIVE", 1: "POSITIVE"} โœ“
Training Pipeline
  1. Data Loading : Load and preprocess IMDB + SST-2 datasets
  2. Tokenization : RoBERTa tokenizer with 256 max length
  3. Model Initialization : Fresh RoBERTa-base model
  4. Fine-tuning : Domain-specific training with AdamW optimizer
  5. Evaluation : Cross-domain validation and testing
  6. Optimization : Class weight balancing for imbalanced data
๐Ÿ“š Citation

If you use this model in your research, please cite:

@misc{roberta-sentimentic-2024,
  title={RoBERTa-Sentimentic: Fine-tuned Sentiment Analysis with Cross-Domain Transfer},
  author={Abhilash},
  year={2024},
  publisher={Hugging Face},
  journal={Hugging Face Model Hub},
  howpublished={\url{https://huggingface.co/abhilash88/roberta-sentimentic}}
}
๐Ÿ™ Acknowledgments
๐Ÿ“œ License

This model is released under the Apache 2.0 License. See LICENSE for details.

๐Ÿค Contact

๐ŸŒŸ If this model helped your project, please give it a โญ star! ๐ŸŒŸ

HuggingFace Model

Runs of abhilash88 roberta-sentimentic on huggingface.co

8
Total runs
0
24-hour runs
2
3-day runs
3
7-day runs
2
30-day runs

More Information About roberta-sentimentic huggingface.co Model

More roberta-sentimentic license Visit here:

https://choosealicense.com/licenses/apache-2.0

roberta-sentimentic huggingface.co

roberta-sentimentic huggingface.co is an AI model on huggingface.co that provides roberta-sentimentic's model effect (), which can be used instantly with this abhilash88 roberta-sentimentic model. huggingface.co supports a free trial of the roberta-sentimentic model, and also provides paid use of the roberta-sentimentic. Support call roberta-sentimentic model through api, including Node.js, Python, http.

roberta-sentimentic huggingface.co Url

https://huggingface.co/abhilash88/roberta-sentimentic

abhilash88 roberta-sentimentic online free

roberta-sentimentic huggingface.co is an online trial and call api platform, which integrates roberta-sentimentic's modeling effects, including api services, and provides a free online trial of roberta-sentimentic, you can try roberta-sentimentic online for free by clicking the link below.

abhilash88 roberta-sentimentic online free url in huggingface.co:

https://huggingface.co/abhilash88/roberta-sentimentic

roberta-sentimentic install

roberta-sentimentic is an open source model from GitHub that offers a free installation service, and any user can find roberta-sentimentic on GitHub to install. At the same time, huggingface.co provides the effect of roberta-sentimentic install, users can directly use roberta-sentimentic installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

roberta-sentimentic install url in huggingface.co:

https://huggingface.co/abhilash88/roberta-sentimentic

Url of roberta-sentimentic

roberta-sentimentic huggingface.co Url

Provider of roberta-sentimentic huggingface.co

abhilash88
ORGANIZATIONS

Other API from abhilash88