Adding ONNX file of this model
#15
by
effyau
- opened
- README.md +1 -0
- onnx/config.json +76 -0
- onnx/decoder_model.onnx +3 -0
- onnx/decoder_model_merged.onnx +3 -0
- onnx/decoder_with_past_model.onnx +3 -0
- onnx/encoder_model.onnx +3 -0
- onnx/generation_config.json +8 -0
- onnx/preprocessor_config.json +26 -0
README.md
CHANGED
@@ -4,6 +4,7 @@ tags:
|
|
4 |
- donut
|
5 |
- image-to-text
|
6 |
- vision
|
|
|
7 |
---
|
8 |
|
9 |
# Donut (base-sized model, pre-trained only)
|
|
|
4 |
- donut
|
5 |
- image-to-text
|
6 |
- vision
|
7 |
+
- onnx
|
8 |
---
|
9 |
|
10 |
# Donut (base-sized model, pre-trained only)
|
onnx/config.json
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_attn_implementation_autoset": true,
|
3 |
+
"architectures": [
|
4 |
+
"VisionEncoderDecoderModel"
|
5 |
+
],
|
6 |
+
"decoder": {
|
7 |
+
"activation_dropout": 0.0,
|
8 |
+
"activation_function": "gelu",
|
9 |
+
"add_cross_attention": true,
|
10 |
+
"add_final_layer_norm": true,
|
11 |
+
"attention_dropout": 0.0,
|
12 |
+
"classifier_dropout": 0.0,
|
13 |
+
"d_model": 1024,
|
14 |
+
"decoder_attention_heads": 16,
|
15 |
+
"decoder_ffn_dim": 4096,
|
16 |
+
"decoder_layerdrop": 0.0,
|
17 |
+
"decoder_layers": 4,
|
18 |
+
"dropout": 0.1,
|
19 |
+
"encoder_attention_heads": 16,
|
20 |
+
"encoder_ffn_dim": 4096,
|
21 |
+
"encoder_layerdrop": 0.0,
|
22 |
+
"encoder_layers": 12,
|
23 |
+
"init_std": 0.02,
|
24 |
+
"is_decoder": true,
|
25 |
+
"is_encoder_decoder": false,
|
26 |
+
"max_position_embeddings": 1536,
|
27 |
+
"model_type": "mbart",
|
28 |
+
"num_hidden_layers": 12,
|
29 |
+
"scale_embedding": true,
|
30 |
+
"torch_dtype": "float32",
|
31 |
+
"use_cache": true,
|
32 |
+
"vocab_size": 57525
|
33 |
+
},
|
34 |
+
"encoder": {
|
35 |
+
"attention_probs_dropout_prob": 0.0,
|
36 |
+
"depths": [
|
37 |
+
2,
|
38 |
+
2,
|
39 |
+
14,
|
40 |
+
2
|
41 |
+
],
|
42 |
+
"drop_path_rate": 0.1,
|
43 |
+
"embed_dim": 128,
|
44 |
+
"hidden_act": "gelu",
|
45 |
+
"hidden_dropout_prob": 0.0,
|
46 |
+
"hidden_size": 1024,
|
47 |
+
"image_size": [
|
48 |
+
2560,
|
49 |
+
1920
|
50 |
+
],
|
51 |
+
"initializer_range": 0.02,
|
52 |
+
"layer_norm_eps": 1e-05,
|
53 |
+
"mlp_ratio": 4.0,
|
54 |
+
"model_type": "donut-swin",
|
55 |
+
"num_channels": 3,
|
56 |
+
"num_heads": [
|
57 |
+
4,
|
58 |
+
8,
|
59 |
+
16,
|
60 |
+
32
|
61 |
+
],
|
62 |
+
"num_layers": 4,
|
63 |
+
"patch_size": 4,
|
64 |
+
"path_norm": true,
|
65 |
+
"qkv_bias": true,
|
66 |
+
"torch_dtype": "float32",
|
67 |
+
"use_absolute_embeddings": false,
|
68 |
+
"window_size": 10
|
69 |
+
},
|
70 |
+
"is_encoder_decoder": true,
|
71 |
+
"model_type": "vision-encoder-decoder",
|
72 |
+
"tie_word_embeddings": false,
|
73 |
+
"torch_dtype": "float32",
|
74 |
+
"transformers_version": "4.51.3",
|
75 |
+
"use_cache": true
|
76 |
+
}
|
onnx/decoder_model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bd37227502254300630a953b3569abd626cb2d297ac94fc36d1886de9f3ea397
|
3 |
+
size 746470076
|
onnx/decoder_model_merged.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5f3bafd3645a19b8af415dc6df2c610f28ea54d5923a152e6c0acfe1ad4cc22e
|
3 |
+
size 746611433
|
onnx/decoder_with_past_model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3fecb41ab42c3993d42f5db6677d0202ad6ab643276f61ad9f320f943b256fd0
|
3 |
+
size 712860789
|
onnx/encoder_model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:db85ca838c171661796504ff208bd2e0fb1040ed06f82cc55017297cfe22260e
|
3 |
+
size 311378378
|
onnx/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.51.3"
|
8 |
+
}
|
onnx/preprocessor_config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_align_long_axis": true,
|
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 |
+
}
|