nielsr HF staff commited on
Commit
d682bd1
1 Parent(s): 49cf2da

Add HuggingFace files (#1)

Browse files

- Add files (384abad2567ceda4b8ad7673071dae3b641e8a4e)

.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .DS_Store
README.md DELETED
@@ -1,3 +0,0 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
added_tokens.json CHANGED
@@ -1 +1,68 @@
1
- {"<sep/>": 57522, "<s_iitcdip>": 57523, "<s_synthdog>": 57524, "</s_menu>": 57525, "<s_menu>": 57526, "</s_nm>": 57527, "<s_nm>": 57528, "</s_cnt>": 57529, "<s_cnt>": 57530, "</s_price>": 57531, "<s_price>": 57532, "</s_sub_total>": 57533, "<s_sub_total>": 57534, "</s_subtotal_price>": 57535, "<s_subtotal_price>": 57536, "</s_service_price>": 57537, "<s_service_price>": 57538, "</s_tax_price>": 57539, "<s_tax_price>": 57540, "</s_etc>": 57541, "<s_etc>": 57542, "</s_total>": 57543, "<s_total>": 57544, "</s_total_price>": 57545, "<s_total_price>": 57546, "</s_sub_nm>": 57547, "<s_sub_nm>": 57548, "</s_cashprice>": 57549, "<s_cashprice>": 57550, "</s_changeprice>": 57551, "<s_changeprice>": 57552, "</s_menutype_cnt>": 57553, "<s_menutype_cnt>": 57554, "</s_menuqty_cnt>": 57555, "<s_menuqty_cnt>": 57556, "</s_discount_price>": 57557, "<s_discount_price>": 57558, "</s_unitprice>": 57559, "<s_unitprice>": 57560, "</s_total_etc>": 57561, "<s_total_etc>": 57562, "</s_creditcardprice>": 57563, "<s_creditcardprice>": 57564, "</s_num>": 57565, "<s_num>": 57566, "</s_sub_cnt>": 57567, "<s_sub_cnt>": 57568, "</s_discountprice>": 57569, "<s_discountprice>": 57570, "</s_sub_price>": 57571, "<s_sub_price>": 57572, "</s_emoneyprice>": 57573, "<s_emoneyprice>": 57574, "</s_sub_unitprice>": 57575, "<s_sub_unitprice>": 57576, "</s_sub_etc>": 57577, "<s_sub_etc>": 57578, "</s_void_menu>": 57579, "<s_void_menu>": 57580, "</s_othersvc_price>": 57581, "<s_othersvc_price>": 57582, "</s_vatyn>": 57583, "<s_vatyn>": 57584, "</s_itemsubtotal>": 57585, "<s_itemsubtotal>": 57586, "<s_cord-v1>": 57587}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</s_cashprice>": 57549,
3
+ "</s_changeprice>": 57551,
4
+ "</s_cnt>": 57529,
5
+ "</s_creditcardprice>": 57563,
6
+ "</s_discount_price>": 57557,
7
+ "</s_discountprice>": 57569,
8
+ "</s_emoneyprice>": 57573,
9
+ "</s_etc>": 57541,
10
+ "</s_itemsubtotal>": 57585,
11
+ "</s_menu>": 57525,
12
+ "</s_menuqty_cnt>": 57555,
13
+ "</s_menutype_cnt>": 57553,
14
+ "</s_nm>": 57527,
15
+ "</s_num>": 57565,
16
+ "</s_othersvc_price>": 57581,
17
+ "</s_price>": 57531,
18
+ "</s_service_price>": 57537,
19
+ "</s_sub_cnt>": 57567,
20
+ "</s_sub_etc>": 57577,
21
+ "</s_sub_nm>": 57547,
22
+ "</s_sub_price>": 57571,
23
+ "</s_sub_total>": 57533,
24
+ "</s_sub_unitprice>": 57575,
25
+ "</s_subtotal_price>": 57535,
26
+ "</s_tax_price>": 57539,
27
+ "</s_total>": 57543,
28
+ "</s_total_etc>": 57561,
29
+ "</s_total_price>": 57545,
30
+ "</s_unitprice>": 57559,
31
+ "</s_vatyn>": 57583,
32
+ "</s_void_menu>": 57579,
33
+ "<s_cashprice>": 57550,
34
+ "<s_changeprice>": 57552,
35
+ "<s_cnt>": 57530,
36
+ "<s_cord-v1>": 57587,
37
+ "<s_creditcardprice>": 57564,
38
+ "<s_discount_price>": 57558,
39
+ "<s_discountprice>": 57570,
40
+ "<s_emoneyprice>": 57574,
41
+ "<s_etc>": 57542,
42
+ "<s_iitcdip>": 57523,
43
+ "<s_itemsubtotal>": 57586,
44
+ "<s_menu>": 57526,
45
+ "<s_menuqty_cnt>": 57556,
46
+ "<s_menutype_cnt>": 57554,
47
+ "<s_nm>": 57528,
48
+ "<s_num>": 57566,
49
+ "<s_othersvc_price>": 57582,
50
+ "<s_price>": 57532,
51
+ "<s_service_price>": 57538,
52
+ "<s_sub_cnt>": 57568,
53
+ "<s_sub_etc>": 57578,
54
+ "<s_sub_nm>": 57548,
55
+ "<s_sub_price>": 57572,
56
+ "<s_sub_total>": 57534,
57
+ "<s_sub_unitprice>": 57576,
58
+ "<s_subtotal_price>": 57536,
59
+ "<s_synthdog>": 57524,
60
+ "<s_tax_price>": 57540,
61
+ "<s_total>": 57544,
62
+ "<s_total_etc>": 57562,
63
+ "<s_total_price>": 57546,
64
+ "<s_unitprice>": 57560,
65
+ "<s_vatyn>": 57584,
66
+ "<s_void_menu>": 57580,
67
+ "<sep/>": 57522
68
+ }
config.json CHANGED
@@ -1,24 +1,188 @@
1
  {
2
- "_name_or_path": "naver-clova-ix/donut-base",
3
- "align_long_axis": false,
4
  "architectures": [
5
- "DonutModel"
6
  ],
7
- "decoder_layer": 4,
8
- "encoder_layer": [
9
- 2,
10
- 2,
11
- 14,
12
- 2
13
- ],
14
- "input_size": [
15
- 1280,
16
- 960
17
- ],
18
- "max_length": 768,
19
- "max_position_embeddings": 768,
20
- "model_type": "donut",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  "torch_dtype": "float32",
22
- "transformers_version": "4.11.3",
23
- "window_size": 10
24
  }
 
