Duplicate from lewtun/sagemaker-distilbert-emotion
Browse filesCo-authored-by: Lewis Tunstall <[email protected]>
- .gitattributes +28 -0
- .gitignore +1 -0
- README.md +150 -0
- config.json +41 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
.gitattributes
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
checkpoint-*/
|
README.md
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- emotion
|
7 |
+
metrics:
|
8 |
+
- accuracy
|
9 |
+
model-index:
|
10 |
+
- name: sagemaker-distilbert-emotion
|
11 |
+
results:
|
12 |
+
- task:
|
13 |
+
type: text-classification
|
14 |
+
name: Text Classification
|
15 |
+
dataset:
|
16 |
+
name: emotion
|
17 |
+
type: emotion
|
18 |
+
args: default
|
19 |
+
metrics:
|
20 |
+
- type: accuracy
|
21 |
+
value: 0.921
|
22 |
+
name: Accuracy
|
23 |
+
- task:
|
24 |
+
type: text-classification
|
25 |
+
name: Text Classification
|
26 |
+
dataset:
|
27 |
+
name: emotion
|
28 |
+
type: emotion
|
29 |
+
config: default
|
30 |
+
split: test
|
31 |
+
metrics:
|
32 |
+
- type: accuracy
|
33 |
+
value: 0.921
|
34 |
+
name: Accuracy
|
35 |
+
verified: true
|
36 |
+
verifyToken: >-
|
37 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNGRkMDBjODEwZWI2OTlhZmQ4ZGQ2MjRhZDMzZjA1ZTNkMWU0OTdhZTA3NjAzZGI1ZGFiMjFlNGQxY2MyM2Y2NiIsInZlcnNpb24iOjF9.lk_zOxIIclaySp7edHaCoBD4hSHBJkUNcv1z-2vhO_8Af5JYOgRjlNloztRJd9SuRISEyH4srmqsRx8hqiivAA
|
38 |
+
- type: precision
|
39 |
+
value: 0.8870419502496194
|
40 |
+
name: Precision Macro
|
41 |
+
verified: true
|
42 |
+
verifyToken: >-
|
43 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZTZhNTg0ODU0YmYxZGMxNDZhOTg4M2Y2OTUzZGZmZmQ3ZDdmMmQyMWQ1MTc3ZDIzM2ZlYjg3NGVhOTBhNzJiMiIsInZlcnNpb24iOjF9._ZojNfDN63jqrciNdn8xWhJ38IkaeIy_y8gOU0r9Wf3Ki06ZcrX4qAz8KVF9LIQffmK4EupUAlNFycxf3SZYBA
|
44 |
+
- type: precision
|
45 |
+
value: 0.921
|
46 |
+
name: Precision Micro
|
47 |
+
verified: true
|
48 |
+
verifyToken: >-
|
49 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiN2Y0ZGRhYWMxYTIwOGQzYzQ1MGIxOGZkMzM5YWYxN2RhZTgyZjJiNzc2MDY3YTk4YWYyOGI0MDE0M2JiYTk0NCIsInZlcnNpb24iOjF9.tPd-tWnKPt13vGMXk_OGpCgllvinP0Pry5YAvvcjnIKo33eJ5RCKay8u5Q2TTLCU71Lndf_x-A2qWInLXEk-AA
|
50 |
+
- type: precision
|
51 |
+
value: 0.9208079974712109
|
52 |
+
name: Precision Weighted
|
53 |
+
verified: true
|
54 |
+
verifyToken: >-
|
55 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNGUxYjkzM2MzOWNhYjIyZGE4ODYyY2E1MTRiMGNiMGM3NDk1Y2Q3ZjEyZDAzY2ZhZTFjYmE3YzY1MjM0YWMzZiIsInZlcnNpb24iOjF9.XNf83HOOYCJmb_BKpNM-ullwiqLoRBQLbA4FAa6v3bfH_BLwK3vve_Ym3xa7uNRkuJGM-clvkeXEaEqAz99JBA
|
56 |
+
- type: recall
|
57 |
+
value: 0.8688429370077566
|
58 |
+
name: Recall Macro
|
59 |
+
verified: true
|
60 |
+
verifyToken: >-
|
61 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiN2U0MmYzNTkyY2U0MDNiMDBjY2I3YWI0OGViZDBlZjJhNDBmZWE3NGYxMWFjMDFmMmVhM2RhZmY4ZWVlNzNkMiIsInZlcnNpb24iOjF9.J3qsAJm9T7kqmuOFs67Fq7RLEN2-cQ2RgUhqvvyO_OWXu3JVucTgCqQhpoKa1GHWVX0illbbozmAQ5OK5wBXCg
|
62 |
+
- type: recall
|
63 |
+
value: 0.921
|
64 |
+
name: Recall Micro
|
65 |
+
verified: true
|
66 |
+
verifyToken: >-
|
67 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMGQ2NGNkYWQwMWY3ZmIyNzBiMTEwM2M4MWVlNzJiMGExMjk5MmY4ODgxYjM1YjUwNGIwMjNkZDk3NTBlNjI5NCIsInZlcnNpb24iOjF9.iZgzAfNdWlyEKAWwE32o3D6Ely76ZJ2ySVxl0jBetL4YGWgOHSybrYvcZ2kB8sx3QfOc5L_vWyWNSbY5HAVeAA
|
68 |
+
- type: recall
|
69 |
+
value: 0.921
|
70 |
+
name: Recall Weighted
|
71 |
+
verified: true
|
72 |
+
verifyToken: >-
|
73 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiODcwOWIxMzFjM2VmM2E1MmZlOGM1N2JiNjQwMGM0MzEzNzQ5NzJlM2I3MDdkYTMzN2NlYzU5ZDQwODBjYWFmZiIsInZlcnNpb24iOjF9.PlvoxtJ9Bj5G2w_E6Cx5VG5maRPP5dn4YzOX0xYPu_J7iiXRRLvwp12Q6vIUwsZMoBM4jACrh-rQKZ_g_yyHCw
|
74 |
+
- type: f1
|
75 |
+
value: 0.87642650638535
|
76 |
+
name: F1 Macro
|
77 |
+
verified: true
|
78 |
+
verifyToken: >-
|
79 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiM2RiMzFkMGVhYjc3MmJjOGFkYTZiYzAxMGUyOTBmYWJhYmQ3NTg2M2MxZGExOGI4NTkwOWM2ODRlMGJjZjM3ZSIsInZlcnNpb24iOjF9.hVbjwMlCeyjJ-0BEhGuaI5T8MOsAkAgLTnp7zlhUEi2cireIEfAkpdsmBPuQJyZYaGZ5ZXmSybAP08X1ouNoBw
|
80 |
+
- type: f1
|
81 |
+
value: 0.9209999999999999
|
82 |
+
name: F1 Micro
|
83 |
+
verified: true
|
84 |
+
verifyToken: >-
|
85 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMTk0ODExMTliNTJlYjExNWExNDQ2NDUwNjkyMjA3ODg5YTk0NmFhNmMxZGQ0MzMxZjgxNGFjMmNkZWI1MTMzOCIsInZlcnNpb24iOjF9.dqucaDtPQ0A1KZkT4q9Ojfgtf2wZiJmjaKrvTdbhsvf7gNfYnJsMGaDIOxp_YoCEXGRMXKsknANx_VA7mOKSDA
|
86 |
+
- type: f1
|
87 |
+
value: 0.9203938811554648
|
88 |
+
name: F1 Weighted
|
89 |
+
verified: true
|
90 |
+
verifyToken: >-
|
91 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNDQ1MTYxMTFiNWYwZDExYThjMDVmODdiMmRjMmQzMzJmMWY5MWE0M2VhZmExZTEwMzFlMDQ2MWIyOTFjZDc4MyIsInZlcnNpb24iOjF9.T-HlP7Fl6NuPmqps7wHkTuGi_8wF6u6BuulCxX0sp8ocEP3j8GNH9goydsKTEHyLMmch9QuCrzqFmmGAW-wVAA
|
92 |
+
- type: loss
|
93 |
+
value: 0.23216550052165985
|
94 |
+
name: loss
|
95 |
+
verified: true
|
96 |
+
verifyToken: >-
|
97 |
+
eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMzVhNzYwZWIyN2QzMjU2OThiZjRmMjFlYTQ2MDA3ZTVmNmFkYzE1NDA1OWQzOTM4ZmRiMmQ0OGE2MzY4ZTY1ZCIsInZlcnNpb24iOjF9.Zj38hE02ePkNK7m1dhPq_N25CC9p0ZekFyCSBAS534GfhFuNhtUFhcgr6DDjyPTbn906RJDmVNxu7g01eCarAw
|
98 |
+
duplicated_from: lewtun/sagemaker-distilbert-emotion
|
99 |
+
---
|
100 |
+
|
101 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
102 |
+
should probably proofread and complete it, then remove this comment. -->
|
103 |
+
|
104 |
+
# sagemaker-distilbert-emotion
|
105 |
+
|
106 |
+
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset.
|
107 |
+
It achieves the following results on the evaluation set:
|
108 |
+
- Loss: 0.2322
|
109 |
+
- Accuracy: 0.921
|
110 |
+
|
111 |
+
## Model description
|
112 |
+
|
113 |
+
More information needed
|
114 |
+
|
115 |
+
## Intended uses & limitations
|
116 |
+
|
117 |
+
More information needed
|
118 |
+
|
119 |
+
## Training and evaluation data
|
120 |
+
|
121 |
+
More information needed
|
122 |
+
|
123 |
+
## Training procedure
|
124 |
+
|
125 |
+
### Training hyperparameters
|
126 |
+
|
127 |
+
The following hyperparameters were used during training:
|
128 |
+
- learning_rate: 3e-05
|
129 |
+
- train_batch_size: 32
|
130 |
+
- eval_batch_size: 64
|
131 |
+
- seed: 42
|
132 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
133 |
+
- lr_scheduler_type: linear
|
134 |
+
- lr_scheduler_warmup_steps: 500
|
135 |
+
- num_epochs: 1
|
136 |
+
- mixed_precision_training: Native AMP
|
137 |
+
|
138 |
+
### Training results
|
139 |
+
|
140 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
141 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
142 |
+
| 0.9306 | 1.0 | 500 | 0.2322 | 0.921 |
|
143 |
+
|
144 |
+
|
145 |
+
### Framework versions
|
146 |
+
|
147 |
+
- Transformers 4.12.3
|
148 |
+
- Pytorch 1.9.1
|
149 |
+
- Datasets 1.15.1
|
150 |
+
- Tokenizers 0.10.3
|
config.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "distilbert-base-uncased",
|
3 |
+
"activation": "gelu",
|
4 |
+
"architectures": [
|
5 |
+
"DistilBertForSequenceClassification"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
+
"dim": 768,
|
9 |
+
"dropout": 0.1,
|
10 |
+
"hidden_dim": 3072,
|
11 |
+
"id2label": {
|
12 |
+
"0": "sadness",
|
13 |
+
"1": "joy",
|
14 |
+
"2": "love",
|
15 |
+
"3": "anger",
|
16 |
+
"4": "fear",
|
17 |
+
"5": "surprise"
|
18 |
+
},
|
19 |
+
"initializer_range": 0.02,
|
20 |
+
"label2id": {
|
21 |
+
"anger": "3",
|
22 |
+
"fear": "4",
|
23 |
+
"joy": "1",
|
24 |
+
"love": "2",
|
25 |
+
"sadness": "0",
|
26 |
+
"surprise": "5"
|
27 |
+
},
|
28 |
+
"max_position_embeddings": 512,
|
29 |
+
"model_type": "distilbert",
|
30 |
+
"n_heads": 12,
|
31 |
+
"n_layers": 6,
|
32 |
+
"pad_token_id": 0,
|
33 |
+
"problem_type": "single_label_classification",
|
34 |
+
"qa_dropout": 0.1,
|
35 |
+
"seq_classif_dropout": 0.2,
|
36 |
+
"sinusoidal_pos_embds": false,
|
37 |
+
"tie_weights_": true,
|
38 |
+
"torch_dtype": "float32",
|
39 |
+
"transformers_version": "4.12.3",
|
40 |
+
"vocab_size": 30522
|
41 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d9812bba875f65c877a613edb2d23f9ad3811398b14dff9e0d4826d659c4a672
|
3 |
+
size 267872369
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "distilbert-base-uncased", "tokenizer_class": "DistilBertTokenizer"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3f7de9c48c371674852a1528b6c20d6fdf2b5c17659ff12c001c486c0769537c
|
3 |
+
size 2991
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|