AnkitAI commited on
Commit
2c31e84
Β·
verified Β·
1 Parent(s): 02990f5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +100 -3
README.md CHANGED
@@ -1,3 +1,100 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ license: mit
2
+ datasets:
3
+ - dair-ai/emotion
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ widget:
8
+ - text: I am so happy with the results!
9
+ - text: I am so pissed with the results!
10
+ tags:
11
+ - debarta
12
+ - debarta-v3-small
13
+ - emotions-classifier
14
+ ---
15
+
16
+ # 🌟 Fast Emotion-X: Fine-tuned DeBERTa V3 Small Based Emotion Detection 🌟
17
+
18
+ This is a fine-tuned version of [microsoft/deberta-v3-small](https://huggingface.co/microsoft/deberta-v3-small) for emotion detection on the [dair-ai/emotion](https://huggingface.co/dair-ai/emotion) dataset.
19
+
20
+ ## πŸš€ Overview
21
+
22
+ Fast Emotion-X is a state-of-the-art emotion detection model fine-tuned from Microsoft's DeBERTa V3 Small model. Designed to accurately classify text into one of six emotional categories, Fast Emotion-X leverages the robust capabilities of DeBERTa and fine-tunes it on a comprehensive emotion dataset, ensuring high accuracy and reliability.
23
+
24
+ ## πŸ“œ Model Details
25
+
26
+ - **πŸ†• Model Name:** `AnkitAI/deberta-v3-small-base-emotions-classifier`
27
+ - **πŸ”— Base Model:** `microsoft/deberta-v3-small`
28
+ - **πŸ“Š Dataset:** [dair-ai/emotion](https://huggingface.co/dair-ai/emotion)
29
+ - **βš™οΈ Fine-tuning:** This model was fine-tuned for emotion detection with a classification head for six emotional categories (anger, disgust, fear, joy, sadness, surprise).
30
+
31
+ ## πŸ‹οΈ Training
32
+
33
+ The model was trained using the following parameters:
34
+
35
+ - **πŸ”§ Learning Rate:** 2e-5
36
+ - **πŸ“¦ Batch Size:** 4
37
+ - **βš–οΈ Weight Decay:** 0.01
38
+ - **πŸ“… Evaluation Strategy:** Epoch
39
+
40
+ ### πŸ‹οΈ Training Details
41
+
42
+ - **πŸ“‰ Eval Loss:** 0.0858
43
+ - **⏱️ Eval Runtime:** 110070.6349 seconds
44
+ - **πŸ“ˆ Eval Samples/Second:** 78.495
45
+ - **πŸŒ€ Eval Steps/Second:** 2.453
46
+ - **πŸ“‰ Train Loss:** 0.1049
47
+ - **⏳ Eval Accuracy:** 94.6%
48
+ - **πŸŒ€ Eval Precision:** 94.8%
49
+ - **⏱️ Eval Recall:** 94.5%
50
+ - **πŸ“ˆ Eval F1 Score:** 94.7%
51
+
52
+ ## πŸš€ Usage
53
+
54
+ You can use this model directly with the Hugging Face `transformers` library:
55
+
56
+ ```python
57
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
58
+
59
+ model_name = "AnkitAI/deberta-v3-small-base-emotions-classifier"
60
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
61
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
62
+
63
+ # Example usage
64
+ def predict_emotion(text):
65
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=128)
66
+ outputs = model(**inputs)
67
+ logits = outputs.logits
68
+ predictions = logits.argmax(dim=1)
69
+ return predictions
70
+
71
+ text = "I'm so happy with the results!"
72
+ emotion = predict_emotion(text)
73
+ print("Detected Emotion:", emotion)
74
+ ```
75
+
76
+ ## πŸ“ Emotion Labels
77
+ - 😠 Anger
78
+ - 🀒 Disgust
79
+ - 😨 Fear
80
+ - 😊 Joy
81
+ - 😒 Sadness
82
+ - 😲 Surprise
83
+
84
+
85
+ ## πŸ“œ Model Card Data
86
+
87
+ | Parameter | Value |
88
+ |-------------------------------|---------------------------|
89
+ | Model Name | microsoft/deberta-v3-small |
90
+ | Training Dataset | dair-ai/emotion |
91
+ | Number of Training Epochs | 20 |
92
+ | Learning Rate | 2e-5 |
93
+ | Per Device Train Batch Size | 4 |
94
+ | Evaluation Strategy | Epoch |
95
+ | Best Model Accuracy | 94.6% |
96
+
97
+
98
+ ## πŸ“œ License
99
+
100
+ This model is licensed under the [MIT License](LICENSE).