nikolai40 commited on
Commit
64ee050
1 Parent(s): 578b846

Added model and config files

Browse files
config.json ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/trocr-small-stage1",
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
+ "bos_token_id": 0,
15
+ "chunk_size_feed_forward": 0,
16
+ "classifier_dropout": 0.0,
17
+ "cross_attention_hidden_size": 384,
18
+ "d_model": 256,
19
+ "decoder_attention_heads": 8,
20
+ "decoder_ffn_dim": 1024,
21
+ "decoder_layerdrop": 0.0,
22
+ "decoder_layers": 6,
23
+ "decoder_start_token_id": 2,
24
+ "diversity_penalty": 0.0,
25
+ "do_sample": false,
26
+ "dropout": 0.1,
27
+ "early_stopping": false,
28
+ "encoder_no_repeat_ngram_size": 0,
29
+ "eos_token_id": 2,
30
+ "exponential_decay_length_penalty": null,
31
+ "finetuning_task": null,
32
+ "forced_bos_token_id": null,
33
+ "forced_eos_token_id": null,
34
+ "id2label": {
35
+ "0": "LABEL_0",
36
+ "1": "LABEL_1"
37
+ },
38
+ "init_std": 0.02,
39
+ "is_decoder": true,
40
+ "is_encoder_decoder": false,
41
+ "label2id": {
42
+ "LABEL_0": 0,
43
+ "LABEL_1": 1
44
+ },
45
+ "layernorm_embedding": true,
46
+ "length_penalty": 1.0,
47
+ "max_length": 20,
48
+ "max_position_embeddings": 512,
49
+ "min_length": 0,
50
+ "model_type": "trocr",
51
+ "no_repeat_ngram_size": 0,
52
+ "num_beam_groups": 1,
53
+ "num_beams": 1,
54
+ "num_return_sequences": 1,
55
+ "output_attentions": false,
56
+ "output_hidden_states": false,
57
+ "output_scores": false,
58
+ "pad_token_id": 1,
59
+ "prefix": null,
60
+ "problem_type": null,
61
+ "pruned_heads": {},
62
+ "remove_invalid_values": false,
63
+ "repetition_penalty": 1.0,
64
+ "return_dict": true,
65
+ "return_dict_in_generate": false,
66
+ "scale_embedding": true,
67
+ "sep_token_id": null,
68
+ "task_specific_params": null,
69
+ "temperature": 1.0,
70
+ "tie_encoder_decoder": false,
71
+ "tie_word_embeddings": false,
72
+ "tokenizer_class": null,
73
+ "top_k": 50,
74
+ "top_p": 1.0,
75
+ "torch_dtype": null,
76
+ "torchscript": false,
77
+ "transformers_version": "4.18.0",
78
+ "typical_p": 1.0,
79
+ "use_bfloat16": false,
80
+ "use_cache": false,
81
+ "use_learned_position_embeddings": true,
82
+ "vocab_size": 64044
83
+ },
84
+ "decoder_start_token_id": 0,
85
+ "early_stopping": true,
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
+ "bos_token_id": null,
93
+ "chunk_size_feed_forward": 0,
94
+ "cross_attention_hidden_size": null,
95
+ "decoder_start_token_id": null,
96
+ "diversity_penalty": 0.0,
97
+ "do_sample": false,
98
+ "early_stopping": false,
99
+ "encoder_no_repeat_ngram_size": 0,
100
+ "encoder_stride": 16,
101
+ "eos_token_id": null,
102
+ "exponential_decay_length_penalty": null,
103
+ "finetuning_task": null,
104
+ "forced_bos_token_id": null,
105
+ "forced_eos_token_id": null,
106
+ "hidden_act": "gelu",
107
+ "hidden_dropout_prob": 0.0,
108
+ "hidden_size": 384,
109
+ "id2label": {
110
+ "0": "LABEL_0",
111
+ "1": "LABEL_1"
112
+ },
113
+ "image_size": 384,
114
+ "initializer_range": 0.02,
115
+ "intermediate_size": 1536,
116
+ "is_decoder": false,
117
+ "is_encoder_decoder": false,
118
+ "label2id": {
119
+ "LABEL_0": 0,
120
+ "LABEL_1": 1
121
+ },
122
+ "layer_norm_eps": 1e-12,
123
+ "length_penalty": 1.0,
124
+ "max_length": 20,
125
+ "min_length": 0,
126
+ "model_type": "deit",
127
+ "no_repeat_ngram_size": 0,
128
+ "num_attention_heads": 6,
129
+ "num_beam_groups": 1,
130
+ "num_beams": 1,
131
+ "num_channels": 3,
132
+ "num_hidden_layers": 12,
133
+ "num_return_sequences": 1,
134
+ "output_attentions": false,
135
+ "output_hidden_states": false,
136
+ "output_scores": false,
137
+ "pad_token_id": null,
138
+ "patch_size": 16,
139
+ "prefix": null,
140
+ "problem_type": null,
141
+ "pruned_heads": {},
142
+ "qkv_bias": true,
143
+ "remove_invalid_values": false,
144
+ "repetition_penalty": 1.0,
145
+ "return_dict": true,
146
+ "return_dict_in_generate": false,
147
+ "sep_token_id": null,
148
+ "task_specific_params": null,
149
+ "temperature": 1.0,
150
+ "tie_encoder_decoder": false,
151
+ "tie_word_embeddings": true,
152
+ "tokenizer_class": null,
153
+ "top_k": 50,
154
+ "top_p": 1.0,
155
+ "torch_dtype": null,
156
+ "torchscript": false,
157
+ "transformers_version": "4.18.0",
158
+ "typical_p": 1.0,
159
+ "use_bfloat16": false
160
+ },
161
+ "eos_token_id": 2,
162
+ "is_encoder_decoder": true,
163
+ "length_penalty": 2.0,
164
+ "max_length": 64,
165
+ "model_type": "vision-encoder-decoder",
166
+ "no_repeat_ngram_size": 3,
167
+ "num_beams": 4,
168
+ "pad_token_id": 1,
169
+ "tie_word_embeddings": false,
170
+ "torch_dtype": "float32",
171
+ "transformers_version": null,
172
+ "vocab_size": 64044
173
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": 224,
3
+ "do_center_crop": false,
4
+ "do_normalize": true,
5
+ "do_resize": true,
6
+ "feature_extractor_type": "DeiTFeatureExtractor",
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "resample": 3,
18
+ "size": 384
19
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0a2b0ab766b5741ec25c0992a86157c2adbcb29b4ad248fccf0372120c4d28d
3
+ size 246509357
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 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "sp_model_kwargs": {}, "tokenizer_class": "XLMRobertaTokenizer"}