yunase/Bert_emotion_detection
Browse files- README.md +86 -0
- config.json +52 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: bert-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- accuracy
|
8 |
+
model-index:
|
9 |
+
- name: emotions_bert
|
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 |
+
# emotions_bert
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on an unknown dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 0.5151
|
21 |
+
- F1 Micro: 0.6887
|
22 |
+
- F1 Macro: 0.6024
|
23 |
+
- Accuracy: 0.1929
|
24 |
+
|
25 |
+
## Model description
|
26 |
+
|
27 |
+
More information needed
|
28 |
+
|
29 |
+
## Intended uses & limitations
|
30 |
+
|
31 |
+
More information needed
|
32 |
+
|
33 |
+
## Training and evaluation data
|
34 |
+
|
35 |
+
More information needed
|
36 |
+
|
37 |
+
## Training procedure
|
38 |
+
|
39 |
+
### Training hyperparameters
|
40 |
+
|
41 |
+
The following hyperparameters were used during training:
|
42 |
+
- learning_rate: 0.0001
|
43 |
+
- train_batch_size: 128
|
44 |
+
- eval_batch_size: 128
|
45 |
+
- seed: 42
|
46 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
47 |
+
- lr_scheduler_type: linear
|
48 |
+
- num_epochs: 10
|
49 |
+
- mixed_precision_training: Native AMP
|
50 |
+
|
51 |
+
### Training results
|
52 |
+
|
53 |
+
| Training Loss | Epoch | Step | Validation Loss | F1 Micro | F1 Macro | Accuracy |
|
54 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|:--------:|:--------:|
|
55 |
+
| 0.7549 | 0.4082 | 20 | 0.6455 | 0.6125 | 0.4264 | 0.1243 |
|
56 |
+
| 0.6144 | 0.8163 | 40 | 0.5675 | 0.6510 | 0.5188 | 0.1670 |
|
57 |
+
| 0.5496 | 1.2245 | 60 | 0.5414 | 0.6747 | 0.5570 | 0.1883 |
|
58 |
+
| 0.4878 | 1.6327 | 80 | 0.5191 | 0.6849 | 0.5894 | 0.2104 |
|
59 |
+
| 0.4754 | 2.0408 | 100 | 0.5140 | 0.6810 | 0.5909 | 0.2013 |
|
60 |
+
| 0.4027 | 2.4490 | 120 | 0.5169 | 0.6849 | 0.5880 | 0.2207 |
|
61 |
+
| 0.3986 | 2.8571 | 140 | 0.5151 | 0.6887 | 0.6024 | 0.1929 |
|
62 |
+
| 0.3711 | 3.2653 | 160 | 0.5187 | 0.6820 | 0.5991 | 0.2188 |
|
63 |
+
| 0.325 | 3.6735 | 180 | 0.5263 | 0.6753 | 0.5928 | 0.1942 |
|
64 |
+
| 0.3303 | 4.0816 | 200 | 0.5294 | 0.6900 | 0.5949 | 0.2149 |
|
65 |
+
| 0.2801 | 4.4898 | 220 | 0.5420 | 0.6840 | 0.5953 | 0.2097 |
|
66 |
+
| 0.2748 | 4.8980 | 240 | 0.5583 | 0.6797 | 0.5861 | 0.2162 |
|
67 |
+
| 0.2452 | 5.3061 | 260 | 0.5781 | 0.6758 | 0.5871 | 0.1981 |
|
68 |
+
| 0.2253 | 5.7143 | 280 | 0.5889 | 0.6715 | 0.5812 | 0.1929 |
|
69 |
+
| 0.226 | 6.1224 | 300 | 0.5955 | 0.6793 | 0.5852 | 0.2207 |
|
70 |
+
| 0.1958 | 6.5306 | 320 | 0.6120 | 0.6734 | 0.5861 | 0.2032 |
|
71 |
+
| 0.1952 | 6.9388 | 340 | 0.6209 | 0.6744 | 0.5806 | 0.2084 |
|
72 |
+
| 0.1758 | 7.3469 | 360 | 0.6339 | 0.6756 | 0.5789 | 0.2136 |
|
73 |
+
| 0.1691 | 7.7551 | 380 | 0.6412 | 0.6773 | 0.5779 | 0.2188 |
|
74 |
+
| 0.1613 | 8.1633 | 400 | 0.6431 | 0.6761 | 0.5794 | 0.2142 |
|
75 |
+
| 0.1486 | 8.5714 | 420 | 0.6532 | 0.6718 | 0.5763 | 0.2104 |
|
76 |
+
| 0.1529 | 8.9796 | 440 | 0.6577 | 0.6737 | 0.5747 | 0.2136 |
|
77 |
+
| 0.1436 | 9.3878 | 460 | 0.6658 | 0.6734 | 0.5744 | 0.2194 |
|
78 |
+
| 0.1399 | 9.7959 | 480 | 0.6640 | 0.6735 | 0.5745 | 0.2188 |
|
79 |
+
|
80 |
+
|
81 |
+
### Framework versions
|
82 |
+
|
83 |
+
- Transformers 4.40.2
|
84 |
+
- Pytorch 2.2.1+cu121
|
85 |
+
- Datasets 2.19.1
|
86 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "bert-base-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"BertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"id2label": {
|
13 |
+
"0": "anger",
|
14 |
+
"1": "anticipation",
|
15 |
+
"2": "disgust",
|
16 |
+
"3": "fear",
|
17 |
+
"4": "joy",
|
18 |
+
"5": "love",
|
19 |
+
"6": "optimism",
|
20 |
+
"7": "pessimism",
|
21 |
+
"8": "sadness",
|
22 |
+
"9": "surprise",
|
23 |
+
"10": "trust"
|
24 |
+
},
|
25 |
+
"initializer_range": 0.02,
|
26 |
+
"intermediate_size": 3072,
|
27 |
+
"label2id": {
|
28 |
+
"anger": 0,
|
29 |
+
"anticipation": 1,
|
30 |
+
"disgust": 2,
|
31 |
+
"fear": 3,
|
32 |
+
"joy": 4,
|
33 |
+
"love": 5,
|
34 |
+
"optimism": 6,
|
35 |
+
"pessimism": 7,
|
36 |
+
"sadness": 8,
|
37 |
+
"surprise": 9,
|
38 |
+
"trust": 10
|
39 |
+
},
|
40 |
+
"layer_norm_eps": 1e-12,
|
41 |
+
"max_position_embeddings": 512,
|
42 |
+
"model_type": "bert",
|
43 |
+
"num_attention_heads": 12,
|
44 |
+
"num_hidden_layers": 12,
|
45 |
+
"pad_token_id": 0,
|
46 |
+
"position_embedding_type": "absolute",
|
47 |
+
"torch_dtype": "float32",
|
48 |
+
"transformers_version": "4.40.2",
|
49 |
+
"type_vocab_size": 2,
|
50 |
+
"use_cache": true,
|
51 |
+
"vocab_size": 30522
|
52 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc98fc6e57ed6762e6a00176703b5ba66009aee0aab94550fab5754764c01b0d
|
3 |
+
size 437986332
|
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,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": true,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"model_max_length": 512,
|
49 |
+
"pad_token": "[PAD]",
|
50 |
+
"sep_token": "[SEP]",
|
51 |
+
"strip_accents": null,
|
52 |
+
"tokenize_chinese_chars": true,
|
53 |
+
"tokenizer_class": "BertTokenizer",
|
54 |
+
"unk_token": "[UNK]"
|
55 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:11502710e2f816c467721f23b5c655ca17b583b69b8f515cfd3ea878a5be362e
|
3 |
+
size 5112
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|