1
  {
2
+ "_commit_hash": null,
 
3
  "architectures": [
4
+ "VisionEncoderDecoderModel"
5
  ],
6
+ "decoder": {
7
+ "_name_or_path": "",
8
+ "activation_dropout": 0.0,
9
+ "activation_function": "gelu",
10
+ "add_cross_attention": true,
11
+ "add_final_layer_norm": true,
12
+ "architectures": null,
13
+ "attention_dropout": 0.0,
14
+ "bad_words_ids": null,
15
+ "bos_token_id": 0,
16
+ "chunk_size_feed_forward": 0,
17
+ "classifier_dropout": 0.0,
18
+ "cross_attention_hidden_size": null,
19
+ "d_model": 1024,
20
+ "decoder_attention_heads": 16,
21
+ "decoder_ffn_dim": 4096,
22
+ "decoder_layerdrop": 0.0,
23
+ "decoder_layers": 4,
24
+ "decoder_start_token_id": null,
25
+ "diversity_penalty": 0.0,
26
+ "do_sample": false,
27
+ "dropout": 0.1,
28
+ "early_stopping": false,
29
+ "encoder_attention_heads": 16,
30
+ "encoder_ffn_dim": 4096,
31
+ "encoder_layerdrop": 0.0,
32
+ "encoder_layers": 12,
33
+ "encoder_no_repeat_ngram_size": 0,
34
+ "eos_token_id": 2,
35
+ "exponential_decay_length_penalty": null,
36
+ "finetuning_task": null,
37
+ "forced_bos_token_id": null,
38
+ "forced_eos_token_id": 2,
39
+ "id2label": {
40
+ "0": "LABEL_0",
41
+ "1": "LABEL_1"
42
+ },
43
+ "init_std": 0.02,
44
+ "is_decoder": true,
45
+ "is_encoder_decoder": false,
46
+ "label2id": {
47
+ "LABEL_0": 0,
48
+ "LABEL_1": 1
49
+ },
50
+ "length_penalty": 1.0,
51
+ "max_length": 20,
52
+ "max_position_embeddings": 768,
53
+ "min_length": 0,
54
+ "model_type": "mbart",
55
+ "no_repeat_ngram_size": 0,
56
+ "num_beam_groups": 1,
57
+ "num_beams": 1,
58
+ "num_hidden_layers": 12,
59
+ "num_return_sequences": 1,
60
+ "output_attentions": false,
61
+ "output_hidden_states": false,
62
+ "output_scores": false,
63
+ "pad_token_id": 1,
64
+ "prefix": null,
65
+ "problem_type": null,
66
+ "pruned_heads": {},
67
+ "remove_invalid_values": false,
68
+ "repetition_penalty": 1.0,
69
+ "return_dict": true,
70
+ "return_dict_in_generate": false,
71
+ "scale_embedding": true,
72
+ "sep_token_id": null,
73
+ "task_specific_params": null,
74
+ "temperature": 1.0,
75
+ "tf_legacy_loss": false,
76
+ "tie_encoder_decoder": false,
77
+ "tie_word_embeddings": true,
78
+ "tokenizer_class": null,
79
+ "top_k": 50,
80
+ "top_p": 1.0,
81
+ "torch_dtype": null,
82
+ "torchscript": false,
83
+ "transformers_version": "4.22.0.dev0",
84
+ "typical_p": 1.0,
85
+ "use_bfloat16": false,
86
+ "use_cache": true,
87
+ "vocab_size": 57588
88
+ },
89
+ "encoder": {
90
+ "_name_or_path": "",
91
+ "add_cross_attention": false,
92
+ "architectures": null,
93
+ "attention_probs_dropout_prob": 0.0,
94
+ "bad_words_ids": null,
95
+ "bos_token_id": null,
96
+ "chunk_size_feed_forward": 0,
97
+ "cross_attention_hidden_size": null,
98
+ "decoder_start_token_id": null,
99
+ "depths": [
100
+ 2,
101
+ 2,
102
+ 14,
103
+ 2
104
+ ],
105
+ "diversity_penalty": 0.0,
106
+ "do_sample": false,
107
+ "drop_path_rate": 0.1,
108
+ "early_stopping": false,
109
+ "embed_dim": 128,
110
+ "encoder_no_repeat_ngram_size": 0,
111
+ "eos_token_id": null,
112
+ "exponential_decay_length_penalty": null,
113
+ "finetuning_task": null,
114
+ "forced_bos_token_id": null,
115
+ "forced_eos_token_id": null,
116
+ "hidden_act": "gelu",
117
+ "hidden_dropout_prob": 0.0,
118
+ "hidden_size": 1024,
119
+ "id2label": {
120
+ "0": "LABEL_0",
121
+ "1": "LABEL_1"
122
+ },
123
+ "image_size": [
124
+ 1280,
125
+ 960
126
+ ],
127
+ "initializer_range": 0.02,
128
+ "is_decoder": false,
129
+ "is_encoder_decoder": false,
130
+ "label2id": {
131
+ "LABEL_0": 0,
132
+ "LABEL_1": 1
133
+ },
134
+ "layer_norm_eps": 1e-05,
135
+ "length_penalty": 1.0,
136
+ "max_length": 20,
137
+ "min_length": 0,
138
+ "mlp_ratio": 4.0,
139
+ "model_type": "donut-swin",
140
+ "no_repeat_ngram_size": 0,
141
+ "num_beam_groups": 1,
142
+ "num_beams": 1,
143
+ "num_channels": 3,
144
+ "num_heads": [
145
+ 4,
146
+ 8,
147
+ 16,
148
+ 32
149
+ ],
150
+ "num_layers": 4,
151
+ "num_return_sequences": 1,
152
+ "output_attentions": false,
153
+ "output_hidden_states": false,
154
+ "output_scores": false,
155
+ "pad_token_id": null,
156
+ "patch_size": 4,
157
+ "path_norm": true,
158
+ "prefix": null,
159
+ "problem_type": null,
160
+ "pruned_heads": {},
161
+ "qkv_bias": true,
162
+ "remove_invalid_values": false,
163
+ "repetition_penalty": 1.0,
164
+ "return_dict": true,
165
+ "return_dict_in_generate": false,
166
+ "sep_token_id": null,
167
+ "task_specific_params": null,
168
+ "temperature": 1.0,
169
+ "tf_legacy_loss": false,
170
+ "tie_encoder_decoder": false,
171
+ "tie_word_embeddings": true,
172
+ "tokenizer_class": null,
173
+ "top_k": 50,
174
+ "top_p": 1.0,
175
+ "torch_dtype": null,
176
+ "torchscript": false,
177
+ "transformers_version": "4.22.0.dev0",
178
+ "typical_p": 1.0,
179
+ "use_absolute_embeddings": false,
180
+ "use_bfloat16": false,
181
+ "window_size": 10
182
+ },
183
+ "is_encoder_decoder": true,
184
+ "model_type": "vision-encoder-decoder",
185
+ "tie_word_embeddings": false,
186
  "torch_dtype": "float32",
187
+ "transformers_version": null
 
188
  }
