dair-ai/emotion
Viewer • Updated • 437k • 30.4k • 449
How to use pt-sk/distilbert-finetuned-emotion with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="pt-sk/distilbert-finetuned-emotion") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("pt-sk/distilbert-finetuned-emotion")
model = AutoModelForSequenceClassification.from_pretrained("pt-sk/distilbert-finetuned-emotion", device_map="auto")Distilbert is a variant of bert model(one of LLM models). This model with a classification head is used to classify the emotions of the input tweet. This model is a fine-tuned version of distilbert-base-uncased on the emotion dataset. It achieves the following results on the evaluation set:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.8537 | 1.0 | 250 | 0.3235 | 0.897 | 0.8958 |
| 0.2506 | 2.0 | 500 | 0.2195 | 0.9235 | 0.9233 |
Base model
distilbert/distilbert-base-uncased