Loading…
Loading…
A tiny BERT model (google/bert_uncased_L-4_H-256_A-4, ~10M params)
fine-tuned for 3-way movie review sentiment classification:
positive / negative / neutral
Trained on the companion dataset
chennab28/movie-review-sentiment
in a couple of minutes on CPU.
from transformers import pipeline
pipe = pipeline("text-classification", model="chennab28/movie-review-sentiment-classifier")
print(pipe("A breathtaking masterpiece with stunning cinematography."))
# [{'label': 'positive', 'score': 0.99}]
| Task | Acc (test) |
|---|---|
| Sentiment (3 classes) | 97.6% |
This is deliberately a minimal end-to-end example of the Hugging Face workflow — Dataset → Model → Space. Despite having only ~10M parameters, the model reaches 97.6% accuracy on the held-out test split.
| Config | Value |
|---|---|
| base model | google/bert_uncased_L-4_H-256_A-4 |
| epochs | 30 |
| batch size | 16 |
| lr | 5e-5 |
| max seq len | 128 |
| data | 168 train / 42 test rows |
Reproduce with train/train.py --epochs 30 in this repo.
google/bert_uncased_L-4_H-256_A-4