CoolFace
Modelpublic

Harsha901/tinybert-imdb-sentiment-analysis-model

sourceHugging Facemitupdated 1y agoView on Hugging Face
4likes887downloads
Model Card

#

๐Ÿ“ฆ TinyBERT IMDB Sentiment Analysis Model

This is a fine-tuned TinyBERT model for binary sentiment classification on a 5,000-sample subset of the IMDB dataset. It predicts whether a movie review is positive or negative.

๐Ÿง  Model Details

  • โ€”Base model: `huawei-noah/TinyBERT_General_4L_312D`
  • โ€”Task: Sentiment Classification (Binary)
  • โ€”Dataset: 4,000 training + 1,000 test samples from IMDB
  • โ€”Tokenizer: AutoTokenizer.from_pretrained('huawei-noah/TinyBERT_General_4L_312D')
  • โ€”Max length: 300 tokens
  • โ€”Batch size: 64
  • โ€”Training framework: Hugging Face Trainer
  • โ€”Device: A100 GPU

๐Ÿ“Š Evaluation Metrics

๐Ÿ“Š Evaluation Metrics (on 1,000-sample test set)

MetricValue
Accuracy88.02%
Evaluation Loss0.2962
Runtime30.9 sec
Samples per Second485

๐Ÿš€ How to Use

python
from transformers import pipeline

classifier = pipeline(
"text-classification",
model="Harsha901/tinybert-imdb-sentiment-analysis-model"
)

result = classifier("This movie was absolutely amazing!")
print(result) # [{'label': 'LABEL_1', 'score': 0.98}]