stanfordnlp/imdb
Viewer • Updated • 100k • 189k • 370
How to use Harry918/distilbert-imdb-sentiment with PEFT:
Task type is invalid.
A DistilBERT model fine-tuned on the IMDb movie review dataset for binary sentiment classification (POSITIVE/NEGATIVE), using LoRA (Low-Rank Adaptation) for parameter-efficient fine-tuning.
Classify English movie reviews and similar text as positive or negative sentiment. Built as a portfolio project demonstrating the ML fine-tuning pipeline.
| Metric | Baseline (SST-2 pretrained) | Fine-tuned (IMDb) |
|---|---|---|
| Accuracy | 0.8907 | 0.8878 |
| F1 | 0.8875 | 0.8884 |
Baseline is
distilbert-base-uncased-finetuned-sst-2-englishevaluated zero-shot on IMDb test set. Fine-tuned results are from the final model evaluated on the held-out IMDb test set (25,000 reviews).
from transformers import pipeline
classifier = pipeline("text-classification", model="Harry918/distilbert-imdb-sentiment")
result = classifier("This movie was absolutely fantastic!")
# Expected output: [{"label": "POSITIVE", "score": 0.99}]
print(result)
Published to Hub: https://huggingface.co/Harry918/distilbert-imdb-sentiment