tags: - text-classification - sentiment-analysis - distilbert - imdb datasets: - imdb metrics: - accuracy

DistilBERT Fine-tuned for IMDB Sentiment Analysis

This is a DistilBERT model fine-tuned on the IMDB movie review dataset for sentiment analysis (binary classification). The model classifies movie reviews as either positive (1) or negative (0).

Model Details

  • Model type: Text classification (DistilBERT)
  • Language: English
  • License: Apache 2.0
  • Fine-tuned from: distilbert-base-uncased
  • Dataset: IMDB

Training Details

  • Training data: 5,000 samples from IMDB train set
  • Validation data: 1,000 samples from IMDB test set
  • Training epochs: 3
  • Batch size: 8 (with gradient accumulation steps of 2)
  • Mixed precision training: FP16 enabled
  • Training hardware: Google Colab
  • Metrics: Accuracy

How to Use

You can use this model directly with the Hugging Face pipeline:

from transformers import pipeline

classifier = pipeline("text-classification", model="uncleMehrzad/distilbert-base-uncased-imdb-sentiment")
result = classifier("This movie was absolutely fantastic! The acting was superb.")
print(result)  # [{'label': 'POSITIVE', 'score': 0.999...}]

This is the model card of a ๐Ÿค— transformers model that has been pushed on the Hub. This model card has been automatically generated.

  • Developed by: [Amirreza Mehrzadian]
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Model type: [More Information Needed]
  • Language(s) (NLP): [More Information Needed]
  • License: [Apache 2.0]
  • Finetuned from model [Distill bert]: [More Information Needed]

Metrics

[accuracy]

Results

[89.6 on 1000 subsample of imdb dataset]

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