Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Arjun4707/Distilbert-base-uncased_dair-ai_emotion")
model = AutoModelForSequenceClassification.from_pretrained("Arjun4707/Distilbert-base-uncased_dair-ai_emotion", from_tf = True)
for more check out this notebook: https://github.com/BhammarArjun/NLP/blob/main/Model_validation_distilbert_emotions.ipynb
Model description
Model takes text as input and outputs an predictions for one of the 6 emotions.
[label_0 :'anger', label_1 : 'fear',
label_2 : 'joy', label_3 : 'love',
label_4 : 'sadness', label_5 : 'surprise']
Distilbert-base-uncased_dair-ai_emotion
This model is a fine-tuned version of distilbert-base-uncased on an dair-ai/emotion dataset. It achieves the following results on the evaluation set:
- Train Loss: 0.0896
- Train Accuracy: 0.9582
- Validation Loss: 0.1326
- Validation Accuracy: 0.9375
- Epoch: 4
Intended uses & limitations
Use to identify an emotion of a user from above mentioned emotions. The statements starts with 'I' in data. Need further training
Training and evaluation data
Training data size = 16000, validation data = 2000, and test data = 2000
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 2e-05, 'decay_steps': 2000, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
- training_precision: float32
Training results
Train Loss | Train Accuracy | Validation Loss | Validation Accuracy | Epoch |
---|---|---|---|---|
0.5820 | 0.8014 | 0.2002 | 0.9305 | 0 |
0.1598 | 0.9366 | 0.1431 | 0.9355 | 1 |
0.1101 | 0.9515 | 0.1390 | 0.9355 | 2 |
0.0896 | 0.9582 | 0.1326 | 0.9375 | 3 |
- Downloads last month
- 14
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for Arjun4707/Distilbert-base-uncased_dair-ai_emotion
Base model
distilbert/distilbert-base-uncased