Text Classification
Transformers
Safetensors
English
distilbert
emotion-classification
text-embeddings-inference
Instructions to use haydenpham/6emotions-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use haydenpham/6emotions-distilbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="haydenpham/6emotions-distilbert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("haydenpham/6emotions-distilbert") model = AutoModelForSequenceClassification.from_pretrained("haydenpham/6emotions-distilbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
6 Emotions: DistilBERT
Fine-tuned distilbert-base-uncased for seven-class emotion classification:
anger, fear, joy, love, sadness, surprise, and neutral.
Training data
The base data combines EmotionRecognitionDataset, GoEmotions, and AACIntent. AACIntent is stratified to 20,000 rows, text is deduplicated, and each base label is capped at 6,000 rows before a 60%/20%/20% split. Unique SynthSarcasm examples are independently shuffled and stratified 60%/20%/20%, then appended to the matching base splits. AAC scores below 0.35 are labeled neutral.
Test results
- Accuracy: 0.7918
- Macro precision: 0.7926
- Macro recall: 0.7942
- Macro F1: 0.7932
- Weighted precision: 0.7912
- Weighted recall: 0.7918
- Weighted F1: 0.7913
Usage
from transformers import pipeline
classifier = pipeline("text-classification", model="haydenpham/6emotions-distilbert")
classifier("I am so happy to see you.")
- Downloads last month
- 24