Xenova HF staff commited on
Commit
5b3db74
1 Parent(s): 09df7c5

Upload folder using huggingface_hub

Browse files
config.json ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/trocr-base-handwritten",
3
+ "architectures": [
4
+ "VisionEncoderDecoderModel"
5
+ ],
6
+ "decoder": {
7
+ "_name_or_path": "",
8
+ "activation_dropout": 0.0,
9
+ "activation_function": "gelu",
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": 768,
19
+ "d_model": 1024,
20
+ "decoder_attention_heads": 16,
21
+ "decoder_ffn_dim": 4096,
22
+ "decoder_layerdrop": 0.0,
23
+ "decoder_layers": 12,
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": false,
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": true,
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": 50265
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": 768,
110
+ "id2label": {
111
+ "0": "LABEL_0",
112
+ "1": "LABEL_1"
113
+ },
114
+ "image_size": 384,
115
+ "initializer_range": 0.02,
116
+ "intermediate_size": 3072,
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": "vit",
128
+ "no_repeat_ngram_size": 0,
129
+ "num_attention_heads": 12,
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": false,
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
+ "is_encoder_decoder": true,
164
+ "model_type": "vision-encoder-decoder",
165
+ "processor_class": "TrOCRProcessor",
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
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
onnx/decoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:329ea84731810097e1ab02cc1b79b205d2851b5a22203c8f88206739141566b6
3
+ size 989624176
onnx/decoder_model_merged.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4754337314e42347fe02e9360a84620af561d6e5de120fcef02ff4f389e99bf6
3
+ size 990095138
onnx/decoder_model_merged_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:624f81a5e10206b7757b08d1fa821a19b7cbbf3970385a934f3cf0529efdfc43
3
+ size 249597124
onnx/decoder_model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83ead15ae5a4a2875d58a86116254e5a1e93daf2cc47387ae8faca39d72795a5
3
+ size 248853923
onnx/decoder_with_past_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fa0136b7712127f7069fc39ac996863148b9de5ac27863ab4465f8434bfb773
3
+ size 913945543
onnx/decoder_with_past_model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d36165d998e9c37c3b40130b3201c57244b95f93acd4b7cb29b129f95daa0568
3
+ size 229745033
onnx/encoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0bece888fe151d9971052f81b60f14de9995de9f7c099927a08764b2be158836
3
+ size 344487712
onnx/encoder_model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8689f7a6122816789922e2e4f1063646ab69396ad0d1144437bba95dcbab5c86
3
+ size 88082928
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": true,
5
+ "feature_extractor_type": "ViTFeatureExtractor",
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "ViTFeatureExtractor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "resample": 2,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "height": 384,
21
+ "width": 384
22
+ }
23
+ }
quantize_config.json ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "per_channel": false,
3
+ "reduce_range": false,
4
+ "per_model_config": {
5
+ "decoder_model_merged": {
6
+ "op_types": [
7
+ "Pow",
8
+ "If",
9
+ "Add",
10
+ "Shape",
11
+ "Cast",
12
+ "Unsqueeze",
13
+ "Range",
14
+ "ReduceMean",
15
+ "Sqrt",
16
+ "Reshape",
17
+ "Slice",
18
+ "Div",
19
+ "Constant",
20
+ "ConstantOfShape",
21
+ "Squeeze",
22
+ "Softmax",
23
+ "Transpose",
24
+ "Erf",
25
+ "Equal",
26
+ "Sub",
27
+ "Expand",
28
+ "Mul",
29
+ "Where",
30
+ "Gather",
31
+ "MatMul",
32
+ "Less",
33
+ "Concat"
34
+ ],
35
+ "weight_type": "QInt8"
36
+ },
37
+ "decoder_model": {
38
+ "op_types": [
39
+ "Pow",
40
+ "Add",
41
+ "Shape",
42
+ "Cast",
43
+ "Unsqueeze",
44
+ "Range",
45
+ "ReduceMean",
46
+ "Sqrt",
47
+ "Reshape",
48
+ "Slice",
49
+ "Div",
50
+ "Constant",
51
+ "ConstantOfShape",
52
+ "Squeeze",
53
+ "Softmax",
54
+ "Transpose",
55
+ "Erf",
56
+ "Equal",
57
+ "Sub",
58
+ "Expand",
59
+ "Mul",
60
+ "Where",
61
+ "Gather",
62
+ "MatMul",
63
+ "Less",
64
+ "Concat"
65
+ ],
66
+ "weight_type": "QInt8"
67
+ },
68
+ "encoder_model": {
69
+ "op_types": [
70
+ "Pow",
71
+ "Add",
72
+ "Shape",
73
+ "Unsqueeze",
74
+ "ReduceMean",
75
+ "Sqrt",
76
+ "Reshape",
77
+ "Slice",
78
+ "Div",
79
+ "Constant",
80
+ "ConstantOfShape",
81
+ "Softmax",
82
+ "Transpose",
83
+ "Erf",
84
+ "Equal",
85
+ "Sub",
86
+ "Expand",
87
+ "Mul",
88
+ "Where",
89
+ "Gather",
90
+ "MatMul",
91
+ "Conv",
92
+ "Concat"
93
+ ],
94
+ "weight_type": "QUInt8"
95
+ },
96
+ "decoder_with_past_model": {
97
+ "op_types": [
98
+ "Pow",
99
+ "Add",
100
+ "Shape",
101
+ "Cast",
102
+ "Unsqueeze",
103
+ "Range",
104
+ "ReduceMean",
105
+ "Sqrt",
106
+ "Reshape",
107
+ "Div",
108
+ "Constant",
109
+ "ConstantOfShape",
110
+ "Softmax",
111
+ "Transpose",
112
+ "Erf",
113
+ "Equal",
114
+ "Sub",
115
+ "Expand",
116
+ "Mul",
117
+ "Where",
118
+ "Gather",
119
+ "MatMul",
120
+ "Concat"
121
+ ],
122
+ "weight_type": "QInt8"
123
+ }
124
+ }
125
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": true,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "bos_token": {
4
+ "__type": "AddedToken",
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false
10
+ },
11
+ "clean_up_tokenization_spaces": true,
12
+ "cls_token": {
13
+ "__type": "AddedToken",
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": true,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "eos_token": {
21
+ "__type": "AddedToken",
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": true,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ },
28
+ "errors": "replace",
29
+ "mask_token": {
30
+ "__type": "AddedToken",
31
+ "content": "<mask>",
32
+ "lstrip": true,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "model_max_length": 512,
38
+ "pad_token": {
39
+ "__type": "AddedToken",
40
+ "content": "<pad>",
41
+ "lstrip": false,
42
+ "normalized": true,
43
+ "rstrip": false,
44
+ "single_word": false
45
+ },
46
+ "processor_class": "TrOCRProcessor",
47
+ "sep_token": {
48
+ "__type": "AddedToken",
49
+ "content": "</s>",
50
+ "lstrip": false,
51
+ "normalized": true,
52
+ "rstrip": false,
53
+ "single_word": false
54
+ },
55
+ "tokenizer_class": "RobertaTokenizer",
56
+ "trim_offsets": true,
57
+ "unk_token": {
58
+ "__type": "AddedToken",
59
+ "content": "<unk>",
60
+ "lstrip": false,
61
+ "normalized": true,
62
+ "rstrip": false,
63
+ "single_word": false
64
+ }
65
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff