IMDB Sentiment Classifier (DistilBERT fine-tuned)

DistilBERT-base-uncased fine-tuned for binary sentiment classification (positive/negative movie reviews). A genuine transformer fine-tune performed locally on a 1,500-review IMDB subsample.

Model Characteristics

  • Base model: distilbert-base-uncased (Hugging Face)
  • Task: Binary sequence classification
  • Eval loss: 0.0005 (after early stopping on epoch 2)
  • Training: 2 epochs, lr 2e-5, batch 8, warmup 50 steps

Data Overview

  • Dataset: stanfordnlp/imdb (subsampled to 1,500 train / 300 test for CPU feasibility)
  • Text truncated/padded to 128 tokens

Evaluation Results

  • Eval loss: 0.000518
  • Early stopping triggered at epoch 2 of 3

Files

  • model.safetensors โ€” fine-tuned weights
  • config.json โ€” model config (2 labels)
  • tokenizer.json, tokenizer_config.json โ€” tokenizer
  • eval_metrics.txt โ€” final evaluation metrics

Usage

from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("bolewara/imdb-sentiment-distilbert")
tokenizer = AutoTokenizer.from_pretrained("bolewara/imdb-sentiment-distilbert")

Writeup

A full case study is in the accompanying writeup (also published on Kaggle): Fine-Tuning DistilBERT for Movie Review Sentiment Analysis.

Provenance

Fine-tuned by Anuj Bolewar (anujbolewar on Kaggle) from distilbert-base-uncased on stanfordnlp/imdb.

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

Model tree for bolewara/imdb-sentiment-distilbert

Finetuned
(12272)
this model