CoolFace
Modelpublic

Harsha901/bert-sentiment-analysis-model

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes21downloads
Model Card

๐Ÿ“Š Sentiment Analysis with Fine-Tuned BERT (IMDB)

This repository contains a fine-tuned BERT model for binary sentiment classification using the IMDB movie reviews dataset. The model classifies reviews as positive or negative, and is built using Hugging Face Transformers and PyTorch.

๐Ÿš€ Model Performance

MetricValue
Accuracy89.4%
Validation Loss0.375
Epochs Trained3
Inference Speed~434 samples/sec

๐Ÿง  Model Details

  • โ€”Base Model: bert-base-uncased
  • โ€”Dataset: IMDB (binary sentiment)
  • โ€”Framework: Hugging Face Transformers
  • โ€”Fine-Tuning Setup:
  • โ€”Learning rate: 2e-5
  • โ€”Batch size: 32
  • โ€”Mixed-precision: โœ… (fp16)
  • โ€”Early stopping: โŒ (trained for full 3 epochs)

๐Ÿ› ๏ธ How to Use

python
from transformers import pipeline

classifier = pipeline("text-classification", model="Harsha901/tinybert-imdb-sentiment-analysis-model")
classifier("This movie was absolutely amazing!")