Young Chen commited on
Commit
c2fa45e
·
verified ·
1 Parent(s): 23b4462

Fine-tune DistilBERT on emotion dataset

Browse files
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - generated_from_trainer
5
+ metrics:
6
+ - accuracy
7
+ - f1
8
+ model-index:
9
+ - name: distilbert-emotion-project2
10
+ results: []
11
+ ---
12
+
13
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
+ should probably proofread and complete it, then remove this comment. -->
15
+
16
+ # distilbert-emotion-project2
17
+
18
+ This model was trained from scratch on an unknown dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.1819
21
+ - Accuracy: 0.939
22
+ - F1: 0.9391
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: 2e-05
42
+ - train_batch_size: 16
43
+ - eval_batch_size: 16
44
+ - seed: 42
45
+ - optimizer: Use adamw_torch_fused 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: 5
48
+ - mixed_precision_training: Native AMP
49
+
50
+ ### Training results
51
+
52
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
53
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
54
+ | 0.4848 | 1.0 | 1000 | 0.1866 | 0.9345 | 0.9349 |
55
+ | 0.1524 | 2.0 | 2000 | 0.1653 | 0.935 | 0.9341 |
56
+ | 0.114 | 3.0 | 3000 | 0.1671 | 0.9415 | 0.9415 |
57
+ | 0.0813 | 4.0 | 4000 | 0.1817 | 0.941 | 0.9413 |
58
+ | 0.0575 | 5.0 | 5000 | 0.1819 | 0.939 | 0.9391 |
59
+
60
+
61
+ ### Framework versions
62
+
63
+ - Transformers 4.55.2
64
+ - Pytorch 2.8.0+cu126
65
+ - Datasets 3.6.0
66
+ - Tokenizers 0.21.4
adversarial_samples.csv ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ text,predicted_label,score,second_label,second_score
2
+ So grateful for another last-minute change. I definitely did not want peace today.,LABEL_1,0.9284552335739136,LABEL_2,0.06179341673851013
3
+ I am fine. Totally fine. Just calmly imagining throwing my laptop into the sun.,LABEL_1,0.9980949759483337,LABEL_3,0.0005972525686956942
4
+ Haha what if everything goes wrong and I have no backup plan. Anyway good morning.,LABEL_1,0.9980632662773132,LABEL_0,0.0006628980045206845
5
+ Love how my whole day fell apart before breakfast. Amazing. 10/10 experience.,LABEL_5,0.9819968342781067,LABEL_1,0.00869794748723507
6
+ Congrats to everyone thriving while I’m over here getting character development against my will.,LABEL_1,0.9971104860305786,LABEL_2,0.0016377299325540662
config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation": "gelu",
3
+ "architectures": [
4
+ "DistilBertForSequenceClassification"
5
+ ],
6
+ "attention_dropout": 0.1,
7
+ "dim": 768,
8
+ "dropout": 0.1,
9
+ "hidden_dim": 3072,
10
+ "id2label": {
11
+ "0": "LABEL_0",
12
+ "1": "LABEL_1",
13
+ "2": "LABEL_2",
14
+ "3": "LABEL_3",
15
+ "4": "LABEL_4",
16
+ "5": "LABEL_5"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "label2id": {
20
+ "LABEL_0": 0,
21
+ "LABEL_1": 1,
22
+ "LABEL_2": 2,
23
+ "LABEL_3": 3,
24
+ "LABEL_4": 4,
25
+ "LABEL_5": 5
26
+ },
27
+ "max_position_embeddings": 512,
28
+ "model_type": "distilbert",
29
+ "n_heads": 12,
30
+ "n_layers": 6,
31
+ "pad_token_id": 0,
32
+ "problem_type": "single_label_classification",
33
+ "qa_dropout": 0.1,
34
+ "seq_classif_dropout": 0.2,
35
+ "sinusoidal_pos_embds": false,
36
+ "tie_weights_": true,
37
+ "torch_dtype": "float32",
38
+ "transformers_version": "4.55.2",
39
+ "vocab_size": 30522
40
+ }
high_loss_examples.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ text,label,predicted_label,loss,correct
2
+ i feel that he was being overshadowed by the supporting characters,love,sadness,9.053522,False
3
+ i as representative of everything thats wrong with corporate america and feel that sending him to washington is a ludicrous idea,surprise,sadness,8.891807,False
4
+ i feel stronger clearer but a little annoyed not quite sure why,anger,joy,8.252333,False
5
+ i feel food smarter already and slightly annoyed calories counting is so annoying,anger,joy,7.6506596,False
6
+ im kind of embarrassed about feeling that way though because my moms training was such a wonderfully defining part of my own life and i loved and still love,love,joy,7.6378036,False
7
+ i feel badly about reneging on my commitment to bring donuts to the faithful at holy family catholic church in columbus ohio,love,sadness,7.0655904,False
8
+ i was going to tell you more about my trip to oregon but right now im not super feeling it and reading about other peoples vacations gets a little boring right,sadness,joy,6.917752,False
9
+ i called myself pro life and voted for perry without knowing this information i would feel betrayed but moreover i would feel that i had betrayed god by supporting a man who mandated a barely year old vaccine for little girls putting them in danger to financially support people close to him,joy,sadness,6.8251047,False
10
+ i had applied for a job and they had assured me that the exams would take place a few months later a week later i went to obtain some more information and they told me that the exams had already taken place,anger,joy,6.6763296,False
11
+ im lazy my characters fall into categories of smug and or blas people and their foils people who feel inconvenienced by smug and or blas people,joy,fear,6.4646854,False
low_loss_examples.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ text,label,predicted_label,loss,correct
2
+ i really do like the feeling of accomplishing something worthwhile,joy,joy,0.00040713605,True
3
+ i would come inside in the evenings bone weary and covered in muck feeling like i was finally accomplishing something worthwhile something in which i could have real pride and joy,joy,joy,0.0004090426,True
4
+ i feel mellow i feel free and i feel completely unmoved by society,joy,joy,0.00041380903,True
5
+ i am a big believer in the phrase that some people are all style no substance and i feel that if you have nothing worthwhile to say just dont say it,joy,joy,0.0004141665,True
6
+ i nearly barfed on the day before came inside to ask me how i was feeling and as i assured her i was better and it was most likely something i ate she winked at me and said well you know there is something else that can make young women sick like that as well,joy,joy,0.00041500063,True
7
+ i scare myself so much with these dreams wake up feeling out of control and convinced that ive hurt somebody,joy,joy,0.0004159539,True
8
+ i have had my treasury selection on the front page a couple of times and believe me it is a real squeeee moment you feel jolly and smug and treat yourself to extra chocolate that day,joy,joy,0.00041857542,True
9
+ i will be happy when someone i know from across the internet feels happy as well,joy,joy,0.00041929036,True
10
+ i wont lie either i was feeling pretty superior as i was out there running knowing that very few people make a christmas day workout a priority,joy,joy,0.00042143522,True
11
+ i have a feeling that alot of people think and feel this way and im sure its just apart of growing up,joy,joy,0.00042250767,True
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a862ee8af1e10fee3cfb2d760b3e0e9318bccd789a3ade0575eaa25bd87bc67d
3
+ size 267844872
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": false,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "pad_token": "[PAD]",
51
+ "sep_token": "[SEP]",
52
+ "strip_accents": null,
53
+ "tokenize_chinese_chars": true,
54
+ "tokenizer_class": "DistilBertTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e1130452f24e2eb68d3a1783821f885b4f3eda0997d59192d8c62265578d4b4
3
+ size 5777
vocab.txt ADDED
The diff for this file is too large to render. See raw diff