Downloads · 30 days
14
14% of all-time downloads
Floressek/sentiment_classification_from_distillbert
sentiment_classification_from_distillbert is a text classification model from Floressek. 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.
Lightweight sentiment classifier fine-tuned from distilbert-base-uncased to predict sentiment (negative vs. positive) for short English product reviews. Trained on a filtered subset of the Amazon Unlocked Mobile dataset.
Downloads · 30 days
14
14% of all-time downloads
All-time downloads
100
Public
Parameters
67M
4 GB on disk
Likes
1
Public
Click a slice to open those files.
.pt1.1 GB · 46%
From the Hugging Face model README
Lightweight sentiment classifier fine-tuned from distilbert-base-uncased to predict sentiment (negative vs. positive) for short English product reviews. Trained on a filtered subset of the Amazon Unlocked Mobile dataset.
distilbert-base-uncased0 -> negative (rating 1), 1 -> positive (rating 5)AutoTokenizer for the same checkpointAmazon_Unlocked_Mobile.csv)Rating ∈ {1, 5}; drop unrelated columnstest_size = 0.3, seed = 100transformers.Trainer2e-548 (train/eval per device)20.01epochComputed with accuracy and f1 on the held-out test split. See the repository "Files and versions" / "Training metrics" tabs for run artifacts and exact scores.
Python (Transformers pipeline):
from transformers import pipeline
clf = pipeline(
"text-classification",
model="Floressek/sentiment_classification_from_distillbert",
top_k=None # returns single label with score
)
print(clf("Great handset!"))
print(clf("Shame. I wish I hadn't bought it."))
---