jordyvl commited on
Commit
2774fc6
1 Parent(s): 20d5024

Saving best model to hub

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
config.json ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "EE_config": {
3
+ "alpha": 0.5,
4
+ "apply_ocr": true,
5
+ "batch_size": 4,
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": "gate",
13
+ "epochs": 60,
14
+ "eval_batch_size": 1,
15
+ "eval_start": false,
16
+ "exit_head_num_layers": 2,
17
+ "exit_threshold": -1,
18
+ "exits": [
19
+ "text_avg",
20
+ "vision_avg",
21
+ 1,
22
+ 4,
23
+ 8
24
+ ],
25
+ "forward_signature": [
26
+ "input_ids",
27
+ "attention_mask",
28
+ "bbox",
29
+ "pixel_values",
30
+ "labels",
31
+ "token_type_ids",
32
+ "position_ids",
33
+ "head_mask",
34
+ "inputs_embeds",
35
+ "output_attentions",
36
+ "output_hidden_states",
37
+ "return_dict",
38
+ "kwargs"
39
+ ],
40
+ "gamma": 0,
41
+ "get_raw_ocr_data": true,
42
+ "global_threshold": 1.000001,
43
+ "gradient_accumulation_steps": 12,
44
+ "inference_strategy": "max_confidence",
45
+ "labelset": "test",
46
+ "lowercase": false,
47
+ "lr": 2e-05,
48
+ "model": "EElayoutlmv3",
49
+ "model_weights": "microsoft/layoutlmv3-base",
50
+ "optimizer": "AdamW",
51
+ "plot_exits": false,
52
+ "print_freq": 50,
53
+ "seed": 42,
54
+ "temperature": 1,
55
+ "test_dataset": "jordyvl/rvl_cdip_100_examples_per_class",
56
+ "training_strategy": "one_stage_subgraphs_weighted_entropyreg",
57
+ "use_images": true,
58
+ "warmup_ratio": 0,
59
+ "weight_decay": 0
60
+ },
61
+ "_name_or_path": "microsoft/layoutlmv3-base",
62
+ "architectures": [
63
+ "LayoutLMv3EEForSequenceClassification"
64
+ ],
65
+ "attention_probs_dropout_prob": 0.1,
66
+ "bos_token_id": 0,
67
+ "classifier_dropout": null,
68
+ "coordinate_size": 128,
69
+ "eos_token_id": 2,
70
+ "exit_config": {
71
+ "encoder_layer_strategy": "gate",
72
+ "exit_head_num_layers": 2,
73
+ "exits": [
74
+ "text_avg",
75
+ "vision_avg",
76
+ 1,
77
+ 4,
78
+ 8
79
+ ],
80
+ "global_threshold": 1.000001,
81
+ "inference_strategy": "max_confidence",
82
+ "training_strategy": "one_stage_subgraphs_weighted_entropyreg"
83
+ },
84
+ "has_relative_attention_bias": true,
85
+ "has_spatial_attention_bias": true,
86
+ "hidden_act": "gelu",
87
+ "hidden_dropout_prob": 0.1,
88
+ "hidden_size": 768,
89
+ "id2label": {
90
+ "0": "letter",
91
+ "1": "form",
92
+ "2": "email",
93
+ "3": "handwritten",
94
+ "4": "advertisement",
95
+ "5": "scientific_report",
96
+ "6": "scientific_publication",
97
+ "7": "specification",
98
+ "8": "file_folder",
99
+ "9": "news_article",
100
+ "10": "budget",
101
+ "11": "invoice",
102
+ "12": "presentation",
103
+ "13": "questionnaire",
104
+ "14": "resume",
105
+ "15": "memo"
106
+ },
107
+ "initializer_range": 0.02,
108
+ "input_size": 224,
109
+ "intermediate_size": 3072,
110
+ "label2id": {
111
+ "advertisement": 4,
112
+ "budget": 10,
113
+ "email": 2,
114
+ "file_folder": 8,
115
+ "form": 1,
116
+ "handwritten": 3,
117
+ "invoice": 11,
118
+ "letter": 0,
119
+ "memo": 15,
120
+ "news_article": 9,
121
+ "presentation": 12,
122
+ "questionnaire": 13,
123
+ "resume": 14,
124
+ "scientific_publication": 6,
125
+ "scientific_report": 5,
126
+ "specification": 7
127
+ },
128
+ "layer_norm_eps": 1e-05,
129
+ "max_2d_position_embeddings": 1024,
130
+ "max_position_embeddings": 514,
131
+ "max_rel_2d_pos": 256,
132
+ "max_rel_pos": 128,
133
+ "model_type": "layoutlmv3",
134
+ "num_attention_heads": 12,
135
+ "num_channels": 3,
136
+ "num_hidden_layers": 12,
137
+ "pad_token_id": 1,
138
+ "patch_size": 16,
139
+ "rel_2d_pos_bins": 64,
140
+ "rel_pos_bins": 32,
141
+ "second_input_size": 112,
142
+ "shape_size": 128,
143
+ "text_embed": true,
144
+ "torch_dtype": "float32",
145
+ "transformers_version": "4.26.1",
146
+ "type_vocab_size": 1,
147
+ "visual_embed": true,
148
+ "vocab_size": 50265
149
+ }
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:60c836e9dec0aa61c28f1d4ee064d482d60177bcc47e7fd03badd5df3b555f6c
3
+ size 515647937
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:704d159a69cf4e66863a338ecec1bb24841659c7d757a7feeb2b70d241903281
3
+ size 3835
vocab.json ADDED
The diff for this file is too large to render. See raw diff