DimaKoshman commited on
Commit
081f79d
1 Parent(s): 6db7b4c

added checkpoint and examples

Browse files
checkpoint/added_tokens.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "1": 57537,
3
+ "</benetech_prompt>": 57526,
4
+ "<;>": 57536,
5
+ "<benetech_prompt>": 57525,
6
+ "<categorical>": 57532,
7
+ "<dot>": 57527,
8
+ "<horizontal_bar>": 57528,
9
+ "<line>": 57530,
10
+ "<numerical>": 57533,
11
+ "<s_iitcdip>": 57523,
12
+ "<s_synthdog>": 57524,
13
+ "<scatter>": 57531,
14
+ "<sep/>": 57522,
15
+ "<vertical_bar>": 57529,
16
+ "<x_start>": 57534,
17
+ "<y_start>": 57535
18
+ }
checkpoint/config.json ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": "a959cf33c20e09215873e338299c900f57047c61",
3
+ "_name_or_path": "naver-clova-ix/donut-base",
4
+ "architectures": [
5
+ "VisionEncoderDecoderModel"
6
+ ],
7
+ "bos_token_id": 57525,
8
+ "decoder": {
9
+ "_name_or_path": "",
10
+ "activation_dropout": 0.0,
11
+ "activation_function": "gelu",
12
+ "add_cross_attention": true,
13
+ "add_final_layer_norm": true,
14
+ "architectures": null,
15
+ "attention_dropout": 0.0,
16
+ "bad_words_ids": null,
17
+ "begin_suppress_tokens": null,
18
+ "bos_token_id": 0,
19
+ "chunk_size_feed_forward": 0,
20
+ "classifier_dropout": 0.0,
21
+ "cross_attention_hidden_size": null,
22
+ "d_model": 1024,
23
+ "decoder_attention_heads": 16,
24
+ "decoder_ffn_dim": 4096,
25
+ "decoder_layerdrop": 0.0,
26
+ "decoder_layers": 4,
27
+ "decoder_start_token_id": null,
28
+ "diversity_penalty": 0.0,
29
+ "do_sample": false,
30
+ "dropout": 0.1,
31
+ "early_stopping": false,
32
+ "encoder_attention_heads": 16,
33
+ "encoder_ffn_dim": 4096,
34
+ "encoder_layerdrop": 0.0,
35
+ "encoder_layers": 12,
36
+ "encoder_no_repeat_ngram_size": 0,
37
+ "eos_token_id": 2,
38
+ "exponential_decay_length_penalty": null,
39
+ "finetuning_task": null,
40
+ "forced_bos_token_id": null,
41
+ "forced_eos_token_id": 2,
42
+ "id2label": {
43
+ "0": "LABEL_0",
44
+ "1": "LABEL_1"
45
+ },
46
+ "init_std": 0.02,
47
+ "is_decoder": true,
48
+ "is_encoder_decoder": false,
49
+ "label2id": {
50
+ "LABEL_0": 0,
51
+ "LABEL_1": 1
52
+ },
53
+ "length_penalty": 1.0,
54
+ "max_length": 512,
55
+ "max_position_embeddings": 1536,
56
+ "min_length": 0,
57
+ "model_type": "mbart",
58
+ "no_repeat_ngram_size": 0,
59
+ "num_beam_groups": 1,
60
+ "num_beams": 1,
61
+ "num_hidden_layers": 12,
62
+ "num_return_sequences": 1,
63
+ "output_attentions": false,
64
+ "output_hidden_states": false,
65
+ "output_scores": false,
66
+ "pad_token_id": 1,
67
+ "prefix": null,
68
+ "problem_type": null,
69
+ "pruned_heads": {},
70
+ "remove_invalid_values": false,
71
+ "repetition_penalty": 1.0,
72
+ "return_dict": true,
73
+ "return_dict_in_generate": false,
74
+ "scale_embedding": true,
75
+ "sep_token_id": null,
76
+ "suppress_tokens": null,
77
+ "task_specific_params": null,
78
+ "temperature": 1.0,
79
+ "tf_legacy_loss": false,
80
+ "tie_encoder_decoder": false,
81
+ "tie_word_embeddings": true,
82
+ "tokenizer_class": null,
83
+ "top_k": 50,
84
+ "top_p": 1.0,
85
+ "torch_dtype": null,
86
+ "torchscript": false,
87
+ "transformers_version": "4.26.1",
88
+ "typical_p": 1.0,
89
+ "use_bfloat16": false,
90
+ "use_cache": true,
91
+ "vocab_size": 57538
92
+ },
93
+ "decoder_start_token_id": 57525,
94
+ "encoder": {
95
+ "_name_or_path": "",
96
+ "add_cross_attention": false,
97
+ "architectures": null,
98
+ "attention_probs_dropout_prob": 0.0,
99
+ "bad_words_ids": null,
100
+ "begin_suppress_tokens": null,
101
+ "bos_token_id": null,
102
+ "chunk_size_feed_forward": 0,
103
+ "cross_attention_hidden_size": null,
104
+ "decoder_start_token_id": null,
105
+ "depths": [
106
+ 2,
107
+ 2,
108
+ 14,
109
+ 2
110
+ ],
111
+ "diversity_penalty": 0.0,
112
+ "do_sample": false,
113
+ "drop_path_rate": 0.1,
114
+ "early_stopping": false,
115
+ "embed_dim": 128,
116
+ "encoder_no_repeat_ngram_size": 0,
117
+ "eos_token_id": null,
118
+ "exponential_decay_length_penalty": null,
119
+ "finetuning_task": null,
120
+ "forced_bos_token_id": null,
121
+ "forced_eos_token_id": null,
122
+ "hidden_act": "gelu",
123
+ "hidden_dropout_prob": 0.0,
124
+ "hidden_size": 1024,
125
+ "id2label": {
126
+ "0": "LABEL_0",
127
+ "1": "LABEL_1"
128
+ },
129
+ "image_size": [
130
+ 720,
131
+ 512
132
+ ],
133
+ "initializer_range": 0.02,
134
+ "is_decoder": false,
135
+ "is_encoder_decoder": false,
136
+ "label2id": {
137
+ "LABEL_0": 0,
138
+ "LABEL_1": 1
139
+ },
140
+ "layer_norm_eps": 1e-05,
141
+ "length_penalty": 1.0,
142
+ "max_length": 20,
143
+ "min_length": 0,
144
+ "mlp_ratio": 4.0,
145
+ "model_type": "donut-swin",
146
+ "no_repeat_ngram_size": 0,
147
+ "num_beam_groups": 1,
148
+ "num_beams": 1,
149
+ "num_channels": 3,
150
+ "num_heads": [
151
+ 4,
152
+ 8,
153
+ 16,
154
+ 32
155
+ ],
156
+ "num_layers": 4,
157
+ "num_return_sequences": 1,
158
+ "output_attentions": false,
159
+ "output_hidden_states": false,
160
+ "output_scores": false,
161
+ "pad_token_id": null,
162
+ "patch_size": 4,
163
+ "path_norm": true,
164
+ "prefix": null,
165
+ "problem_type": null,
166
+ "pruned_heads": {},
167
+ "qkv_bias": true,
168
+ "remove_invalid_values": false,
169
+ "repetition_penalty": 1.0,
170
+ "return_dict": true,
171
+ "return_dict_in_generate": false,
172
+ "sep_token_id": null,
173
+ "suppress_tokens": null,
174
+ "task_specific_params": null,
175
+ "temperature": 1.0,
176
+ "tf_legacy_loss": false,
177
+ "tie_encoder_decoder": false,
178
+ "tie_word_embeddings": true,
179
+ "tokenizer_class": null,
180
+ "top_k": 50,
181
+ "top_p": 1.0,
182
+ "torch_dtype": null,
183
+ "torchscript": false,
184
+ "transformers_version": "4.26.1",
185
+ "typical_p": 1.0,
186
+ "use_absolute_embeddings": false,
187
+ "use_bfloat16": false,
188
+ "window_size": 10
189
+ },
190
+ "eos_token_id": 57526,
191
+ "is_encoder_decoder": true,
192
+ "model_type": "vision-encoder-decoder",
193
+ "pad_token_id": 1,
194
+ "tie_word_embeddings": false,
195
+ "torch_dtype": "float32",
196
+ "transformers_version": null
197
+ }
checkpoint/generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 57525,
4
+ "decoder_start_token_id": 57525,
5
+ "eos_token_id": 57526,
6
+ "forced_eos_token_id": 2,
7
+ "max_length": 512,
8
+ "pad_token_id": 1,
9
+ "transformers_version": "4.26.1"
10
+ }
checkpoint/preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_align_long_axis": false,
3
+ "do_normalize": true,
4
+ "do_pad": true,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "do_thumbnail": true,
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_processor_type": "DonutImageProcessor",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "DonutProcessor",
20
+ "resample": 2,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "size": {
23
+ "height": 512,
24
+ "width": 720
25
+ }
26
+ }
checkpoint/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61dbb0fa6d53b3b8ee0bd4f168eacddc6001485b2e6ceb00781f05188cb57645
3
+ size 809225433
checkpoint/sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb9e3dce4c326195d08fc3dd0f7e2eee1da8595c847bf4c1a9c78b7a82d47e2d
3
+ size 1296245
checkpoint/special_tokens_map.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s_iitcdip>",
4
+ "<s_synthdog>"
5
+ ],
6
+ "bos_token": "<s>",
7
+ "cls_token": "<s>",
8
+ "eos_token": "</benetech_prompt>",
9
+ "mask_token": {
10
+ "content": "<mask>",
11
+ "lstrip": true,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<pad>",
17
+ "sep_token": "</s>",
18
+ "unk_token": "<unk>"
19
+ }
checkpoint/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
checkpoint/tokenizer_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "cls_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "mask_token": {
6
+ "__type": "AddedToken",
7
+ "content": "<mask>",
8
+ "lstrip": true,
9
+ "normalized": true,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "model_max_length": 1000000000000000019884624838656,
14
+ "name_or_path": "tmp.cp",
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
+ }
examples/000b92c3b098.jpg ADDED
examples/007a18eb4e09.jpg ADDED
examples/00dcf883a459.jpg ADDED
examples/00f5404753cf.jpg ADDED
examples/01b45b831589.jpg ADDED