stanfordnlp/imdb
Viewer • Updated • 100k • 188k • 389
A binary sentiment classification model that labels English text as POSITIVE or NEGATIVE. It is a fine-tuned version of distilbert-base-uncased trained on the IMDB movie reviews dataset.
The model takes a piece of English text and predicts whether the overall sentiment is positive or negative. It was built by fine-tuning DistilBERT — a smaller, faster distilled version of BERT — on labelled movie reviews, making it lightweight enough to run on CPU while retaining strong accuracy.
NEGATIVE (0), POSITIVE (1)Intended uses: Quick sentiment scoring of English text such as reviews, comments, and short feedback.
Limitations:
from transformers import pipeline
clf = pipeline("text-classification", model="rajaadil/my-sentiment-model")
print(clf("This movie was absolutely fantastic!"))
# [{'label': 'POSITIVE', 'score': 0.98}]
Or load the model and tokenizer directly:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("rajaadil/my-sentiment-model")
model = AutoModelForSequenceClassification.from_pretrained("rajaadil/my-sentiment-model")
The model was trained on a subset of the IMDB dataset:
| Hyperparameter | Value |
|---|---|
| Base model | distilbert-base-uncased |
| Epochs | 1 |
| Batch size | 8 |
| Max sequence length | 256 |
| Optimizer | AdamW (default) |
| Metric | Value |
|---|---|
| Accuracy | 0.869 |
Built by rajaadil.
Base model
distilbert/distilbert-base-uncased