jordyvl commited on
Commit
09db8e5
1 Parent(s): cc1ced8

Saving best model to hub

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
config.json ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "EE_config": {
3
+ "alpha": 0.5,
4
+ "apply_ocr": true,
5
+ "batch_size": 2,
6
+ "benchmark_OCR": false,
7
+ "checkpoint": "",
8
+ "data_parallel": false,
9
+ "dataset": "jordyvl/rvl_cdip_100_examples_per_class",
10
+ "device": "cuda",
11
+ "downsampling": 0,
12
+ "encoder_layer_strategy": "ramp",
13
+ "epochs": 60,
14
+ "eval_batch_size": 1,
15
+ "eval_start": false,
16
+ "exit_head_num_layers": 2,
17
+ "exit_threshold": -1,
18
+ "exits": "text_visual_concat,1,2,3,4,5,6,7,8,9,10,11,12",
19
+ "forward_signature": [
20
+ "input_ids",
21
+ "attention_mask",
22
+ "bbox",
23
+ "pixel_values",
24
+ "labels",
25
+ "token_type_ids",
26
+ "position_ids",
27
+ "head_mask",
28
+ "inputs_embeds",
29
+ "output_attentions",
30
+ "output_hidden_states",
31
+ "return_dict",
32
+ "kwargs"
33
+ ],
34
+ "gamma": 0.5,
35
+ "get_raw_ocr_data": true,
36
+ "global_threshold": 1.000001,
37
+ "gradient_accumulation_steps": 24,
38
+ "inference_strategy": "max_confidence",
39
+ "labelset": "test",
40
+ "lowercase": false,
41
+ "lr": 2e-05,
42
+ "model": "EElayoutlmv3",
43
+ "model_weights": "microsoft/layoutlmv3-base",
44
+ "optimizer": "AdamW",
45
+ "plot_exits": false,
46
+ "print_freq": 50,
47
+ "seed": 42,
48
+ "temperature": 1,
49
+ "test_dataset": "jordyvl/rvl_cdip_100_examples_per_class",
50
+ "training_strategy": "one_stage_subgraphs_weighted",
51
+ "use_images": true,
52
+ "use_lte": false,
53
+ "use_wandb": false,
54
+ "warmup_ratio": 0,
55
+ "weight_decay": 0
56
+ },
57
+ "_name_or_path": "microsoft/layoutlmv3-base",
58
+ "architectures": [
59
+ "LayoutLMv3EEForSequenceClassification"
60
+ ],
61
+ "attention_probs_dropout_prob": 0.1,
62
+ "bos_token_id": 0,
63
+ "classifier_dropout": null,
64
+ "coordinate_size": 128,
65
+ "eos_token_id": 2,
66
+ "exit_config": {
67
+ "encoder_layer_strategy": "ramp",
68
+ "exit_head_num_layers": 2,
69
+ "exits": [
70
+ "text_visual_concat",
71
+ 1,
72
+ 2,
73
+ 3,
74
+ 4,
75
+ 5,
76
+ 6,
77
+ 7,
78
+ 8,
79
+ 9,
80
+ 10,
81
+ 11,
82
+ 12
83
+ ],
84
+ "global_threshold": 1.000001,
85
+ "inference_strategy": "max_confidence",
86
+ "training_strategy": "one_stage_subgraphs_weighted"
87
+ },
88
+ "has_relative_attention_bias": true,
89
+ "has_spatial_attention_bias": true,
90
+ "hidden_act": "gelu",
91
+ "hidden_dropout_prob": 0.1,
92
+ "hidden_size": 768,
93
+ "id2label": {
94
+ "0": "letter",
95
+ "1": "form",
96
+ "2": "email",
97
+ "3": "handwritten",
98
+ "4": "advertisement",
99
+ "5": "scientific_report",
100
+ "6": "scientific_publication",
101
+ "7": "specification",
102
+ "8": "file_folder",
103
+ "9": "news_article",
104
+ "10": "budget",
105
+ "11": "invoice",
106
+ "12": "presentation",
107
+ "13": "questionnaire",
108
+ "14": "resume",
109
+ "15": "memo"
110
+ },
111
+ "initializer_range": 0.02,
112
+ "input_size": 224,
113
+ "intermediate_size": 3072,
114
+ "label2id": {
115
+ "advertisement": 4,
116
+ "budget": 10,
117
+ "email": 2,
118
+ "file_folder": 8,
119
+ "form": 1,
120
+ "handwritten": 3,
121
+ "invoice": 11,
122
+ "letter": 0,
123
+ "memo": 15,
124
+ "news_article": 9,
125
+ "presentation": 12,
126
+ "questionnaire": 13,
127
+ "resume": 14,
128
+ "scientific_publication": 6,
129
+ "scientific_report": 5,
130
+ "specification": 7
131
+ },
132
+ "layer_norm_eps": 1e-05,
133
+ "max_2d_position_embeddings": 1024,
134
+ "max_position_embeddings": 514,
135
+ "max_rel_2d_pos": 256,
136
+ "max_rel_pos": 128,
137
+ "model_type": "layoutlmv3",
138
+ "num_attention_heads": 12,
139
+ "num_channels": 3,
140
+ "num_hidden_layers": 12,
141
+ "pad_token_id": 1,
142
+ "patch_size": 16,
143
+ "rel_2d_pos_bins": 64,
144
+ "rel_pos_bins": 32,
145
+ "second_input_size": 112,
146
+ "shape_size": 128,
147
+ "text_embed": true,
148
+ "torch_dtype": "float32",
149
+ "transformers_version": "4.26.1",
150
+ "type_vocab_size": 1,
151
+ "visual_embed": true,
152
+ "vocab_size": 50265
153
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11dac11f96555a58dc589b2d0f94a9e6726427187b4de151285f74b45112f311
3
+ size 535166913
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": true,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "bos_token": {
4
+ "__type": "AddedToken",
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false
10
+ },
11
+ "cls_token": {
12
+ "__type": "AddedToken",
13
+ "content": "<s>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false
18
+ },
19
+ "cls_token_box": [
20
+ 0,
21
+ 0,
22
+ 0,
23
+ 0
24
+ ],
25
+ "eos_token": {
26
+ "__type": "AddedToken",
27
+ "content": "</s>",
28
+ "lstrip": false,
29
+ "normalized": true,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ },
33
+ "errors": "replace",
34
+ "mask_token": {
35
+ "__type": "AddedToken",
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": true,
39
+ "rstrip": false,
40
+ "single_word": false
41
+ },
42
+ "model_max_length": 512,
43
+ "name_or_path": "microsoft/layoutlmv3-base",
44
+ "only_label_first_subword": true,
45
+ "pad_token": {
46
+ "__type": "AddedToken",
47
+ "content": "<pad>",
48
+ "lstrip": false,
49
+ "normalized": true,
50
+ "rstrip": false,
51
+ "single_word": false
52
+ },
53
+ "pad_token_box": [
54
+ 0,
55
+ 0,
56
+ 0,
57
+ 0
58
+ ],
59
+ "pad_token_label": -100,
60
+ "sep_token": {
61
+ "__type": "AddedToken",
62
+ "content": "</s>",
63
+ "lstrip": false,
64
+ "normalized": true,
65
+ "rstrip": false,
66
+ "single_word": false
67
+ },
68
+ "sep_token_box": [
69
+ 0,
70
+ 0,
71
+ 0,
72
+ 0
73
+ ],
74
+ "special_tokens_map_file": null,
75
+ "tokenizer_class": "LayoutLMv3Tokenizer",
76
+ "trim_offsets": true,
77
+ "unk_token": {
78
+ "__type": "AddedToken",
79
+ "content": "<unk>",
80
+ "lstrip": false,
81
+ "normalized": true,
82
+ "rstrip": false,
83
+ "single_word": false
84
+ }
85
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f10003e8b33499bdc86134d971625c44cee04f6c154eeffed3457ab5e50fdd76
3
+ size 3771
vocab.json ADDED
The diff for this file is too large to render. See raw diff