vikp commited on
Commit
75f561d
1 Parent(s): bee458f

Upload model

Browse files
Files changed (4) hide show
  1. README.md +199 -0
  2. config.json +341 -0
  3. generation_config.json +8 -0
  4. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags: []
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
config.json ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "vikp/text_recognizer_sar4",
3
+ "architectures": [
4
+ "OCREncoderDecoderModel"
5
+ ],
6
+ "decoder": {
7
+ "_name_or_path": "",
8
+ "add_cross_attention": false,
9
+ "architectures": null,
10
+ "attention_bias": false,
11
+ "attention_dropout": 0.0,
12
+ "attention_window_size": 16,
13
+ "aux_heads": 0,
14
+ "bad_words_ids": null,
15
+ "begin_suppress_tokens": null,
16
+ "block_types": [
17
+ "attention"
18
+ ],
19
+ "bos_token_id": 1,
20
+ "causal": true,
21
+ "chunk_size_feed_forward": 0,
22
+ "conv1d_width": 4,
23
+ "cross_attention_hidden_size": null,
24
+ "cross_attn_layers": [
25
+ 0,
26
+ 1,
27
+ 2,
28
+ 3
29
+ ],
30
+ "decoder_start_token_id": null,
31
+ "diversity_penalty": 0.0,
32
+ "do_sample": false,
33
+ "early_stopping": false,
34
+ "encoder_cross_attn_layers": [
35
+ 2
36
+ ],
37
+ "encoder_hidden_size": 1280,
38
+ "encoder_no_repeat_ngram_size": 0,
39
+ "eos_token_id": 1,
40
+ "exponential_decay_length_penalty": null,
41
+ "final_w_init_variance_scale": 0.5,
42
+ "finetuning_task": null,
43
+ "forced_bos_token_id": null,
44
+ "forced_eos_token_id": null,
45
+ "global_attn_layers": [
46
+ 0,
47
+ 1,
48
+ 3
49
+ ],
50
+ "head_dim": 64,
51
+ "hidden_activation": "gelu_pytorch_tanh",
52
+ "hidden_size": 512,
53
+ "id2label": {
54
+ "0": "LABEL_0",
55
+ "1": "LABEL_1"
56
+ },
57
+ "init_std": 0.02,
58
+ "intermediate_size": 2048,
59
+ "is_decoder": false,
60
+ "is_encoder_decoder": false,
61
+ "label2id": {
62
+ "LABEL_0": 0,
63
+ "LABEL_1": 1
64
+ },
65
+ "length_penalty": 1.0,
66
+ "logits_soft_cap": 30.0,
67
+ "lru_width": 512,
68
+ "max_length": 20,
69
+ "min_length": 0,
70
+ "model_type": "surya_ocr",
71
+ "no_repeat_ngram_size": 0,
72
+ "num_attention_heads": 8,
73
+ "num_beam_groups": 1,
74
+ "num_beams": 1,
75
+ "num_hidden_layers": 4,
76
+ "num_key_value_heads": 2,
77
+ "num_return_sequences": 1,
78
+ "output_attentions": false,
79
+ "output_hidden_states": false,
80
+ "output_scores": false,
81
+ "pad_token_id": 0,
82
+ "prefix": null,
83
+ "problem_type": null,
84
+ "pruned_heads": {},
85
+ "remove_invalid_values": false,
86
+ "repetition_penalty": 1.0,
87
+ "return_dict": true,
88
+ "return_dict_in_generate": false,
89
+ "rms_norm_eps": 1e-06,
90
+ "rope_theta": 10000.0,
91
+ "self_attn_layers": [
92
+ 1,
93
+ 3
94
+ ],
95
+ "sep_token_id": null,
96
+ "suppress_tokens": null,
97
+ "task_specific_params": null,
98
+ "temperature": 1.0,
99
+ "tf_legacy_loss": false,
100
+ "tie_encoder_decoder": false,
101
+ "tie_word_embeddings": false,
102
+ "tokenizer_class": null,
103
+ "top_k": 50,
104
+ "top_p": 1.0,
105
+ "torch_dtype": null,
106
+ "torchscript": false,
107
+ "typical_p": 1.0,
108
+ "use_bfloat16": false,
109
+ "use_cache": true,
110
+ "vocab_size": 65792,
111
+ "w_init_variance_scale": 0.01
112
+ },
113
+ "decoder_start_token_id": 1,
114
+ "encoder": {
115
+ "_name_or_path": "",
116
+ "add_cross_attention": false,
117
+ "architectures": null,
118
+ "attention_probs_dropout_prob": 0.0,
119
+ "bad_words_ids": null,
120
+ "begin_suppress_tokens": null,
121
+ "bos_token_id": null,
122
+ "chunk_size_feed_forward": 0,
123
+ "cross_attention_hidden_size": null,
124
+ "decoder_start_token_id": null,
125
+ "depths": [
126
+ 2,
127
+ 2,
128
+ 18,
129
+ 2
130
+ ],
131
+ "diversity_penalty": 0.0,
132
+ "do_sample": false,
133
+ "drop_path_rate": 0.1,
134
+ "early_stopping": false,
135
+ "embed_dim": 128,
136
+ "encoder_length": 256,
137
+ "encoder_no_repeat_ngram_size": 0,
138
+ "eos_token_id": null,
139
+ "exponential_decay_length_penalty": null,
140
+ "finetuning_task": null,
141
+ "forced_bos_token_id": null,
142
+ "forced_eos_token_id": null,
143
+ "hidden_act": "gelu",
144
+ "hidden_dropout_prob": 0.0,
145
+ "hidden_size": 1024,
146
+ "id2label": {
147
+ "0": "LABEL_0",
148
+ "1": "LABEL_1"
149
+ },
150
+ "image_size": [
151
+ 256,
152
+ 896
153
+ ],
154
+ "initializer_range": 0.02,
155
+ "is_decoder": false,
156
+ "is_encoder_decoder": false,
157
+ "label2id": {
158
+ "LABEL_0": 0,
159
+ "LABEL_1": 1
160
+ },
161
+ "layer_norm_eps": 1e-05,
162
+ "length_penalty": 1.0,
163
+ "max_length": 20,
164
+ "min_length": 0,
165
+ "mlp_ratio": 4.0,
166
+ "model_type": "donut-swin",
167
+ "no_repeat_ngram_size": 0,
168
+ "num_beam_groups": 1,
169
+ "num_beams": 1,
170
+ "num_channels": 3,
171
+ "num_heads": [
172
+ 4,
173
+ 8,
174
+ 16,
175
+ 32
176
+ ],
177
+ "num_kv_heads": [
178
+ 4,
179
+ 8,
180
+ 16,
181
+ 32
182
+ ],
183
+ "num_layers": 4,
184
+ "num_return_sequences": 1,
185
+ "output_attentions": false,
186
+ "output_hidden_states": false,
187
+ "output_scores": false,
188
+ "pad_token_id": null,
189
+ "patch_size": 4,
190
+ "prefix": null,
191
+ "problem_type": null,
192
+ "pruned_heads": {},
193
+ "qkv_bias": true,
194
+ "remove_invalid_values": false,
195
+ "repetition_penalty": 1.0,
196
+ "return_dict": true,
197
+ "return_dict_in_generate": false,
198
+ "sep_token_id": null,
199
+ "suppress_tokens": null,
200
+ "task_specific_params": null,
201
+ "temperature": 1.0,
202
+ "tf_legacy_loss": false,
203
+ "tie_encoder_decoder": false,
204
+ "tie_word_embeddings": true,
205
+ "tokenizer_class": null,
206
+ "top_k": 50,
207
+ "top_p": 1.0,
208
+ "torch_dtype": null,
209
+ "torchscript": false,
210
+ "typical_p": 1.0,
211
+ "use_absolute_embeddings": true,
212
+ "use_bfloat16": false,
213
+ "window_size": 8
214
+ },
215
+ "eos_token_id": 1,
216
+ "is_encoder_decoder": true,
217
+ "model_type": "vision-encoder-decoder",
218
+ "pad_token_id": 0,
219
+ "text_encoder": {
220
+ "_name_or_path": "",
221
+ "add_cross_attention": false,
222
+ "architectures": null,
223
+ "attention_bias": false,
224
+ "attention_dropout": 0.0,
225
+ "attention_window_size": 16,
226
+ "aux_heads": 0,
227
+ "bad_words_ids": null,
228
+ "begin_suppress_tokens": null,
229
+ "block_types": [
230
+ "attention"
231
+ ],
232
+ "bos_token_id": 1,
233
+ "causal": false,
234
+ "chunk_size_feed_forward": 0,
235
+ "conv1d_width": 4,
236
+ "cross_attention_hidden_size": null,
237
+ "cross_attn_layers": [
238
+ 0,
239
+ 1,
240
+ 2,
241
+ 3,
242
+ 4,
243
+ 6,
244
+ 8,
245
+ 10,
246
+ 11
247
+ ],
248
+ "decoder_start_token_id": null,
249
+ "diversity_penalty": 0.0,
250
+ "do_sample": false,
251
+ "early_stopping": false,
252
+ "encoder_hidden_size": 1024,
253
+ "encoder_no_repeat_ngram_size": 0,
254
+ "eos_token_id": 1,
255
+ "exponential_decay_length_penalty": null,
256
+ "final_w_init_variance_scale": 0.16666666666666666,
257
+ "finetuning_task": null,
258
+ "forced_bos_token_id": null,
259
+ "forced_eos_token_id": null,
260
+ "global_attn_layers": [
261
+ 0,
262
+ 1,
263
+ 3,
264
+ 5,
265
+ 7,
266
+ 9,
267
+ 11
268
+ ],
269
+ "head_dim": 80,
270
+ "hidden_activation": "gelu_pytorch_tanh",
271
+ "hidden_size": 1280,
272
+ "id2label": {
273
+ "0": "LABEL_0",
274
+ "1": "LABEL_1"
275
+ },
276
+ "init_std": 0.02,
277
+ "intermediate_size": 5120,
278
+ "is_decoder": false,
279
+ "is_encoder_decoder": false,
280
+ "iteration_count": 1,
281
+ "label2id": {
282
+ "LABEL_0": 0,
283
+ "LABEL_1": 1
284
+ },
285
+ "length_penalty": 1.0,
286
+ "logits_soft_cap": 30.0,
287
+ "lru_width": 1280,
288
+ "max_length": 20,
289
+ "min_length": 0,
290
+ "model_type": "surya_ocr",
291
+ "no_repeat_ngram_size": 0,
292
+ "num_attention_heads": 16,
293
+ "num_beam_groups": 1,
294
+ "num_beams": 1,
295
+ "num_hidden_layers": 12,
296
+ "num_key_value_heads": 4,
297
+ "num_return_sequences": 1,
298
+ "output_attentions": false,
299
+ "output_hidden_states": false,
300
+ "output_scores": false,
301
+ "pad_token_id": 0,
302
+ "prefix": null,
303
+ "problem_type": null,
304
+ "pruned_heads": {},
305
+ "query_token_count": 128,
306
+ "remove_invalid_values": false,
307
+ "repetition_penalty": 1.0,
308
+ "return_dict": true,
309
+ "return_dict_in_generate": false,
310
+ "rms_norm_eps": 1e-06,
311
+ "rope_theta": 10000.0,
312
+ "self_attn_layers": [
313
+ 1,
314
+ 3,
315
+ 5,
316
+ 7,
317
+ 9,
318
+ 11
319
+ ],
320
+ "sep_token_id": null,
321
+ "suppress_tokens": null,
322
+ "task_specific_params": null,
323
+ "temperature": 1.0,
324
+ "tf_legacy_loss": false,
325
+ "tie_encoder_decoder": false,
326
+ "tie_word_embeddings": true,
327
+ "tokenizer_class": null,
328
+ "top_k": 50,
329
+ "top_p": 1.0,
330
+ "torch_dtype": null,
331
+ "torchscript": false,
332
+ "typical_p": 1.0,
333
+ "use_bfloat16": false,
334
+ "use_cache": true,
335
+ "vocab_size": 256,
336
+ "w_init_variance_scale": 0.01
337
+ },
338
+ "tie_word_embeddings": false,
339
+ "torch_dtype": "float16",
340
+ "transformers_version": "4.43.3"
341
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "decoder_start_token_id": 1,
5
+ "eos_token_id": 1,
6
+ "pad_token_id": 0,
7
+ "transformers_version": "4.43.3"
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a75b64cbeaed06820559bcda4e12c1235de62b5bce787d57cf56a9c3a7123d1
3
+ size 940533088