Downloads · 30 days
7
1% of all-time downloads
sid321axn/minilm-finetuned-emotionclassification
minilm-finetuned-emotionclassification is a text classification model from sid321axn. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
7
1% of all-time downloads
All-time downloads
653
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.bin134 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of microsoft/MiniLM-L12-H384-uncased on the None dataset. It achieves the following results on the evaluation set:
The base model used is Microsoft MiniLM-L12-H384-uncased which is finetuned on GoEmotions dataset available on huggingface.
With this model, you can classify emotions in English text data. The model predicts 10 basic emotions:
The model can be used to detect emotions from text/ documents which can be used for analysis contextual emotional analysis of the documents
The dataset used for Training and Evaluation is GoEmotions dataset and in this, we have used 10 emotion variables.
{0:'sadness',1:'joy',2:'love',3:'anger',4:'fear',5:'surprise',6:'excitement',7:'gratitude',8:'curiosity',9:'caring'}
Here is how to use this model to extract the emotions from the given text in PyTorch:
>>> from transformers import pipeline
>>> model_ckpt ="sid321axn/minilm-finetuned-emotionclassification"
>>> pipe = pipeline("text-classification",model=model_ckpt)
>>> pipe("I am really excited about second part of Brahmastra Movie")
[{'label': 'excitement', 'score': 0.7849715352058411}]
The training we have done by following this video on Youtube by huggingface
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | F1 Score |
|---|---|---|---|---|
| 1.1659 | 1.0 | 539 | 1.1419 | 0.6347 |
| 1.0719 | 2.0 | 1078 | 1.0789 | 0.6589 |
| 0.9893 | 3.0 | 1617 | 1.0537 | 0.6666 |
| 0.9296 | 4.0 | 2156 | 1.0366 | 0.6729 |
| 0.8763 | 5.0 | 2695 | 1.0359 | 0.6774 |
| 0.8385 | 6.0 | 3234 | 1.0484 | 0.6693 |
| 0.8085 | 7.0 | 3773 | 1.0478 | 0.6758 |
| 0.7842 | 8.0 | 4312 | 1.0488 | 0.6741 |
| 0.7608 | 9.0 | 4851 | 1.0538 | 0.6749 |
| 0.7438 | 10.0 | 5390 | 1.0554 | 0.6732 |