jordyvl commited on
Commit
e902962
1 Parent(s): f313144

Saving best model to hub

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
config.json ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "maveriq/tobacco3482",
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
+ "token_type_ids",
29
+ "position_ids",
30
+ "head_mask",
31
+ "inputs_embeds",
32
+ "labels",
33
+ "output_attentions",
34
+ "output_hidden_states",
35
+ "return_dict",
36
+ "bbox",
37
+ "pixel_values"
38
+ ],
39
+ "gamma": 0,
40
+ "get_raw_ocr_data": true,
41
+ "global_threshold": 1.000001,
42
+ "gradient_accumulation_steps": 32,
43
+ "inference_strategy": "max_confidence",
44
+ "lowercase": false,
45
+ "lr": 2e-05,
46
+ "model": "LayoutLMv3",
47
+ "model_weights": "microsoft/layoutlmv3-base",
48
+ "optimizer": "AdamW",
49
+ "plot_exits": false,
50
+ "print_freq": 50,
51
+ "seed": 42,
52
+ "temperature": 1,
53
+ "test_dataset": "jordyvl/rvl_cdip_100_examples_per_class",
54
+ "training_strategy": "joint_weighted_avg",
55
+ "use_images": true,
56
+ "warmup_ratio": 0,
57
+ "weight_decay": 0
58
+ },
59
+ "_name_or_path": "microsoft/layoutlmv3-base",
60
+ "architectures": [
61
+ "LayoutLMv3ForSequenceClassification"
62
+ ],
63
+ "attention_probs_dropout_prob": 0.1,
64
+ "bos_token_id": 0,
65
+ "classifier_dropout": null,
66
+ "coordinate_size": 128,
67
+ "eos_token_id": 2,
68
+ "has_relative_attention_bias": true,
69
+ "has_spatial_attention_bias": true,
70
+ "hidden_act": "gelu",
71
+ "hidden_dropout_prob": 0.1,
72
+ "hidden_size": 768,
73
+ "id2label": {
74
+ "0": "ADVE",
75
+ "1": "Email",
76
+ "2": "Form",
77
+ "3": "Letter",
78
+ "4": "Memo",
79
+ "5": "News",
80
+ "6": "Note",
81
+ "7": "Report",
82
+ "8": "Resume",
83
+ "9": "Scientific"
84
+ },
85
+ "initializer_range": 0.02,
86
+ "input_size": 224,
87
+ "intermediate_size": 3072,
88
+ "label2id": {
89
+ "ADVE": 0,
90
+ "Email": 1,
91
+ "Form": 2,
92
+ "Letter": 3,
93
+ "Memo": 4,
94
+ "News": 5,
95
+ "Note": 6,
96
+ "Report": 7,
97
+ "Resume": 8,
98
+ "Scientific": 9
99
+ },
100
+ "layer_norm_eps": 1e-05,
101
+ "max_2d_position_embeddings": 1024,
102
+ "max_position_embeddings": 514,
103
+ "max_rel_2d_pos": 256,
104
+ "max_rel_pos": 128,
105
+ "model_type": "layoutlmv3",
106
+ "num_attention_heads": 12,
107
+ "num_channels": 3,
108
+ "num_hidden_layers": 12,
109
+ "pad_token_id": 1,
110
+ "patch_size": 16,
111
+ "problem_type": "single_label_classification",
112
+ "rel_2d_pos_bins": 64,
113
+ "rel_pos_bins": 32,
114
+ "second_input_size": 112,
115
+ "shape_size": 128,
116
+ "text_embed": true,
117
+ "torch_dtype": "float32",
118
+ "transformers_version": "4.26.1",
119
+ "type_vocab_size": 1,
120
+ "visual_embed": true,
121
+ "vocab_size": 50265
122
+ }
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:0972934cb3243ee74c69709cb3fabe0c1e7eadc4ff75698869d402e257c95599
3
+ size 503780017
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:80339abf1364fcd2d4443183802956111d4dcd23b7e3cbe263c02a3103b449cb
3
+ size 3643
vocab.json ADDED
The diff for this file is too large to render. See raw diff