DistilBERT for English emotion classification

This six-way classifier was fine-tuned from DistilBERT on the 16,000-example Emotion training split. Label IDs 0โ€“5 correspond to sadness, joy, love, anger, fear, and surprise. It expects English short text.

The selected run used learning rate 2e-05, 1 epoch, batch size 8, and seed 42. On the 2,000-example validation split, it achieved accuracy 0.9345 and weighted F1 0.9348. This split was also used to select the learning rate.

from transformers import pipeline

classify = pipeline("text-classification", model="./model", tokenizer="./model")
print(classify("I was afraid the rope might snap."))

The model assigns one of six labels. An input may express multiple emotions or require missing conversational context. Sarcasm, negation, and ambiguous expressions can lead to errors.

Downloads last month
20
Safetensors
Model size
67M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Linn-9/ENGLISH-EMOTION

Finetuned
(12,945)
this model