Training in progress, epoch 1
Browse filesFiles changed (3)
- README.md+48-66
- model.safetensors+1-1
- training_args.bin+1-1
12345678912345678910111213141516111213141516171817182021222319202122232526272824253026273233343528293738394041303143323345464748495051523435543637565758596038396263644041424344454647484966676850517052535455565772735875765960787980818261626364# emotion-classification-model
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the [dair-ai/emotion dataset](https://huggingface.co/datasets/dair-ai/emotion). It is designed to classify text into various emotional categories.
It achieves the following results:
- **Validation Accuracy:** 93.55%
- **Test Accuracy:** 93.3%
## Model Description
---
library_name: transformers
license: apache-2.0
base_model: distilbert-base-uncased
tags:
- generated_from_trainer
metrics:
- accuracy
model-index:
- name: emotion-classification-model
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
This model uses the DistilBERT architecture, which is a lighter and faster variant of BERT. It has been fine-tuned specifically for emotion classification, making it suitable for tasks such as sentiment analysis, customer feedback analysis, and user emotion detection.
### Key Features
- Efficient and lightweight for deployment.
- High accuracy for emotion detection tasks.
- Pretrained on a diverse dataset and fine-tuned for high specificity to emotions.
## Intended Uses & Limitations
# emotion-classification-model
### Intended Uses
- Emotion analysis in text data.
- Sentiment detection in customer reviews, tweets, or user feedback.
- Psychological or behavioral studies to analyze emotional tone in communications.
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on an unknown dataset.
It achieves the following results on the evaluation set:
- Loss: 0.1616
- Accuracy: 0.935
### Limitations
- May not generalize well to datasets with highly domain-specific language.
- Might struggle with sarcasm, irony, or other nuanced forms of language.
- The model is English-specific and may not perform well on non-English text.
## Model description
## Training and Evaluation Data
More information needed
### Training Dataset
- **Dataset:** [dair-ai/emotion](https://huggingface.co/datasets/dair-ai/emotion)
- **Training Set Size:** 16,000 examples
- **Dataset Description:** The dataset contains English sentences labeled with six emotional categories: anger, joy, optimism, sadness, fear, and disgust.
## Intended uses & limitations
### Results
- **Training Time:** ~204 seconds
- **Training Loss:** 0.2034
- **Validation Accuracy:** 93.55%
- **Test Accuracy:** 93.3%
More information needed
## Training Procedure
## Training and evaluation data
### Hyperparameters
- **Learning Rate:** 5e-05
- **Batch Size:** 16 (train and evaluation)
- **Epochs:** 3
- **Seed:** 42
- **Optimizer:** AdamW (betas=(0.9,0.999), epsilon=1e-08)
- **Learning Rate Scheduler:** Linear
- **Mixed Precision Training:** Native AMP
More information needed
### Training and Validation Results
## Training procedure
| Epoch | Training Loss | Validation Loss | Validation Accuracy |
|-------|---------------|-----------------|---------------------|
| 1 | 0.2293 | 0.1746 | 93.35% |
| 2 | 0.1315 | 0.1529 | 93.70% |
| 3 | 0.0798 | 0.1554 | 93.55% |
### Training hyperparameters
### Test Results
- **Loss:** 0.1642
- **Accuracy:** 93.3%
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 3
- mixed_precision_training: Native AMP
### Performance Metrics
- **Training Speed:** ~204 samples/second
- **Evaluation Speed:** ~986 samples/second
### Training results
## Usage Example
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 0.2257 | 1.0 | 1000 | 0.1921 | 0.928 |
| 0.1291 | 2.0 | 2000 | 0.1478 | 0.9355 |
| 0.0804 | 3.0 | 3000 | 0.1616 | 0.935 |
```python
from transformers import pipeline
# Load the fine-tuned model
classifier = pipeline("text-classification", model="Panda0116/emotion-classification-model")
### Framework versions
# Example usage
text = "I am so happy to see you!"
emotion = classifier(text)
print(emotion)
```- Transformers 4.46.2
- Pytorch 2.5.1+cu124
- Datasets 3.1.0
- Tokenizers 0.20.31223version https://git-lfs.github.com/spec/v1oid sha256:4899d99cef6f8066c677b338c0f24a811fcc15eb70cfc02684b12b1c886047baoid sha256:007348ac54c71f33b9c2a21f49532beabd26d0b4ed1ae3cfa12e1a6071bccd4dsize 2678448721223version https://git-lfs.github.com/spec/v1oid sha256:de93cf9a819973d1deb510dbf9ffc915b90e20bdd80a6709eb4c901a06da436boid sha256:3cba5b5cdfe2bd7c7286f547ecdb60d5b2005bd39b68b7ed95b486a2cb5ab0cfsize 5304README.md+48-66
model.safetensors+1-1
training_args.bin+1-1