SetFit/emotion
Viewer • Updated • 20k • 1.25k • 30
How to use ShihHsuanChen/deberta-v3-emotion with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ShihHsuanChen/deberta-v3-emotion") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ShihHsuanChen/deberta-v3-emotion")
model = AutoModelForSequenceClassification.from_pretrained("ShihHsuanChen/deberta-v3-emotion")Code: Training Notebook
Criteria: Best validation loss
Training configuration:
{
"seed": 567,
"ddp": true,
"learning_rate": 5e-05,
"train_batch_size": 80,
"valid_batch_size": 80,
"lr_scheduler_type": "linear",
"num_epochs": 20,
"num_warmup_steps": 125,
"max_train_steps": null,
"max_valid_steps": null,
"max_length": 72
}
| sadness | joy | love | anger | fear | surprise | Total (Macro) | |
|---|---|---|---|---|---|---|---|
| Accuracy | 0.985420 | 0.965309 | 0.974359 | 0.983912 | 0.980392 | 0.985923 | 0.979219 |
| Precision | 0.966102 | 0.936709 | 0.858108 | 0.980159 | 0.868526 | 1.000000 | 0.934934 |
| Recall | 0.984456 | 0.965217 | 0.808917 | 0.901460 | 0.973214 | 0.569231 | 0.867083 |
| F1-Score | 0.975192 | 0.950749 | 0.832787 | 0.939163 | 0.917895 | 0.725490 | 0.890213 |
Base model
microsoft/deberta-v3-base