Panda0116 commited on
Commit
64d70d0
1 Parent(s): eec328c

Training in progress, epoch 1

Browse files
Files changed (3) hide show
  1. README.md +64 -83
  2. model.safetensors +1 -1
  3. training_args.bin +1 -1
README.md CHANGED
@@ -1,83 +1,64 @@
1
-
2
- # emotion-classification-model
3
-
4
- 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.
5
-
6
- It achieves the following results:
7
- - **Validation Accuracy:** 97.44%
8
- - **Test Accuracy:** 94.2%
9
-
10
- ## Model Description
11
-
12
- 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.
13
-
14
- ### Key Features
15
- - Efficient and lightweight for deployment.
16
- - High accuracy for emotion detection tasks.
17
- - Pretrained on a diverse dataset and fine-tuned for high specificity to emotions.
18
-
19
- ## Intended Uses & Limitations
20
-
21
- ### Intended Uses
22
- - Emotion analysis in text data.
23
- - Sentiment detection in customer reviews, tweets, or user feedback.
24
- - Psychological or behavioral studies to analyze emotional tone in communications.
25
-
26
- ### Limitations
27
- - May not generalize well to datasets with highly domain-specific language.
28
- - Might struggle with sarcasm, irony, or other nuanced forms of language.
29
- - The model is English-specific and may not perform well on non-English text.
30
-
31
- ## Training and Evaluation Data
32
-
33
- ### Training Dataset
34
- - **Dataset:** [dair-ai/emotion](https://huggingface.co/datasets/dair-ai/emotion)
35
- - **Training Set Size:** 16,000 examples
36
- - **Dataset Description:** The dataset contains English sentences labeled with six emotional categories: anger, joy, optimism, sadness, fear, and disgust.
37
-
38
- ### Results
39
- - **Training Time:** ~178 seconds
40
- - **Training Loss:** 0.2104
41
- - **Validation Accuracy:** 97.44%
42
- - **Test Accuracy:** 94.2%
43
-
44
- ## Training Procedure
45
-
46
- ### Hyperparameters
47
- - **Learning Rate:** 5e-05
48
- - **Batch Size:** 16 (train and evaluation)
49
- - **Epochs:** 3
50
- - **Seed:** 42
51
- - **Optimizer:** AdamW (betas=(0.9,0.999), epsilon=1e-08)
52
- - **Learning Rate Scheduler:** Linear
53
- - **Mixed Precision Training:** Native AMP
54
-
55
- ### Training and Validation Results
56
-
57
- | Epoch | Training Loss | Validation Loss | Validation Accuracy |
58
- |-------|---------------|-----------------|---------------------|
59
- | 1 | 0.2293 | 0.1746 | 93.35% |
60
- | 2 | 0.1315 | 0.1529 | 93.70% |
61
- | 3 | 0.2104 | 0.0553 | 97.44% |
62
-
63
- ### Test Results
64
- - **Loss:** 0.1606
65
- - **Accuracy:** 94.2%
66
-
67
- ### Performance Metrics
68
- - **Training Speed:** ~269 samples/second
69
- - **Evaluation Speed:** ~1310 samples/second
70
-
71
- ## Usage Example
72
-
73
- ```python
74
- from transformers import pipeline
75
-
76
- # Load the fine-tuned model
77
- classifier = pipeline("text-classification", model="Panda0116/emotion-classification-model")
78
-
79
- # Example usage
80
- text = "I am so happy to see you!"
81
- emotion = classifier(text)
82
- print(emotion)
83
- ```
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: distilbert-base-uncased
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - accuracy
9
+ model-index:
10
+ - name: emotion-classification-model
11
+ results: []
12
+ ---
13
+
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
+
17
+ # emotion-classification-model
18
+
19
+ This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on an unknown dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 0.1606
22
+ - Accuracy: 0.942
23
+
24
+ ## Model description
25
+
26
+ More information needed
27
+
28
+ ## Intended uses & limitations
29
+
30
+ More information needed
31
+
32
+ ## Training and evaluation data
33
+
34
+ More information needed
35
+
36
+ ## Training procedure
37
+
38
+ ### Training hyperparameters
39
+
40
+ The following hyperparameters were used during training:
41
+ - learning_rate: 5e-05
42
+ - train_batch_size: 16
43
+ - eval_batch_size: 16
44
+ - seed: 42
45
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
46
+ - lr_scheduler_type: linear
47
+ - num_epochs: 3
48
+ - mixed_precision_training: Native AMP
49
+
50
+ ### Training results
51
+
52
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
53
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
54
+ | 0.2304 | 1.0 | 1000 | 0.2112 | 0.926 |
55
+ | 0.1308 | 2.0 | 2000 | 0.1700 | 0.936 |
56
+ | 0.0862 | 3.0 | 3000 | 0.1606 | 0.942 |
57
+
58
+
59
+ ### Framework versions
60
+
61
+ - Transformers 4.46.2
62
+ - Pytorch 2.5.1+cu124
63
+ - Datasets 3.1.0
64
+ - Tokenizers 0.20.3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7bf30133ec52f77b31bf8d9126d9d7021bfc9b1bd68e4dc14f8e87ff0402d281
3
  size 267844872
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dc3d0fd9d6da080ffc2cb5c41e5d022824bbc0bbc2ccad4a536a19878d6d72a
3
  size 267844872
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:59ed4057eb7252d272121f46977d394a8feea2f5d51f6d4c77423b5998a764ba
3
  size 5304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:226d3493aa66c23a935229c114d00ebdd82371e95a0ef074dc4b9de8fa794e5d
3
  size 5304