jordyvl commited on
Commit
de15e79
1 Parent(s): 1c72cab

Upload with huggingface_hub

Browse files
config.json ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "EE_config": {
3
+ "apply_ocr": true,
4
+ "batch_size": 2,
5
+ "checkpoint": "",
6
+ "data_parallel": false,
7
+ "dataset": "jordyvl/rvl_cdip_100_examples_per_class",
8
+ "device": "cuda",
9
+ "downsampling": 0,
10
+ "epochs": 40,
11
+ "eval_start": false,
12
+ "forward_signature": [
13
+ "input_ids",
14
+ "attention_mask",
15
+ "token_type_ids",
16
+ "position_ids",
17
+ "head_mask",
18
+ "inputs_embeds",
19
+ "labels",
20
+ "output_attentions",
21
+ "output_hidden_states",
22
+ "return_dict",
23
+ "bbox",
24
+ "pixel_values"
25
+ ],
26
+ "get_raw_ocr_data": true,
27
+ "lr": 2e-05,
28
+ "model": "LayoutLMv3",
29
+ "model_weights": "microsoft/layoutlmv3-base",
30
+ "optimizer": "AdamW",
31
+ "seed": 42,
32
+ "use_images": true,
33
+ "warmup_ratio": 0
34
+ },
35
+ "_name_or_path": "microsoft/layoutlmv3-base",
36
+ "architectures": [
37
+ "LayoutLMv3ForSequenceClassification"
38
+ ],
39
+ "attention_probs_dropout_prob": 0.1,
40
+ "bos_token_id": 0,
41
+ "classifier_dropout": null,
42
+ "coordinate_size": 128,
43
+ "eos_token_id": 2,
44
+ "has_relative_attention_bias": true,
45
+ "has_spatial_attention_bias": true,
46
+ "hidden_act": "gelu",
47
+ "hidden_dropout_prob": 0.1,
48
+ "hidden_size": 768,
49
+ "id2label": {
50
+ "0": "letter",
51
+ "1": "form",
52
+ "2": "email",
53
+ "3": "handwritten",
54
+ "4": "advertisement",
55
+ "5": "scientific_report",
56
+ "6": "scientific_publication",
57
+ "7": "specification",
58
+ "8": "file_folder",
59
+ "9": "news_article",
60
+ "10": "budget",
61
+ "11": "invoice",
62
+ "12": "presentation",
63
+ "13": "questionnaire",
64
+ "14": "resume",
65
+ "15": "memo"
66
+ },
67
+ "initializer_range": 0.02,
68
+ "input_size": 224,
69
+ "intermediate_size": 3072,
70
+ "label2id": {
71
+ "advertisement": 4,
72
+ "budget": 10,
73
+ "email": 2,
74
+ "file_folder": 8,
75
+ "form": 1,
76
+ "handwritten": 3,
77
+ "invoice": 11,
78
+ "letter": 0,
79
+ "memo": 15,
80
+ "news_article": 9,
81
+ "presentation": 12,
82
+ "questionnaire": 13,
83
+ "resume": 14,
84
+ "scientific_publication": 6,
85
+ "scientific_report": 5,
86
+ "specification": 7
87
+ },
88
+ "layer_norm_eps": 1e-05,
89
+ "max_2d_position_embeddings": 1024,
90
+ "max_position_embeddings": 514,
91
+ "max_rel_2d_pos": 256,
92
+ "max_rel_pos": 128,
93
+ "model_type": "layoutlmv3",
94
+ "num_attention_heads": 12,
95
+ "num_channels": 3,
96
+ "num_hidden_layers": 12,
97
+ "pad_token_id": 1,
98
+ "patch_size": 16,
99
+ "problem_type": "single_label_classification",
100
+ "rel_2d_pos_bins": 64,
101
+ "rel_pos_bins": 32,
102
+ "second_input_size": 112,
103
+ "shape_size": 128,
104
+ "text_embed": true,
105
+ "torch_dtype": "float32",
106
+ "transformers_version": "4.28.0.dev0",
107
+ "type_vocab_size": 1,
108
+ "visual_embed": true,
109
+ "vocab_size": 50265
110
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8989f5fc2735b982038db41895f98e7f4d3a261010acfcf864792e499c91e42
3
+ size 1007564321
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69456733fb84bafddb8fd81b5fe5b4eaaa368b44681bbe308709ade6777f41d1
3
+ size 503796623
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:953ed6ec47a3b12b7e5ca72e8b5ffcfaaca444fca8c1ba2f7d9da4b46feb4f93
3
+ size 14503
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7c4b21ce0b51acc0a20c5c98ae6476c62e5e7fea8cbdb49a2c9394605a1582a
3
+ size 623
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,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "only_label_first_subword": true,
44
+ "pad_token": {
45
+ "__type": "AddedToken",
46
+ "content": "<pad>",
47
+ "lstrip": false,
48
+ "normalized": true,
49
+ "rstrip": false,
50
+ "single_word": false
51
+ },
52
+ "pad_token_box": [
53
+ 0,
54
+ 0,
55
+ 0,
56
+ 0
57
+ ],
58
+ "pad_token_label": -100,
59
+ "sep_token": {
60
+ "__type": "AddedToken",
61
+ "content": "</s>",
62
+ "lstrip": false,
63
+ "normalized": true,
64
+ "rstrip": false,
65
+ "single_word": false
66
+ },
67
+ "sep_token_box": [
68
+ 0,
69
+ 0,
70
+ 0,
71
+ 0
72
+ ],
73
+ "special_tokens_map_file": null,
74
+ "tokenizer_class": "LayoutLMv3Tokenizer",
75
+ "trim_offsets": true,
76
+ "unk_token": {
77
+ "__type": "AddedToken",
78
+ "content": "<unk>",
79
+ "lstrip": false,
80
+ "normalized": true,
81
+ "rstrip": false,
82
+ "single_word": false
83
+ }
84
+ }
trainer_state.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 38.4,
5
+ "global_step": 480,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 8.0,
12
+ "eval_accuracy": 0.66,
13
+ "eval_loss": 1.381475567817688,
14
+ "eval_runtime": 88.5509,
15
+ "eval_samples_per_second": 4.517,
16
+ "eval_steps_per_second": 2.259,
17
+ "step": 100
18
+ },
19
+ {
20
+ "epoch": 16.0,
21
+ "eval_accuracy": 0.7775,
22
+ "eval_loss": 0.8648924231529236,
23
+ "eval_runtime": 87.4735,
24
+ "eval_samples_per_second": 4.573,
25
+ "eval_steps_per_second": 2.286,
26
+ "step": 200
27
+ },
28
+ {
29
+ "epoch": 24.0,
30
+ "eval_accuracy": 0.785,
31
+ "eval_loss": 0.9166873693466187,
32
+ "eval_runtime": 87.4248,
33
+ "eval_samples_per_second": 4.575,
34
+ "eval_steps_per_second": 2.288,
35
+ "step": 300
36
+ },
37
+ {
38
+ "epoch": 32.0,
39
+ "eval_accuracy": 0.79,
40
+ "eval_loss": 0.9467521905899048,
41
+ "eval_runtime": 89.9359,
42
+ "eval_samples_per_second": 4.448,
43
+ "eval_steps_per_second": 2.224,
44
+ "step": 400
45
+ }
46
+ ],
47
+ "max_steps": 480,
48
+ "num_train_epochs": 40,
49
+ "total_flos": 8154344545320960.0,
50
+ "trial_name": null,
51
+ "trial_params": null
52
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e2ad9a6c5cd5621992ad42fd7ad0be421684ae345176053f222ea68597cd667
3
+ size 3631
upload_after.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import create_repo
2
+
3
+ identifier = "jordyvl/LayoutLMv3_RVL-CDIP_NK100"
4
+ # create_repo(identifier)
5
+
6
+ from huggingface_hub import HfApi
7
+
8
+ api = HfApi()
9
+
10
+ api.upload_folder(
11
+ folder_path="/home/jordy/code/opensource/Beyond-Document-Page-Classification/src/EE/test_LayoutLMv3_jordyvl/rvl_cdip_100_examples_per_class_2023-04-04 11:38/checkpoint-480",
12
+ repo_id=identifier,
13
+ repo_type="model",
14
+ )
vocab.json ADDED
The diff for this file is too large to render. See raw diff