Downloads · 30 days
65
71% of all-time downloads
omaressamrme/distilbert-imdb-sentiment
distilbert-imdb-sentiment is a text classification model from omaressamrme. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
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.
Downloads · 30 days
65
71% of all-time downloads
All-time downloads
91
Public
Parameters
67M
536 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
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