AnkitAI commited on
Commit
98abb99
β€’
1 Parent(s): c54114a

Update README.md

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