rasendr1ya commited on
Commit
46ceac8
·
verified ·
1 Parent(s): b6afb97

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,3 +1,67 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - emotion-classification
5
+ - multilabel
6
+ - text-classification
7
+ - pytorch
8
+ - transformers
9
+ - deberta-v3-large
10
+ license: apache-2.0
11
+ metrics:
12
+ - f1
13
+ ---
14
+
15
+ # Multilabel Emotion Classification Model (DeBERTa-v3-large)
16
+
17
+ ## Model Description
18
+ This model is fine-tuned DeBERTa-v3-large for multilabel emotion classification. It can predict multiple emotions simultaneously from text with superior performance using disentangled attention mechanisms.
19
+
20
+ ## Emotions Detected
21
+ amusement, anger, annoyance, caring, confusion, disappointment, disgust, embarrassment, excitement, fear, gratitude, joy, love, sadness
22
+
23
+ ## Performance
24
+ - **Macro F1 Score**: 0.3913
25
+ - **Training Data**: 37164 samples
26
+ - **Validation Data**: 9291 samples
27
+
28
+ ## Key Features
29
+ - **Disentangled Attention**: Separates content and position representations
30
+ - **Enhanced Mask Decoder**: Better handling of masked tokens
31
+ - **Relative Position Bias**: Improved positional understanding
32
+ - **Multilabel Capability**: Simultaneous prediction of multiple emotions
33
+
34
+ ## Usage
35
+
36
+ ```python
37
+ from transformers import AutoTokenizer, AutoModel
38
+ import torch
39
+
40
+ tokenizer = AutoTokenizer.from_pretrained("your-username/emotion-classifier-deberta")
41
+ model = AutoModel.from_pretrained("your-username/emotion-classifier-deberta")
42
+
43
+ # Example usage
44
+ text = "I'm so happy and excited about this!"
45
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
46
+ with torch.no_grad():
47
+ outputs = model(**inputs)
48
+ predictions = torch.sigmoid(outputs.logits)
49
+ ```
50
+
51
+ ## Training Details
52
+ - **Base Model**: microsoft/deberta-v3-base
53
+ - **Training Epochs**: 2
54
+ - **Learning Rate**: 1e-05
55
+ - **Batch Size**: 16
56
+ - **Max Length**: 128
57
+ - **Memory Optimizations**: Gradient accumulation, FP16, gradient checkpointing
58
+
59
+ ## Model Architecture
60
+ - **Total Parameters**: 183,842,318
61
+ - **Trainable Parameters**: 183,842,318
62
+
63
+ ## Training Optimizations
64
+ - Mixed precision training (FP16)
65
+ - Gradient accumulation for memory efficiency
66
+ - Gradient checkpointing
67
+ - Early stopping based on macro F1 score
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "[MASK]": 128000
3
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:316514f89aa806a8e27eb5ae9ba4ad7074befe25dcdeabf1ac351e54fd76221d
3
+ size 735394440
special_tokens_map.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "[CLS]",
3
+ "cls_token": "[CLS]",
4
+ "eos_token": "[SEP]",
5
+ "mask_token": "[MASK]",
6
+ "pad_token": "[PAD]",
7
+ "sep_token": "[SEP]",
8
+ "unk_token": {
9
+ "content": "[UNK]",
10
+ "lstrip": false,
11
+ "normalized": true,
12
+ "rstrip": false,
13
+ "single_word": false
14
+ }
15
+ }
spm.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
3
+ size 2464616
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[CLS]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[SEP]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[UNK]",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "128000": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "[CLS]",
45
+ "clean_up_tokenization_spaces": false,
46
+ "cls_token": "[CLS]",
47
+ "do_lower_case": false,
48
+ "eos_token": "[SEP]",
49
+ "extra_special_tokens": {},
50
+ "mask_token": "[MASK]",
51
+ "model_max_length": 1000000000000000019884624838656,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "sp_model_kwargs": {},
55
+ "split_by_punct": false,
56
+ "tokenizer_class": "DebertaV2Tokenizer",
57
+ "unk_token": "[UNK]",
58
+ "vocab_type": "spm"
59
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d054748d9232de8904e2fd02191874d278f25cab16dff902995e2b99f39b89df
3
+ size 7160