fabriceyhc
commited on
Commit
·
8bd884c
1
Parent(s):
a1c4e9a
add model
Browse files- .gitignore +1 -0
- README.md +160 -0
- config.json +27 -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
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
checkpoint-*/
|
README.md
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- amazon_polarity
|
7 |
+
metrics:
|
8 |
+
- accuracy
|
9 |
+
model-index:
|
10 |
+
- name: bert-base-uncased-amazon_polarity
|
11 |
+
results:
|
12 |
+
- task:
|
13 |
+
name: Text Classification
|
14 |
+
type: text-classification
|
15 |
+
dataset:
|
16 |
+
name: amazon_polarity
|
17 |
+
type: amazon_polarity
|
18 |
+
args: amazon_polarity
|
19 |
+
metrics:
|
20 |
+
- name: Accuracy
|
21 |
+
type: accuracy
|
22 |
+
value: 0.94647
|
23 |
+
---
|
24 |
+
|
25 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
26 |
+
should probably proofread and complete it, then remove this comment. -->
|
27 |
+
|
28 |
+
# bert-base-uncased-amazon_polarity
|
29 |
+
|
30 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the amazon_polarity dataset.
|
31 |
+
It achieves the following results on the evaluation set:
|
32 |
+
- Loss: 0.2945
|
33 |
+
- Accuracy: 0.9465
|
34 |
+
|
35 |
+
## Model description
|
36 |
+
|
37 |
+
More information needed
|
38 |
+
|
39 |
+
## Intended uses & limitations
|
40 |
+
|
41 |
+
More information needed
|
42 |
+
|
43 |
+
## Training and evaluation data
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Training procedure
|
48 |
+
|
49 |
+
### Training hyperparameters
|
50 |
+
|
51 |
+
The following hyperparameters were used during training:
|
52 |
+
- learning_rate: 5e-05
|
53 |
+
- train_batch_size: 1
|
54 |
+
- eval_batch_size: 8
|
55 |
+
- seed: 42
|
56 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
57 |
+
- lr_scheduler_type: linear
|
58 |
+
- lr_scheduler_warmup_steps: 1782000
|
59 |
+
- training_steps: 17820000
|
60 |
+
|
61 |
+
### Training results
|
62 |
+
|
63 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
64 |
+
|:-------------:|:-----:|:------:|:---------------:|:--------:|
|
65 |
+
| 0.7155 | 0.0 | 2000 | 0.7060 | 0.4622 |
|
66 |
+
| 0.7054 | 0.0 | 4000 | 0.6925 | 0.5165 |
|
67 |
+
| 0.6842 | 0.0 | 6000 | 0.6653 | 0.6116 |
|
68 |
+
| 0.6375 | 0.0 | 8000 | 0.5721 | 0.7909 |
|
69 |
+
| 0.4671 | 0.0 | 10000 | 0.3238 | 0.8770 |
|
70 |
+
| 0.3403 | 0.0 | 12000 | 0.3692 | 0.8861 |
|
71 |
+
| 0.4162 | 0.0 | 14000 | 0.4560 | 0.8908 |
|
72 |
+
| 0.4728 | 0.0 | 16000 | 0.5071 | 0.8980 |
|
73 |
+
| 0.5111 | 0.01 | 18000 | 0.5204 | 0.9015 |
|
74 |
+
| 0.4792 | 0.01 | 20000 | 0.5193 | 0.9076 |
|
75 |
+
| 0.544 | 0.01 | 22000 | 0.4835 | 0.9133 |
|
76 |
+
| 0.4745 | 0.01 | 24000 | 0.4689 | 0.9170 |
|
77 |
+
| 0.4403 | 0.01 | 26000 | 0.4778 | 0.9177 |
|
78 |
+
| 0.4405 | 0.01 | 28000 | 0.4754 | 0.9163 |
|
79 |
+
| 0.4375 | 0.01 | 30000 | 0.4808 | 0.9175 |
|
80 |
+
| 0.4628 | 0.01 | 32000 | 0.4340 | 0.9244 |
|
81 |
+
| 0.4488 | 0.01 | 34000 | 0.4162 | 0.9265 |
|
82 |
+
| 0.4608 | 0.01 | 36000 | 0.4031 | 0.9271 |
|
83 |
+
| 0.4478 | 0.01 | 38000 | 0.4502 | 0.9253 |
|
84 |
+
| 0.4237 | 0.01 | 40000 | 0.4087 | 0.9279 |
|
85 |
+
| 0.4601 | 0.01 | 42000 | 0.4133 | 0.9269 |
|
86 |
+
| 0.4153 | 0.01 | 44000 | 0.4230 | 0.9306 |
|
87 |
+
| 0.4096 | 0.01 | 46000 | 0.4108 | 0.9301 |
|
88 |
+
| 0.4348 | 0.01 | 48000 | 0.4138 | 0.9309 |
|
89 |
+
| 0.3787 | 0.01 | 50000 | 0.4066 | 0.9324 |
|
90 |
+
| 0.4172 | 0.01 | 52000 | 0.4812 | 0.9206 |
|
91 |
+
| 0.3897 | 0.02 | 54000 | 0.4013 | 0.9325 |
|
92 |
+
| 0.3787 | 0.02 | 56000 | 0.3837 | 0.9344 |
|
93 |
+
| 0.4253 | 0.02 | 58000 | 0.3925 | 0.9347 |
|
94 |
+
| 0.3959 | 0.02 | 60000 | 0.3907 | 0.9353 |
|
95 |
+
| 0.4402 | 0.02 | 62000 | 0.3708 | 0.9341 |
|
96 |
+
| 0.4115 | 0.02 | 64000 | 0.3477 | 0.9361 |
|
97 |
+
| 0.3876 | 0.02 | 66000 | 0.3634 | 0.9373 |
|
98 |
+
| 0.4286 | 0.02 | 68000 | 0.3778 | 0.9378 |
|
99 |
+
| 0.422 | 0.02 | 70000 | 0.3540 | 0.9361 |
|
100 |
+
| 0.3732 | 0.02 | 72000 | 0.3853 | 0.9378 |
|
101 |
+
| 0.3641 | 0.02 | 74000 | 0.3951 | 0.9386 |
|
102 |
+
| 0.3701 | 0.02 | 76000 | 0.3582 | 0.9388 |
|
103 |
+
| 0.4498 | 0.02 | 78000 | 0.3268 | 0.9375 |
|
104 |
+
| 0.3587 | 0.02 | 80000 | 0.3825 | 0.9401 |
|
105 |
+
| 0.4474 | 0.02 | 82000 | 0.3155 | 0.9391 |
|
106 |
+
| 0.3598 | 0.02 | 84000 | 0.3666 | 0.9388 |
|
107 |
+
| 0.389 | 0.02 | 86000 | 0.3745 | 0.9377 |
|
108 |
+
| 0.3625 | 0.02 | 88000 | 0.3776 | 0.9387 |
|
109 |
+
| 0.3511 | 0.03 | 90000 | 0.4275 | 0.9336 |
|
110 |
+
| 0.3428 | 0.03 | 92000 | 0.4301 | 0.9336 |
|
111 |
+
| 0.4042 | 0.03 | 94000 | 0.3547 | 0.9359 |
|
112 |
+
| 0.3583 | 0.03 | 96000 | 0.3763 | 0.9396 |
|
113 |
+
| 0.3887 | 0.03 | 98000 | 0.3213 | 0.9412 |
|
114 |
+
| 0.3915 | 0.03 | 100000 | 0.3557 | 0.9409 |
|
115 |
+
| 0.3378 | 0.03 | 102000 | 0.3627 | 0.9418 |
|
116 |
+
| 0.349 | 0.03 | 104000 | 0.3614 | 0.9402 |
|
117 |
+
| 0.3596 | 0.03 | 106000 | 0.3834 | 0.9381 |
|
118 |
+
| 0.3519 | 0.03 | 108000 | 0.3560 | 0.9421 |
|
119 |
+
| 0.3598 | 0.03 | 110000 | 0.3485 | 0.9419 |
|
120 |
+
| 0.3642 | 0.03 | 112000 | 0.3754 | 0.9395 |
|
121 |
+
| 0.3477 | 0.03 | 114000 | 0.3634 | 0.9426 |
|
122 |
+
| 0.4202 | 0.03 | 116000 | 0.3071 | 0.9427 |
|
123 |
+
| 0.3656 | 0.03 | 118000 | 0.3155 | 0.9441 |
|
124 |
+
| 0.3709 | 0.03 | 120000 | 0.2923 | 0.9433 |
|
125 |
+
| 0.374 | 0.03 | 122000 | 0.3272 | 0.9441 |
|
126 |
+
| 0.3142 | 0.03 | 124000 | 0.3348 | 0.9444 |
|
127 |
+
| 0.3452 | 0.04 | 126000 | 0.3603 | 0.9436 |
|
128 |
+
| 0.3365 | 0.04 | 128000 | 0.3339 | 0.9434 |
|
129 |
+
| 0.3353 | 0.04 | 130000 | 0.3471 | 0.9450 |
|
130 |
+
| 0.343 | 0.04 | 132000 | 0.3508 | 0.9418 |
|
131 |
+
| 0.3174 | 0.04 | 134000 | 0.3753 | 0.9436 |
|
132 |
+
| 0.3009 | 0.04 | 136000 | 0.3687 | 0.9422 |
|
133 |
+
| 0.3785 | 0.04 | 138000 | 0.3818 | 0.9396 |
|
134 |
+
| 0.3199 | 0.04 | 140000 | 0.3291 | 0.9438 |
|
135 |
+
| 0.4049 | 0.04 | 142000 | 0.3372 | 0.9454 |
|
136 |
+
| 0.3435 | 0.04 | 144000 | 0.3315 | 0.9459 |
|
137 |
+
| 0.3814 | 0.04 | 146000 | 0.3462 | 0.9401 |
|
138 |
+
| 0.359 | 0.04 | 148000 | 0.3981 | 0.9361 |
|
139 |
+
| 0.3552 | 0.04 | 150000 | 0.3226 | 0.9469 |
|
140 |
+
| 0.345 | 0.04 | 152000 | 0.3731 | 0.9384 |
|
141 |
+
| 0.3228 | 0.04 | 154000 | 0.2956 | 0.9471 |
|
142 |
+
| 0.3637 | 0.04 | 156000 | 0.2869 | 0.9477 |
|
143 |
+
| 0.349 | 0.04 | 158000 | 0.3331 | 0.9430 |
|
144 |
+
| 0.3374 | 0.04 | 160000 | 0.4159 | 0.9340 |
|
145 |
+
| 0.3718 | 0.05 | 162000 | 0.3241 | 0.9459 |
|
146 |
+
| 0.315 | 0.05 | 164000 | 0.3544 | 0.9391 |
|
147 |
+
| 0.3215 | 0.05 | 166000 | 0.3311 | 0.9451 |
|
148 |
+
| 0.3464 | 0.05 | 168000 | 0.3682 | 0.9453 |
|
149 |
+
| 0.3495 | 0.05 | 170000 | 0.3193 | 0.9469 |
|
150 |
+
| 0.305 | 0.05 | 172000 | 0.4132 | 0.9389 |
|
151 |
+
| 0.3479 | 0.05 | 174000 | 0.3465 | 0.947 |
|
152 |
+
| 0.3537 | 0.05 | 176000 | 0.3277 | 0.9449 |
|
153 |
+
|
154 |
+
|
155 |
+
### Framework versions
|
156 |
+
|
157 |
+
- Transformers 4.10.2
|
158 |
+
- Pytorch 1.7.1
|
159 |
+
- Datasets 1.12.1
|
160 |
+
- Tokenizers 0.10.3
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"problem_type": "single_label_classification",
|
22 |
+
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.10.2",
|
24 |
+
"type_vocab_size": 2,
|
25 |
+
"use_cache": true,
|
26 |
+
"vocab_size": 30522
|
27 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:037b49d4da34f299f74533c074a9d31f444454ed561d8f58b689eedef37c7264
|
3 |
+
size 438024063
|
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": "bert-base-uncased", "tokenizer_class": "BertTokenizer"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:963f327b156517d39125ea1e010d1dd247108f6f16a2555726f1cceb7a992532
|
3 |
+
size 2607
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|