Downloads · 30 days
13
33% of all-time downloads
mdz25714/distilbert-base-uncased-finetuned_emotion
distilbert-base-uncased-finetuned_emotion is a text classification model from mdz25714. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of distilbert-base-uncased on the Twitter Emotion Dataset. It achieves the following results on the evaluation set: - Loss: 0.1325 - Accuracy: 0.9395 - F1: 0.9393
Downloads · 30 days
13
33% of all-time downloads
All-time downloads
40
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of distilbert-base-uncased on the Twitter Emotion Dataset. It achieves the following results on the evaluation set:
This model is a fine-tuned version of DistilBERT for six-class emotion classification.
Given an English text input, the model predicts one of the following emotions: sadness, joy, love, anger, fear, or surprise.
The model was fine-tuned using Hugging Face Transformers and the Trainer API.
This model can be used for:
The model was trained on a specific emotion dataset and may not generalize perfectly to all domains, writing styles, or languages.
Some emotions such as love and joy, or fear and sadness, can be semantically overlapping, which may result in ambiguous predictions.
| ID | Emotion |
|---|---|
| 0 | sadness |
| 1 | joy |
| 2 | love |
| 3 | anger |
| 4 | fear |
| 5 | surprise |
The model was fine-tuned on the Twitter Emotion Dataset, downloaded from Kaggle.
The dataset contains 416,809 English text samples annotated with six emotion classes:
The dataset was split into training, validation, and test sets for model training and evaluation.
The dataset is also available on Hugging Face as AiLab-IMCS-UL/twitter_emotions-en.
The following hyperparameters were used during training:
The fine-tuned model achieved:
The model was trained for 2 epochs with a learning rate of 1e-5 and a batch size of 64.
Analysis of high-loss examples showed that the most challenging cases were semantically similar emotions, particularly:
Some errors also appeared to be caused by ambiguous wording and strong emotion-related keywords that can occur across multiple emotion classes.
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.1274 | 1.0 | 313 | 0.1330 | 0.9385 | 0.9385 |
| 0.1102 | 2.0 | 626 | 0.1325 | 0.9395 | 0.9393 |