Downloads · 30 days
9
25% of all-time downloads
neeraj-mO/bert-emotion-finetuned
bert-emotion-finetuned is a text classification model from neeraj-mO. 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.
Fine-tuned bert-base-uncased for 6-class emotion classification on the dair-ai/emotion dataset.
Downloads · 30 days
9
25% of all-time downloads
All-time downloads
36
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
Fine-tuned bert-base-uncased for 6-class emotion classification on the dair-ai/emotion dataset.
bert-base-uncased| Metric | Score |
|---|---|
| Accuracy | 91.75% |
| Weighted F1 | 91.64% |
Evaluated on the validation split after training.
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="neeraj-miniOrange/bert-emotion-finetuned"
)
result = classifier("I am so happy today!")
print(result)
# [{'label': 'joy', 'score': 0.98...}]
| Hyperparameter | Value |
|---|---|
| Epochs | 2 |
| Learning rate | 2e-4 |
| Batch size | 64 |
| Weight decay | 0.01 |
| Optimizer | AdamW |
Data split: 70% train / 20% test / 10% validation (stratified)
If you use this model, please cite the BERT paper:
@article{devlin2019bert,
title={BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding},
author={Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
journal={NAACL},
year={2019}
}