CoolFace
Modelpublic

qusai00/distilbert-imdb-sentiment

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
0likes10downloads
Model Card

DistilBERT IMDB Sentiment Classifier

A fine-tuned DistilBERT model for binary sentiment analysis on the IMDB movie reviews dataset.

  • Task: Text Classification (Sentiment Analysis)
  • Labels: POSITIVE / NEGATIVE
  • Base model: distilbert-base-uncased
  • Framework: 🤗 Transformers + PyTorch

Model Description

This model is fine-tuned on a subset of the IMDB Reviews dataset to classify movie reviews as positive or negative. It is designed as a clean, end-to-end NLP project demonstrating:

  • Dataset loading
  • Tokenization
  • Fine-tuning with Trainer
  • Evaluation with Accuracy and F1
  • Inference using pipeline

Training Details

  • Dataset: IMDB (subset)
  • Train samples: 4,000
  • Validation samples: 1,000
  • Epochs: 3
  • Optimizer: AdamW
  • Batch size (train): 8
  • Batch size (eval): 16
  • Max sequence length: 512

Evaluation Results

MetricScore
Accuracy~0.90
F1-score~0.90
Note: Results are reported on a validation subset and are intended for demonstration purposes.

Usage

Quick Inference

python
from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="qusai00/distilbert-imdb-sentiment"
)

print(classifier("This movie was amazing, I loved it!"))
print(classifier("Terrible film, waste of time."))


Files in this Repository

. model.safetensors — fine-tuned model weights

. config.json — model configuration

. tokenizer.json / vocab.txt — tokenizer files

. training_args.bin — training configuration


Author

Qusai (qusai00)
AI / NLP Engineer in training