Upload folder using huggingface_hub
Browse files- config.json +168 -0
- generation_config.json +9 -0
- onnx/decoder_model.onnx +3 -0
- onnx/decoder_model_merged.onnx +3 -0
- onnx/decoder_model_merged_quantized.onnx +3 -0
- onnx/decoder_model_quantized.onnx +3 -0
- onnx/decoder_with_past_model.onnx +3 -0
- onnx/decoder_with_past_model_quantized.onnx +3 -0
- onnx/encoder_model.onnx +3 -0
- onnx/encoder_model_quantized.onnx +3 -0
- preprocessor_config.json +28 -0
- quantize_config.json +128 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +15 -0
- tokenizer.json +0 -0
- tokenizer_config.json +20 -0
config.json
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/trocr-small-handwritten",
|
3 |
+
"architectures": [
|
4 |
+
"VisionEncoderDecoderModel"
|
5 |
+
],
|
6 |
+
"decoder": {
|
7 |
+
"_name_or_path": "",
|
8 |
+
"activation_dropout": 0.0,
|
9 |
+
"activation_function": "relu",
|
10 |
+
"add_cross_attention": true,
|
11 |
+
"architectures": null,
|
12 |
+
"attention_dropout": 0.0,
|
13 |
+
"bad_words_ids": null,
|
14 |
+
"begin_suppress_tokens": null,
|
15 |
+
"bos_token_id": 0,
|
16 |
+
"chunk_size_feed_forward": 0,
|
17 |
+
"classifier_dropout": 0.0,
|
18 |
+
"cross_attention_hidden_size": 384,
|
19 |
+
"d_model": 256,
|
20 |
+
"decoder_attention_heads": 8,
|
21 |
+
"decoder_ffn_dim": 1024,
|
22 |
+
"decoder_layerdrop": 0.0,
|
23 |
+
"decoder_layers": 6,
|
24 |
+
"decoder_start_token_id": 2,
|
25 |
+
"diversity_penalty": 0.0,
|
26 |
+
"do_sample": false,
|
27 |
+
"dropout": 0.1,
|
28 |
+
"early_stopping": false,
|
29 |
+
"encoder_no_repeat_ngram_size": 0,
|
30 |
+
"eos_token_id": 2,
|
31 |
+
"exponential_decay_length_penalty": null,
|
32 |
+
"finetuning_task": null,
|
33 |
+
"forced_bos_token_id": null,
|
34 |
+
"forced_eos_token_id": null,
|
35 |
+
"id2label": {
|
36 |
+
"0": "LABEL_0",
|
37 |
+
"1": "LABEL_1"
|
38 |
+
},
|
39 |
+
"init_std": 0.02,
|
40 |
+
"is_decoder": true,
|
41 |
+
"is_encoder_decoder": false,
|
42 |
+
"label2id": {
|
43 |
+
"LABEL_0": 0,
|
44 |
+
"LABEL_1": 1
|
45 |
+
},
|
46 |
+
"layernorm_embedding": true,
|
47 |
+
"length_penalty": 1.0,
|
48 |
+
"max_length": 20,
|
49 |
+
"max_position_embeddings": 512,
|
50 |
+
"min_length": 0,
|
51 |
+
"model_type": "trocr",
|
52 |
+
"no_repeat_ngram_size": 0,
|
53 |
+
"num_beam_groups": 1,
|
54 |
+
"num_beams": 1,
|
55 |
+
"num_return_sequences": 1,
|
56 |
+
"output_attentions": false,
|
57 |
+
"output_hidden_states": false,
|
58 |
+
"output_scores": false,
|
59 |
+
"pad_token_id": 1,
|
60 |
+
"prefix": null,
|
61 |
+
"problem_type": null,
|
62 |
+
"pruned_heads": {},
|
63 |
+
"remove_invalid_values": false,
|
64 |
+
"repetition_penalty": 1.0,
|
65 |
+
"return_dict": true,
|
66 |
+
"return_dict_in_generate": false,
|
67 |
+
"scale_embedding": true,
|
68 |
+
"sep_token_id": null,
|
69 |
+
"suppress_tokens": null,
|
70 |
+
"task_specific_params": null,
|
71 |
+
"temperature": 1.0,
|
72 |
+
"tf_legacy_loss": false,
|
73 |
+
"tie_encoder_decoder": false,
|
74 |
+
"tie_word_embeddings": false,
|
75 |
+
"tokenizer_class": null,
|
76 |
+
"top_k": 50,
|
77 |
+
"top_p": 1.0,
|
78 |
+
"torch_dtype": null,
|
79 |
+
"torchscript": false,
|
80 |
+
"typical_p": 1.0,
|
81 |
+
"use_bfloat16": false,
|
82 |
+
"use_cache": false,
|
83 |
+
"use_learned_position_embeddings": true,
|
84 |
+
"vocab_size": 64044
|
85 |
+
},
|
86 |
+
"encoder": {
|
87 |
+
"_name_or_path": "",
|
88 |
+
"add_cross_attention": false,
|
89 |
+
"architectures": null,
|
90 |
+
"attention_probs_dropout_prob": 0.0,
|
91 |
+
"bad_words_ids": null,
|
92 |
+
"begin_suppress_tokens": null,
|
93 |
+
"bos_token_id": null,
|
94 |
+
"chunk_size_feed_forward": 0,
|
95 |
+
"cross_attention_hidden_size": null,
|
96 |
+
"decoder_start_token_id": null,
|
97 |
+
"diversity_penalty": 0.0,
|
98 |
+
"do_sample": false,
|
99 |
+
"early_stopping": false,
|
100 |
+
"encoder_no_repeat_ngram_size": 0,
|
101 |
+
"encoder_stride": 16,
|
102 |
+
"eos_token_id": null,
|
103 |
+
"exponential_decay_length_penalty": null,
|
104 |
+
"finetuning_task": null,
|
105 |
+
"forced_bos_token_id": null,
|
106 |
+
"forced_eos_token_id": null,
|
107 |
+
"hidden_act": "gelu",
|
108 |
+
"hidden_dropout_prob": 0.0,
|
109 |
+
"hidden_size": 384,
|
110 |
+
"id2label": {
|
111 |
+
"0": "LABEL_0",
|
112 |
+
"1": "LABEL_1"
|
113 |
+
},
|
114 |
+
"image_size": 384,
|
115 |
+
"initializer_range": 0.02,
|
116 |
+
"intermediate_size": 1536,
|
117 |
+
"is_decoder": false,
|
118 |
+
"is_encoder_decoder": false,
|
119 |
+
"label2id": {
|
120 |
+
"LABEL_0": 0,
|
121 |
+
"LABEL_1": 1
|
122 |
+
},
|
123 |
+
"layer_norm_eps": 1e-12,
|
124 |
+
"length_penalty": 1.0,
|
125 |
+
"max_length": 20,
|
126 |
+
"min_length": 0,
|
127 |
+
"model_type": "deit",
|
128 |
+
"no_repeat_ngram_size": 0,
|
129 |
+
"num_attention_heads": 6,
|
130 |
+
"num_beam_groups": 1,
|
131 |
+
"num_beams": 1,
|
132 |
+
"num_channels": 3,
|
133 |
+
"num_hidden_layers": 12,
|
134 |
+
"num_return_sequences": 1,
|
135 |
+
"output_attentions": false,
|
136 |
+
"output_hidden_states": false,
|
137 |
+
"output_scores": false,
|
138 |
+
"pad_token_id": null,
|
139 |
+
"patch_size": 16,
|
140 |
+
"prefix": null,
|
141 |
+
"problem_type": null,
|
142 |
+
"pruned_heads": {},
|
143 |
+
"qkv_bias": true,
|
144 |
+
"remove_invalid_values": false,
|
145 |
+
"repetition_penalty": 1.0,
|
146 |
+
"return_dict": true,
|
147 |
+
"return_dict_in_generate": false,
|
148 |
+
"sep_token_id": null,
|
149 |
+
"suppress_tokens": null,
|
150 |
+
"task_specific_params": null,
|
151 |
+
"temperature": 1.0,
|
152 |
+
"tf_legacy_loss": false,
|
153 |
+
"tie_encoder_decoder": false,
|
154 |
+
"tie_word_embeddings": true,
|
155 |
+
"tokenizer_class": null,
|
156 |
+
"top_k": 50,
|
157 |
+
"top_p": 1.0,
|
158 |
+
"torch_dtype": null,
|
159 |
+
"torchscript": false,
|
160 |
+
"typical_p": 1.0,
|
161 |
+
"use_bfloat16": false
|
162 |
+
},
|
163 |
+
"eos_token_id": 2,
|
164 |
+
"is_encoder_decoder": true,
|
165 |
+
"model_type": "vision-encoder-decoder",
|
166 |
+
"tie_word_embeddings": false,
|
167 |
+
"transformers_version": "4.33.2"
|
168 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 0,
|
4 |
+
"decoder_start_token_id": 2,
|
5 |
+
"eos_token_id": 2,
|
6 |
+
"pad_token_id": 1,
|
7 |
+
"transformers_version": "4.33.2",
|
8 |
+
"use_cache": false
|
9 |
+
}
|
onnx/decoder_model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4cf40055fbca767b2fd34f1de4f86be41d8dac670028bb6f65a3d35ebe0b0e5f
|
3 |
+
size 158814912
|
onnx/decoder_model_merged.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49fc7f6f988514911b8a8ba11c6443bcf0e541f585c7c8c3093df5e737d3960e
|
3 |
+
size 159046668
|
onnx/decoder_model_merged_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:51076aa396ab5939c4668db9de901ad51765094b4c05c4c8c1f8ae2012ba1e08
|
3 |
+
size 40527613
|
onnx/decoder_model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:40166e4f975b3cecd24bb422db80eb06912777c8e8a56ab44f6bd771ec5df553
|
3 |
+
size 40159904
|
onnx/decoder_with_past_model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab3e0f45b1080bf2bb96b91cf25b7f3e6fbbe2ef92f9e34d7ee5912005252059
|
3 |
+
size 154039773
|
onnx/decoder_with_past_model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:335c3ac62be8eb68acc8a61795b8712e008d0635040d923308849309c5f0933d
|
3 |
+
size 38895882
|
onnx/encoder_model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f6a2c3ac23a426c85f8557f2763bf39cce7eeacf3004563762e023050ddc1fd9
|
3 |
+
size 87496990
|
onnx/encoder_model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2f29edbd925f8a49c9c7d1349895f960cf09d2efdc76fe23f957048d476e0d03
|
3 |
+
size 23082942
|
preprocessor_config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"crop_size": {
|
3 |
+
"height": 224,
|
4 |
+
"width": 224
|
5 |
+
},
|
6 |
+
"do_center_crop": false,
|
7 |
+
"do_normalize": true,
|
8 |
+
"do_rescale": true,
|
9 |
+
"do_resize": true,
|
10 |
+
"feature_extractor_type": "DeiTFeatureExtractor",
|
11 |
+
"image_mean": [
|
12 |
+
0.5,
|
13 |
+
0.5,
|
14 |
+
0.5
|
15 |
+
],
|
16 |
+
"image_processor_type": "DeiTFeatureExtractor",
|
17 |
+
"image_std": [
|
18 |
+
0.5,
|
19 |
+
0.5,
|
20 |
+
0.5
|
21 |
+
],
|
22 |
+
"resample": 3,
|
23 |
+
"rescale_factor": 0.00392156862745098,
|
24 |
+
"size": {
|
25 |
+
"height": 384,
|
26 |
+
"width": 384
|
27 |
+
}
|
28 |
+
}
|
quantize_config.json
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"per_channel": false,
|
3 |
+
"reduce_range": false,
|
4 |
+
"per_model_config": {
|
5 |
+
"decoder_model_merged": {
|
6 |
+
"op_types": [
|
7 |
+
"Where",
|
8 |
+
"Concat",
|
9 |
+
"Sqrt",
|
10 |
+
"Relu",
|
11 |
+
"Less",
|
12 |
+
"Equal",
|
13 |
+
"Reshape",
|
14 |
+
"Constant",
|
15 |
+
"Slice",
|
16 |
+
"MatMul",
|
17 |
+
"Expand",
|
18 |
+
"Pow",
|
19 |
+
"Transpose",
|
20 |
+
"Squeeze",
|
21 |
+
"ConstantOfShape",
|
22 |
+
"Add",
|
23 |
+
"Mul",
|
24 |
+
"Identity",
|
25 |
+
"Unsqueeze",
|
26 |
+
"Range",
|
27 |
+
"If",
|
28 |
+
"ReduceMean",
|
29 |
+
"Div",
|
30 |
+
"Softmax",
|
31 |
+
"Sub",
|
32 |
+
"Shape",
|
33 |
+
"Cast",
|
34 |
+
"Gather"
|
35 |
+
],
|
36 |
+
"weight_type": "QInt8"
|
37 |
+
},
|
38 |
+
"decoder_model": {
|
39 |
+
"op_types": [
|
40 |
+
"Where",
|
41 |
+
"Concat",
|
42 |
+
"Sqrt",
|
43 |
+
"Relu",
|
44 |
+
"Less",
|
45 |
+
"Equal",
|
46 |
+
"Reshape",
|
47 |
+
"Constant",
|
48 |
+
"Slice",
|
49 |
+
"MatMul",
|
50 |
+
"Expand",
|
51 |
+
"Pow",
|
52 |
+
"Transpose",
|
53 |
+
"Squeeze",
|
54 |
+
"ConstantOfShape",
|
55 |
+
"Add",
|
56 |
+
"Mul",
|
57 |
+
"Identity",
|
58 |
+
"Unsqueeze",
|
59 |
+
"Range",
|
60 |
+
"ReduceMean",
|
61 |
+
"Div",
|
62 |
+
"Softmax",
|
63 |
+
"Sub",
|
64 |
+
"Shape",
|
65 |
+
"Cast",
|
66 |
+
"Gather"
|
67 |
+
],
|
68 |
+
"weight_type": "QInt8"
|
69 |
+
},
|
70 |
+
"encoder_model": {
|
71 |
+
"op_types": [
|
72 |
+
"Where",
|
73 |
+
"Concat",
|
74 |
+
"Sqrt",
|
75 |
+
"Equal",
|
76 |
+
"Reshape",
|
77 |
+
"Constant",
|
78 |
+
"Slice",
|
79 |
+
"MatMul",
|
80 |
+
"Expand",
|
81 |
+
"Pow",
|
82 |
+
"Erf",
|
83 |
+
"Transpose",
|
84 |
+
"ConstantOfShape",
|
85 |
+
"Add",
|
86 |
+
"Mul",
|
87 |
+
"Conv",
|
88 |
+
"Unsqueeze",
|
89 |
+
"ReduceMean",
|
90 |
+
"Div",
|
91 |
+
"Softmax",
|
92 |
+
"Sub",
|
93 |
+
"Shape",
|
94 |
+
"Gather"
|
95 |
+
],
|
96 |
+
"weight_type": "QUInt8"
|
97 |
+
},
|
98 |
+
"decoder_with_past_model": {
|
99 |
+
"op_types": [
|
100 |
+
"Where",
|
101 |
+
"Concat",
|
102 |
+
"Sqrt",
|
103 |
+
"Relu",
|
104 |
+
"Equal",
|
105 |
+
"Reshape",
|
106 |
+
"Constant",
|
107 |
+
"MatMul",
|
108 |
+
"Expand",
|
109 |
+
"Pow",
|
110 |
+
"Transpose",
|
111 |
+
"ConstantOfShape",
|
112 |
+
"Add",
|
113 |
+
"Mul",
|
114 |
+
"Identity",
|
115 |
+
"Unsqueeze",
|
116 |
+
"Range",
|
117 |
+
"ReduceMean",
|
118 |
+
"Div",
|
119 |
+
"Softmax",
|
120 |
+
"Sub",
|
121 |
+
"Shape",
|
122 |
+
"Cast",
|
123 |
+
"Gather"
|
124 |
+
],
|
125 |
+
"weight_type": "QInt8"
|
126 |
+
}
|
127 |
+
}
|
128 |
+
}
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6f5e2fefcf793761a76a6bfb8ad35489f9c203b25557673284b6d032f41043f4
|
3 |
+
size 1356293
|
special_tokens_map.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"cls_token": "<s>",
|
4 |
+
"eos_token": "</s>",
|
5 |
+
"mask_token": {
|
6 |
+
"content": "<mask>",
|
7 |
+
"lstrip": true,
|
8 |
+
"normalized": true,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"pad_token": "<pad>",
|
13 |
+
"sep_token": "</s>",
|
14 |
+
"unk_token": "<unk>"
|
15 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"sep_token": "</s>",
|
17 |
+
"sp_model_kwargs": {},
|
18 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
19 |
+
"unk_token": "<unk>"
|
20 |
+
}
|