dair-ai/emotion
Viewer • Updated • 437k • 17.2k • 457
How to use ali619/distilbert-base-uncased-finetuned-emotion-detector-from-text with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ali619/distilbert-base-uncased-finetuned-emotion-detector-from-text") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ali619/distilbert-base-uncased-finetuned-emotion-detector-from-text")
model = AutoModelForSequenceClassification.from_pretrained("ali619/distilbert-base-uncased-finetuned-emotion-detector-from-text", device_map="auto")This model is a fine-tuned version of distilbert-base-uncased on the emotion dataset. It achieves the following results on the evaluation set:
This model is trained on english tweets and can classify emotions in text files.
More information needed
16,000 train samples 2,000 validation samples 2,000 test samples
Finetunning distilbert-base-uncased
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.1038 | 1.0 | 250 | 0.1757 | 0.9325 | 0.9329 |
| 0.094 | 2.0 | 500 | 0.1628 | 0.9345 | 0.9347 |
Base model
distilbert/distilbert-base-uncased