pnadel/pri_modelv2
Browse files- README.md +62 -0
- all_results.json +13 -0
- config.json +38 -0
- eval_results.json +8 -0
- preprocessor_config.json +22 -0
- pytorch_model.bin +3 -0
- train_results.json +8 -0
- trainer_state.json +241 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: google/vit-base-patch16-224-in21k
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- accuracy
|
8 |
+
model-index:
|
9 |
+
- name: pri_docidv2
|
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 |
+
# pri_docidv2
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on an unknown dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 0.1914
|
21 |
+
- Accuracy: 0.9571
|
22 |
+
|
23 |
+
## Model description
|
24 |
+
|
25 |
+
More information needed
|
26 |
+
|
27 |
+
## Intended uses & limitations
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Training and evaluation data
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training procedure
|
36 |
+
|
37 |
+
### Training hyperparameters
|
38 |
+
|
39 |
+
The following hyperparameters were used during training:
|
40 |
+
- learning_rate: 0.0003
|
41 |
+
- train_batch_size: 16
|
42 |
+
- eval_batch_size: 8
|
43 |
+
- seed: 42
|
44 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
45 |
+
- lr_scheduler_type: linear
|
46 |
+
- num_epochs: 10
|
47 |
+
|
48 |
+
### Training results
|
49 |
+
|
50 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
51 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
52 |
+
| 0.0366 | 3.23 | 100 | 0.3685 | 0.9286 |
|
53 |
+
| 0.006 | 6.45 | 200 | 0.1914 | 0.9571 |
|
54 |
+
| 0.0031 | 9.68 | 300 | 0.2109 | 0.9571 |
|
55 |
+
|
56 |
+
|
57 |
+
### Framework versions
|
58 |
+
|
59 |
+
- Transformers 4.32.1
|
60 |
+
- Pytorch 2.0.1+cu118
|
61 |
+
- Datasets 2.14.4
|
62 |
+
- Tokenizers 0.13.3
|
all_results.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 10.0,
|
3 |
+
"eval_accuracy": 0.9571428571428572,
|
4 |
+
"eval_loss": 0.19139504432678223,
|
5 |
+
"eval_runtime": 3.3817,
|
6 |
+
"eval_samples_per_second": 62.099,
|
7 |
+
"eval_steps_per_second": 7.984,
|
8 |
+
"total_flos": 3.7817107732905984e+17,
|
9 |
+
"train_loss": 0.04214024447625683,
|
10 |
+
"train_runtime": 135.0852,
|
11 |
+
"train_samples_per_second": 36.125,
|
12 |
+
"train_steps_per_second": 2.295
|
13 |
+
}
|
config.json
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google/vit-base-patch16-224-in21k",
|
3 |
+
"architectures": [
|
4 |
+
"ViTForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"encoder_stride": 16,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.0,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"id2label": {
|
12 |
+
"0": "Handwritten",
|
13 |
+
"1": "Publication",
|
14 |
+
"2": "Tabular",
|
15 |
+
"3": "Typeset document",
|
16 |
+
"4": "Unusable"
|
17 |
+
},
|
18 |
+
"image_size": 224,
|
19 |
+
"initializer_range": 0.02,
|
20 |
+
"intermediate_size": 3072,
|
21 |
+
"label2id": {
|
22 |
+
"Handwritten": "0",
|
23 |
+
"Publication": "1",
|
24 |
+
"Tabular": "2",
|
25 |
+
"Typeset document": "3",
|
26 |
+
"Unusable": "4"
|
27 |
+
},
|
28 |
+
"layer_norm_eps": 1e-12,
|
29 |
+
"model_type": "vit",
|
30 |
+
"num_attention_heads": 12,
|
31 |
+
"num_channels": 3,
|
32 |
+
"num_hidden_layers": 12,
|
33 |
+
"patch_size": 16,
|
34 |
+
"problem_type": "single_label_classification",
|
35 |
+
"qkv_bias": true,
|
36 |
+
"torch_dtype": "float32",
|
37 |
+
"transformers_version": "4.32.1"
|
38 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 10.0,
|
3 |
+
"eval_accuracy": 0.9571428571428572,
|
4 |
+
"eval_loss": 0.19139504432678223,
|
5 |
+
"eval_runtime": 3.3817,
|
6 |
+
"eval_samples_per_second": 62.099,
|
7 |
+
"eval_steps_per_second": 7.984
|
8 |
+
}
|
preprocessor_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"do_rescale": true,
|
4 |
+
"do_resize": true,
|
5 |
+
"image_mean": [
|
6 |
+
0.5,
|
7 |
+
0.5,
|
8 |
+
0.5
|
9 |
+
],
|
10 |
+
"image_processor_type": "ViTFeatureExtractor",
|
11 |
+
"image_std": [
|
12 |
+
0.5,
|
13 |
+
0.5,
|
14 |
+
0.5
|
15 |
+
],
|
16 |
+
"resample": 2,
|
17 |
+
"rescale_factor": 0.00392156862745098,
|
18 |
+
"size": {
|
19 |
+
"height": 224,
|
20 |
+
"width": 224
|
21 |
+
}
|
22 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5b4646e1ca4fdc2c69e14e32663c243f1c3ed3af64a1b6273f10d5beb10c34c0
|
3 |
+
size 343277933
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 10.0,
|
3 |
+
"total_flos": 3.7817107732905984e+17,
|
4 |
+
"train_loss": 0.04214024447625683,
|
5 |
+
"train_runtime": 135.0852,
|
6 |
+
"train_samples_per_second": 36.125,
|
7 |
+
"train_steps_per_second": 2.295
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.19139504432678223,
|
3 |
+
"best_model_checkpoint": "pri_docidv2/checkpoint-200",
|
4 |
+
"epoch": 10.0,
|
5 |
+
"eval_steps": 100,
|
6 |
+
"global_step": 310,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 0.32,
|
13 |
+
"learning_rate": 0.00029032258064516127,
|
14 |
+
"loss": 0.1105,
|
15 |
+
"step": 10
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 0.65,
|
19 |
+
"learning_rate": 0.00028064516129032256,
|
20 |
+
"loss": 0.1204,
|
21 |
+
"step": 20
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"epoch": 0.97,
|
25 |
+
"learning_rate": 0.00027096774193548386,
|
26 |
+
"loss": 0.0642,
|
27 |
+
"step": 30
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 1.29,
|
31 |
+
"learning_rate": 0.00026129032258064515,
|
32 |
+
"loss": 0.0199,
|
33 |
+
"step": 40
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"epoch": 1.61,
|
37 |
+
"learning_rate": 0.00025161290322580645,
|
38 |
+
"loss": 0.1239,
|
39 |
+
"step": 50
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 1.94,
|
43 |
+
"learning_rate": 0.00024193548387096771,
|
44 |
+
"loss": 0.0675,
|
45 |
+
"step": 60
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"epoch": 2.26,
|
49 |
+
"learning_rate": 0.000232258064516129,
|
50 |
+
"loss": 0.0115,
|
51 |
+
"step": 70
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 2.58,
|
55 |
+
"learning_rate": 0.0002225806451612903,
|
56 |
+
"loss": 0.095,
|
57 |
+
"step": 80
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"epoch": 2.9,
|
61 |
+
"learning_rate": 0.0002129032258064516,
|
62 |
+
"loss": 0.1924,
|
63 |
+
"step": 90
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"epoch": 3.23,
|
67 |
+
"learning_rate": 0.00020322580645161287,
|
68 |
+
"loss": 0.0366,
|
69 |
+
"step": 100
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"epoch": 3.23,
|
73 |
+
"eval_accuracy": 0.9285714285714286,
|
74 |
+
"eval_loss": 0.3684941828250885,
|
75 |
+
"eval_runtime": 2.4287,
|
76 |
+
"eval_samples_per_second": 86.467,
|
77 |
+
"eval_steps_per_second": 11.117,
|
78 |
+
"step": 100
|
79 |
+
},
|
80 |
+
{
|
81 |
+
"epoch": 3.55,
|
82 |
+
"learning_rate": 0.00019354838709677416,
|
83 |
+
"loss": 0.0101,
|
84 |
+
"step": 110
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"epoch": 3.87,
|
88 |
+
"learning_rate": 0.00018387096774193548,
|
89 |
+
"loss": 0.0275,
|
90 |
+
"step": 120
|
91 |
+
},
|
92 |
+
{
|
93 |
+
"epoch": 4.19,
|
94 |
+
"learning_rate": 0.00017419354838709678,
|
95 |
+
"loss": 0.0815,
|
96 |
+
"step": 130
|
97 |
+
},
|
98 |
+
{
|
99 |
+
"epoch": 4.52,
|
100 |
+
"learning_rate": 0.00016451612903225804,
|
101 |
+
"loss": 0.0098,
|
102 |
+
"step": 140
|
103 |
+
},
|
104 |
+
{
|
105 |
+
"epoch": 4.84,
|
106 |
+
"learning_rate": 0.00015483870967741934,
|
107 |
+
"loss": 0.0051,
|
108 |
+
"step": 150
|
109 |
+
},
|
110 |
+
{
|
111 |
+
"epoch": 5.16,
|
112 |
+
"learning_rate": 0.00014516129032258063,
|
113 |
+
"loss": 0.1023,
|
114 |
+
"step": 160
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"epoch": 5.48,
|
118 |
+
"learning_rate": 0.00013548387096774193,
|
119 |
+
"loss": 0.0874,
|
120 |
+
"step": 170
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"epoch": 5.81,
|
124 |
+
"learning_rate": 0.00012580645161290322,
|
125 |
+
"loss": 0.0113,
|
126 |
+
"step": 180
|
127 |
+
},
|
128 |
+
{
|
129 |
+
"epoch": 6.13,
|
130 |
+
"learning_rate": 0.0001161290322580645,
|
131 |
+
"loss": 0.0469,
|
132 |
+
"step": 190
|
133 |
+
},
|
134 |
+
{
|
135 |
+
"epoch": 6.45,
|
136 |
+
"learning_rate": 0.0001064516129032258,
|
137 |
+
"loss": 0.006,
|
138 |
+
"step": 200
|
139 |
+
},
|
140 |
+
{
|
141 |
+
"epoch": 6.45,
|
142 |
+
"eval_accuracy": 0.9571428571428572,
|
143 |
+
"eval_loss": 0.19139504432678223,
|
144 |
+
"eval_runtime": 2.4676,
|
145 |
+
"eval_samples_per_second": 85.101,
|
146 |
+
"eval_steps_per_second": 10.942,
|
147 |
+
"step": 200
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"epoch": 6.77,
|
151 |
+
"learning_rate": 9.677419354838708e-05,
|
152 |
+
"loss": 0.0467,
|
153 |
+
"step": 210
|
154 |
+
},
|
155 |
+
{
|
156 |
+
"epoch": 7.1,
|
157 |
+
"learning_rate": 8.709677419354839e-05,
|
158 |
+
"loss": 0.0042,
|
159 |
+
"step": 220
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"epoch": 7.42,
|
163 |
+
"learning_rate": 7.741935483870967e-05,
|
164 |
+
"loss": 0.0036,
|
165 |
+
"step": 230
|
166 |
+
},
|
167 |
+
{
|
168 |
+
"epoch": 7.74,
|
169 |
+
"learning_rate": 6.774193548387096e-05,
|
170 |
+
"loss": 0.0026,
|
171 |
+
"step": 240
|
172 |
+
},
|
173 |
+
{
|
174 |
+
"epoch": 8.06,
|
175 |
+
"learning_rate": 5.806451612903225e-05,
|
176 |
+
"loss": 0.0032,
|
177 |
+
"step": 250
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 8.39,
|
181 |
+
"learning_rate": 4.838709677419354e-05,
|
182 |
+
"loss": 0.0028,
|
183 |
+
"step": 260
|
184 |
+
},
|
185 |
+
{
|
186 |
+
"epoch": 8.71,
|
187 |
+
"learning_rate": 3.8709677419354835e-05,
|
188 |
+
"loss": 0.0027,
|
189 |
+
"step": 270
|
190 |
+
},
|
191 |
+
{
|
192 |
+
"epoch": 9.03,
|
193 |
+
"learning_rate": 2.9032258064516126e-05,
|
194 |
+
"loss": 0.0028,
|
195 |
+
"step": 280
|
196 |
+
},
|
197 |
+
{
|
198 |
+
"epoch": 9.35,
|
199 |
+
"learning_rate": 1.9354838709677417e-05,
|
200 |
+
"loss": 0.002,
|
201 |
+
"step": 290
|
202 |
+
},
|
203 |
+
{
|
204 |
+
"epoch": 9.68,
|
205 |
+
"learning_rate": 9.677419354838709e-06,
|
206 |
+
"loss": 0.0031,
|
207 |
+
"step": 300
|
208 |
+
},
|
209 |
+
{
|
210 |
+
"epoch": 9.68,
|
211 |
+
"eval_accuracy": 0.9571428571428572,
|
212 |
+
"eval_loss": 0.21088813245296478,
|
213 |
+
"eval_runtime": 2.491,
|
214 |
+
"eval_samples_per_second": 84.305,
|
215 |
+
"eval_steps_per_second": 10.839,
|
216 |
+
"step": 300
|
217 |
+
},
|
218 |
+
{
|
219 |
+
"epoch": 10.0,
|
220 |
+
"learning_rate": 0.0,
|
221 |
+
"loss": 0.003,
|
222 |
+
"step": 310
|
223 |
+
},
|
224 |
+
{
|
225 |
+
"epoch": 10.0,
|
226 |
+
"step": 310,
|
227 |
+
"total_flos": 3.7817107732905984e+17,
|
228 |
+
"train_loss": 0.04214024447625683,
|
229 |
+
"train_runtime": 135.0852,
|
230 |
+
"train_samples_per_second": 36.125,
|
231 |
+
"train_steps_per_second": 2.295
|
232 |
+
}
|
233 |
+
],
|
234 |
+
"logging_steps": 10,
|
235 |
+
"max_steps": 310,
|
236 |
+
"num_train_epochs": 10,
|
237 |
+
"save_steps": 100,
|
238 |
+
"total_flos": 3.7817107732905984e+17,
|
239 |
+
"trial_name": null,
|
240 |
+
"trial_params": null
|
241 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0badb9fcb13786174453da2264a127569da5952dc9c6c4edc94369b367c9f4fd
|
3 |
+
size 4027
|