Views
No views yet
distilbert-base-uncased on 5,000 IMDb movie reviews for 3 epochs.
Classifies text as POSITIVE or NEGATIVE sentiment.| Parameter | Value |
|---|---|
| Base Model | distilbert-base-uncased |
| Train Samples | 5,000 |
| Val Samples | 1,000 |
| Epochs | 3 |
| Learning Rate | 2e-5 |
| Batch Size | 16 |
| Max Token Length | 256 |
| Metric | Score |
|---|---|
| Accuracy | ~92% |
| F1 Score | ~0.92 |
| Model | Accuracy |
|---|---|
| TF-IDF + Logistic Regression | ~86% |
| DistilBERT (this model) | ~92% |
1from transformers import pipeline
2
3classifier = pipeline(
4 "text-classification",
5 model="sabahatfatima/distilbert-imdb-sentiment"
6)
7
8result = classifier("This movie was absolutely incredible!")
9# Output: [{'label': 'POSITIVE', 'score': 0.997}]