stanfordnlp/imdb
Viewer • Updated • 100k • 269k • 380
A fine-tuned DistilBERT model for binary sentiment analysis on movie reviews.
Author: Sabahat Fatima GitHub: SabahatFatima55 Live Demo: Gradio Space
Fine-tuned from 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% |
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="sabahatfatima/distilbert-imdb-sentiment"
)
result = classifier("This movie was absolutely incredible!")
# Output: [{'label': 'POSITIVE', 'score': 0.997}]