distilbert-base-uncased-finetuned-emotion-tweets
This model is a fine-tuned version of distilbert-base-uncased on an emotion dataset. It achieves the following results on the evaluation set:
- Loss: 0.2112
- Accuracy: 0.928
- F1: 0.9280
Model description
The model is used to classify 6 basic emotions : Anger, Disgust, Fear, Joy, Sadness and Suprise. The model is finetuned by previously trained DistilBert classification model.
Intended uses & limitations
There are multiple ways to use this model in Huggingface Transformers. Possibly the simplest is using a pipeline:
from transformers import pipeline
model_id = "Lokeshwaran/distilbert-base-uncased-finetuned-emotion-tweets"
classifier = pipeline("text-classification", model = model_id)
custom_tweet = "The movie was very good"
preds = classifier(custom_tweet, return_all_scores=True)
print(preds[0)
# produces a list of dicts for each of the labels
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 64
- eval_batch_size: 64
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2
Training results
Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
---|---|---|---|---|---|
0.7937 | 1.0 | 250 | 0.2966 | 0.9185 | 0.9180 |
0.2361 | 2.0 | 500 | 0.2112 | 0.928 | 0.9280 |
Framework versions
- Transformers 4.42.4
- Pytorch 2.3.1+cu121
- Datasets 2.21.0
- Tokenizers 0.19.1
- Downloads last month
- 1
Model tree for Lokeshwaran/distilbert-base-uncased-finetuned-emotion-tweets
Base model
distilbert/distilbert-base-uncased