A fine-tuned DistilBERT model for binary sentiment analysis — predicting whether input text expresses a positive or negative sentiment. Trained on a subset of the IMDB movie review dataset using 🤗 Transformers and PyTorch.
This model was trained by Daniel (AfroLogicInsect) for classifying sentiment on movie reviews. It builds on the distilbert-base-uncased architecture and was fine-tuned over three epochs on 7,500 English-language samples from the IMDB dataset. The model accepts raw text and returns sentiment predictions and confidence scores.
1from transformers import pipeline
2
3classifier = pipeline("sentiment-analysis", model="AfroLogicInsect/sentiment-analysis-model")
4result = classifier("Absolutely loved it!")
5print(result)
-
Text: I loved this movie! It was absolutely fantastic!
-
Sentiment: Negative (confidence: 0.9991)
-
Text: This movie was terrible, completely boring.
-
Sentiment: Negative (confidence: 0.9995)
-
Text: The movie was okay, nothing special.
-
Sentiment: Negative (confidence: 0.9995)
-
Text: I loved this movie!
-
Sentiment: Negative (confidence: 0.9966)
-
Text: It was absolutely fantastic!
-
Sentiment: Negative (confidence: 0.9940)
The model performs well on balanced sentiment data and generalizes across a variety of movie review tones. Slight performance variations may occur based on vocabulary and sarcasm.
Carbon footprint estimated using
ML Impact Calculator
Hardware Type: GPU (single NVIDIA T4)
Hours used: ~2.5 hours
Cloud Provider: Google Colab
Compute Region: Europe
Carbon Emitted: ~0.3 kg CO₂eq
DistilBERT with a classification head trained for binary text classification.
@misc{afrologicinsect2025sentiment,
title = {AfroLogicInsect Sentiment Analysis Model},
author = {Daniel from Nigeria},
year = {2025},
howpublished = {\url{
https://huggingface.co/AfroLogicInsect/sentiment-analysis-model}},
}