Loading…
Loading…
distilbert-base-uncased fine-tuned on the full IMDb training split (25,000 reviews) and evaluated on the full test split (25,000 reviews). Labels: negative, positive.
| Metric (IMDb test, 25,000 reviews) | Value |
|---|---|
| Accuracy | 0.910 |
| F1 | 0.911 |
| Precision / Recall (positive) | 0.906 / 0.916 |
| Eval loss | 0.456 |
2 epochs, batch 32, learning rate 2e-5, 200 warm-up steps, weight decay 0.01, max length 256 tokens, fp16, seed 42; 13.6 minutes on a Kaggle T4. The exact run is train_notebook.ipynb in this repo, also published on Kaggle: https://www.kaggle.com/code/engomaressam/distilbert-imdb-sentiment-fine-tuning-gpu
This model replaces an earlier upload under the same name that had been trained on 1,000 reviews for one epoch and scored 31% on the test set.
from transformers import pipeline
clf = pipeline("text-classification", model="omaressamrme/distilbert-imdb-sentiment")
clf("A decent watch with some flaws, but overall enjoyable.")
Reviews longer than 256 tokens are truncated; the model was trained on English film reviews and will be less reliable on other domains. Demo: https://huggingface.co/spaces/omaressamrme/demos
Omar Essam El Sherbiny: https://omaressam.web.app
distilbert/distilbert-base-uncased