xiaoyao9184 commited on
Commit
850ea40
·
verified ·
1 Parent(s): c4a192f

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: cc-by-nc-sa-4.0
4
+ ---
5
+ LaTeX OCR model for [surya](https://github.com/VikParuchuri/surya).
config.json ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "datalab-to/texify_train",
3
+ "architectures": [
4
+ "TexifyModel"
5
+ ],
6
+ "decoder": {
7
+ "_attn_implementation_autoset": true,
8
+ "_name_or_path": "",
9
+ "add_cross_attention": false,
10
+ "architectures": null,
11
+ "attention_bias": false,
12
+ "attention_dropout": 0.0,
13
+ "attention_window_size": 16,
14
+ "aux_heads": 0,
15
+ "bad_words_ids": null,
16
+ "begin_suppress_tokens": null,
17
+ "block_types": [
18
+ "attention"
19
+ ],
20
+ "bos_token_id": 1,
21
+ "causal": true,
22
+ "chunk_size_feed_forward": 0,
23
+ "conv1d_width": 4,
24
+ "cross_attention_hidden_size": null,
25
+ "cross_attn_layers": [
26
+ 0,
27
+ 1,
28
+ 2,
29
+ 3,
30
+ 4,
31
+ 5,
32
+ 6,
33
+ 7,
34
+ 8,
35
+ 9
36
+ ],
37
+ "decoder_start_token_id": null,
38
+ "diversity_penalty": 0.0,
39
+ "do_sample": false,
40
+ "double_residual_flow": false,
41
+ "dropout": 0.1,
42
+ "early_stopping": false,
43
+ "encoder_cross_attn_layers": [
44
+ 0,
45
+ 1,
46
+ 2,
47
+ 3,
48
+ 4,
49
+ 5,
50
+ 6,
51
+ 7,
52
+ 8,
53
+ 9
54
+ ],
55
+ "encoder_hidden_size": 1024,
56
+ "encoder_no_repeat_ngram_size": 0,
57
+ "eos_token_id": 1,
58
+ "exponential_decay_length_penalty": null,
59
+ "final_w_init_variance_scale": 0.3333333333333333,
60
+ "finetuning_task": null,
61
+ "forced_bos_token_id": null,
62
+ "forced_eos_token_id": null,
63
+ "global_attn_layers": [
64
+ 0,
65
+ 1,
66
+ 2,
67
+ 3,
68
+ 4,
69
+ 5,
70
+ 6,
71
+ 7,
72
+ 8,
73
+ 9
74
+ ],
75
+ "head_dim": 64,
76
+ "hidden_activation": "gelu_pytorch_tanh",
77
+ "hidden_size": 512,
78
+ "id2label": {
79
+ "0": "LABEL_0",
80
+ "1": "LABEL_1"
81
+ },
82
+ "init_std": 0.02,
83
+ "intermediate_size": 2048,
84
+ "is_decoder": false,
85
+ "is_encoder_decoder": false,
86
+ "label2id": {
87
+ "LABEL_0": 0,
88
+ "LABEL_1": 1
89
+ },
90
+ "layer_norm_eps": 1e-05,
91
+ "length_penalty": 1.0,
92
+ "logits_soft_cap": 30.0,
93
+ "lru_width": 512,
94
+ "max_length": 20,
95
+ "min_length": 0,
96
+ "model_type": "texify",
97
+ "no_repeat_ngram_size": 0,
98
+ "num_attention_heads": 8,
99
+ "num_beam_groups": 1,
100
+ "num_beams": 1,
101
+ "num_hidden_layers": 6,
102
+ "num_key_value_heads": 4,
103
+ "num_return_sequences": 1,
104
+ "output_attentions": false,
105
+ "output_hidden_states": false,
106
+ "output_scores": false,
107
+ "pad_token_id": 0,
108
+ "prefix": null,
109
+ "problem_type": null,
110
+ "pruned_heads": {},
111
+ "remove_invalid_values": false,
112
+ "repetition_penalty": 1.0,
113
+ "return_dict": true,
114
+ "return_dict_in_generate": false,
115
+ "rms_norm_eps": 1e-06,
116
+ "rope_theta": 10000.0,
117
+ "self_attn_layers": [
118
+ 0,
119
+ 1,
120
+ 2,
121
+ 3,
122
+ 4,
123
+ 5,
124
+ 6,
125
+ 7,
126
+ 8,
127
+ 9
128
+ ],
129
+ "sep_token_id": null,
130
+ "suppress_tokens": null,
131
+ "task_specific_params": null,
132
+ "temperature": 1.0,
133
+ "tf_legacy_loss": false,
134
+ "tie_encoder_decoder": false,
135
+ "tie_word_embeddings": false,
136
+ "tokenizer_class": null,
137
+ "top_k": 50,
138
+ "top_p": 1.0,
139
+ "torch_dtype": null,
140
+ "torchscript": false,
141
+ "typical_p": 1.0,
142
+ "use_bfloat16": false,
143
+ "use_cache": true,
144
+ "vocab_size": 68549,
145
+ "w_init_variance_scale": 0.01
146
+ },
147
+ "decoder_end_token_id": 1,
148
+ "decoder_start_token_id": 1,
149
+ "encoder": {
150
+ "_attn_implementation_autoset": true,
151
+ "_name_or_path": "",
152
+ "add_cross_attention": false,
153
+ "architectures": null,
154
+ "attention_probs_dropout_prob": 0.0,
155
+ "bad_words_ids": null,
156
+ "begin_suppress_tokens": null,
157
+ "bos_token_id": null,
158
+ "chunk_size_feed_forward": 0,
159
+ "cross_attention_hidden_size": null,
160
+ "decoder_start_token_id": null,
161
+ "depths": [
162
+ 2,
163
+ 2,
164
+ 12,
165
+ 2
166
+ ],
167
+ "diversity_penalty": 0.0,
168
+ "do_sample": false,
169
+ "drop_path_rate": 0.1,
170
+ "early_stopping": false,
171
+ "embed_dim": 128,
172
+ "encoder_length": 1024,
173
+ "encoder_no_repeat_ngram_size": 0,
174
+ "eos_token_id": null,
175
+ "exponential_decay_length_penalty": null,
176
+ "finetuning_task": null,
177
+ "forced_bos_token_id": null,
178
+ "forced_eos_token_id": null,
179
+ "hidden_act": "gelu",
180
+ "hidden_dropout_prob": 0.0,
181
+ "hidden_size": 1024,
182
+ "id2label": {
183
+ "0": "LABEL_0",
184
+ "1": "LABEL_1"
185
+ },
186
+ "image_size": [
187
+ 480,
188
+ 480
189
+ ],
190
+ "initializer_range": 0.02,
191
+ "is_decoder": false,
192
+ "is_encoder_decoder": false,
193
+ "label2id": {
194
+ "LABEL_0": 0,
195
+ "LABEL_1": 1
196
+ },
197
+ "layer_norm_eps": 1e-05,
198
+ "length_penalty": 1.0,
199
+ "max_length": 20,
200
+ "min_length": 0,
201
+ "mlp_ratio": 4.0,
202
+ "model_type": "donut-swin",
203
+ "no_repeat_ngram_size": 0,
204
+ "num_beam_groups": 1,
205
+ "num_beams": 1,
206
+ "num_channels": 3,
207
+ "num_heads": [
208
+ 4,
209
+ 8,
210
+ 16,
211
+ 32
212
+ ],
213
+ "num_kv_heads": [
214
+ 4,
215
+ 8,
216
+ 16,
217
+ 32
218
+ ],
219
+ "num_layers": 4,
220
+ "num_return_sequences": 1,
221
+ "output_attentions": false,
222
+ "output_hidden_states": false,
223
+ "output_scores": false,
224
+ "pad_token_id": null,
225
+ "patch_size": 4,
226
+ "prefix": null,
227
+ "problem_type": null,
228
+ "pruned_heads": {},
229
+ "qkv_bias": true,
230
+ "remove_invalid_values": false,
231
+ "repetition_penalty": 1.0,
232
+ "return_dict": true,
233
+ "return_dict_in_generate": false,
234
+ "sep_token_id": null,
235
+ "suppress_tokens": null,
236
+ "task_specific_params": null,
237
+ "temperature": 1.0,
238
+ "tf_legacy_loss": false,
239
+ "tie_encoder_decoder": false,
240
+ "tie_word_embeddings": true,
241
+ "tokenizer_class": null,
242
+ "top_k": 50,
243
+ "top_p": 1.0,
244
+ "torch_dtype": null,
245
+ "torchscript": false,
246
+ "typical_p": 1.0,
247
+ "use_absolute_embeddings": false,
248
+ "use_bfloat16": false,
249
+ "use_positional_embeddings": true,
250
+ "window_size": 8
251
+ },
252
+ "eos_token_id": 1,
253
+ "is_encoder_decoder": true,
254
+ "model_type": "vision-encoder-decoder",
255
+ "pad_token_id": 0,
256
+ "tie_word_embeddings": false,
257
+ "torch_dtype": "float16",
258
+ "transformers_version": "4.48.1"
259
+ }
manifest.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"files": ["model.safetensors", "tokenizer_config.json", "special_tokens_map.json", "config.json", "tokenizer.json", "README.md", "training_args.bin", ".gitattributes", "preprocessor_config.json"]}
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cd39a5897323a2d9442a207259769cc568e104e281e063c09e6e6dc2c5b4ae7
3
+ size 338587064
preprocessor_config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_align_long_axis": false,
3
+ "do_normalize": false,
4
+ "do_pad": false,
5
+ "do_rescale": false,
6
+ "do_resize": false,
7
+ "do_thumbnail": false,
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_processor_type": "SuryaImageProcessor",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "max_size": {
20
+ "height": 480,
21
+ "width": 480
22
+ },
23
+ "patch_size": [
24
+ 4,
25
+ 4
26
+ ],
27
+ "processor_class": "DonutProcessor",
28
+ "resample": 2,
29
+ "rescale_factor": 0.00392156862745098,
30
+ "size": {
31
+ "height": 2560,
32
+ "width": 1920
33
+ },
34
+ "train": true
35
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<pad>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff
 
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2692d256d45a16403b5c15924c7f1f7b81409a9a88fafb6bc6f3d3fa66751fed
3
+ size 5304