DistilBERT Sentiment Analysis
Model Description
This model is fine-tuned from DistilBERT for binary sentiment analysis of movie reviews.
It classifies text into:
- 0: Negative
- 1: Positive
Base Model
distilbert/distilbert-base-uncased
Dataset
IMDb Movie Reviews Dataset
- Training samples: 2,000
- Testing samples: 500
Training
- Framework: Hugging Face Transformers
- Epochs: 1
- Maximum sequence length: 256
- Training batch size: 8
Evaluation Results
| Metric | Score |
|---|---|
| Accuracy | 86.00% |
| Precision | 84.92% |
| Recall | 86.99% |
| F1 Score | 85.94% |
Usage
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="YOUR_USERNAME/distilbert-sentiment"
)
print(classifier("This movie was excellent!"))
- Downloads last month
- -