jordyvl commited on
Commit
f3c9977
1 Parent(s): 0b3d695

Saving best model to hub

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