preprocessor_config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_align_long_axis": false,
3
+ "do_normalize": true,
4
+ "do_pad": true,
5
+ "do_resize": true,
6
+ "do_thumbnail": true,
7
+ "feature_extractor_type": "DonutFeatureExtractor",
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_std": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "processor_class": "DonutProcessor",
19
+ "resample": 2,
20
+ "size": [
21
+ 960,
22
+ 1280
23
+ ]
24
+ }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b6d20983fbce7d629183b320bd00fa5953a816cb867759106049d523d670677c
3
- size 858616323
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:187e924cdf3b46716cfdbfeb891353a76c32ce79b2eb987c59b54063be06fa02
3
+ size 806281019
special_tokens_map.json CHANGED
@@ -1 +1,18 @@
1
- {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}, "additional_special_tokens": ["<s_cord-v1>"]}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s_cord-v1>"
4
+ ],
5
+ "bos_token": "<s>",
6
+ "cls_token": "<s>",
7
+ "eos_token": "</s>",
8
+ "mask_token": {
9
+ "content": "<mask>",
10
+ "lstrip": true,
11
+ "normalized": true,
12
+ "rstrip": false,
13
+ "single_word": false
14
+ },
15
+ "pad_token": "<pad>",
16
+ "sep_token": "</s>",
17
+ "unk_token": "<unk>"
18
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json CHANGED
@@ -1 +1,22 @@
1
- {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "sp_model_kwargs": {}, "special_tokens_map_file": null, "tokenizer_file": "/root/.cache/huggingface/transformers/213c2041358e63047b407f94cde1ae23904d31a3bceb57eab291028c1e949437.7135a4b25ac726e19641f0d68803ff02bad960d6319064f55fa9c536929b86fc", "name_or_path": "/mnt/ocr-nfsx1/donut/pretrained_models_hf_format/donut-base", "tokenizer_class": "XLMRobertaTokenizer"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "cls_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "from_slow": true,
6
+ "mask_token": {
7
+ "__type": "AddedToken",
8
+ "content": "<mask>",
9
+ "lstrip": true,
10
+ "normalized": true,
11
+ "rstrip": false,
12
+ "single_word": false
13
+ },
14
+ "name_or_path": "naver-clova-ix/donut-base-finetuned-cord-v1",
15
+ "pad_token": "<pad>",
16
+ "processor_class": "DonutProcessor",
17
+ "sep_token": "</s>",
18
+ "sp_model_kwargs": {},
19
+ "special_tokens_map_file": null,
20
+ "tokenizer_class": "XLMRobertaTokenizer",
21
+ "unk_token": "<unk>"
22
+ }