๐Ÿฟ Movie Review Sentiment Classifier

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.

Quick inference

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}]

Metrics

Task Acc (test)
Sentiment (3 classes) 97.6%

Why so small?

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.

Training details

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.

Try it live

๐Ÿ‘‰ Gradio demo Space

Downloads last month
26
Safetensors
Model size
11.2M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for chennab28/movie-review-sentiment-classifier

Finetuned
(20)
this model

Dataset used to train chennab28/movie-review-sentiment-classifier

Space using chennab28/movie-review-sentiment-classifier 1

Evaluation results