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