Young Ho Shin commited on
Commit
ea6e17a
1 Parent(s): 616f737

Add model version4

Browse files
Files changed (2) hide show
  1. model/config.json +168 -0
  2. model/tokenizer-wordlevel.json +352 -0
model/config.json ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "finetuning_task": null,
31
+ "forced_bos_token_id": null,
32
+ "forced_eos_token_id": null,
33
+ "id2label": {
34
+ "0": "LABEL_0",
35
+ "1": "LABEL_1"
36
+ },
37
+ "init_std": 0.02,
38
+ "is_decoder": true,
39
+ "is_encoder_decoder": false,
40
+ "label2id": {
41
+ "LABEL_0": 0,
42
+ "LABEL_1": 1
43
+ },
44
+ "layernorm_embedding": true,
45
+ "length_penalty": 1.0,
46
+ "max_length": 20,
47
+ "max_position_embeddings": 512,
48
+ "min_length": 0,
49
+ "model_type": "trocr",
50
+ "no_repeat_ngram_size": 0,
51
+ "num_beam_groups": 1,
52
+ "num_beams": 1,
53
+ "num_return_sequences": 1,
54
+ "output_attentions": false,
55
+ "output_hidden_states": false,
56
+ "output_scores": false,
57
+ "pad_token_id": 1,
58
+ "prefix": null,
59
+ "problem_type": null,
60
+ "pruned_heads": {},
61
+ "remove_invalid_values": false,
62
+ "repetition_penalty": 1.0,
63
+ "return_dict": true,
64
+ "return_dict_in_generate": false,
65
+ "scale_embedding": true,
66
+ "sep_token_id": null,
67
+ "task_specific_params": null,
68
+ "temperature": 1.0,
69
+ "tie_encoder_decoder": false,
70
+ "tie_word_embeddings": false,
71
+ "tokenizer_class": null,
72
+ "top_k": 50,
73
+ "top_p": 1.0,
74
+ "torch_dtype": null,
75
+ "torchscript": false,
76
+ "transformers_version": "4.16.2",
77
+ "use_bfloat16": false,
78
+ "use_cache": false,
79
+ "use_learned_position_embeddings": true,
80
+ "vocab_size": 64044
81
+ },
82
+ "decoder_start_token_id": 1,
83
+ "early_stopping": true,
84
+ "encoder": {
85
+ "_name_or_path": "",
86
+ "add_cross_attention": false,
87
+ "architectures": null,
88
+ "attention_probs_dropout_prob": 0.0,
89
+ "bad_words_ids": null,
90
+ "bos_token_id": null,
91
+ "chunk_size_feed_forward": 0,
92
+ "cross_attention_hidden_size": null,
93
+ "decoder_start_token_id": null,
94
+ "diversity_penalty": 0.0,
95
+ "do_sample": false,
96
+ "early_stopping": false,
97
+ "encoder_no_repeat_ngram_size": 0,
98
+ "eos_token_id": null,
99
+ "finetuning_task": null,
100
+ "forced_bos_token_id": null,
101
+ "forced_eos_token_id": null,
102
+ "hidden_act": "gelu",
103
+ "hidden_dropout_prob": 0.0,
104
+ "hidden_size": 384,
105
+ "id2label": {
106
+ "0": "LABEL_0",
107
+ "1": "LABEL_1"
108
+ },
109
+ "image_size": 384,
110
+ "initializer_range": 0.02,
111
+ "intermediate_size": 1536,
112
+ "is_decoder": false,
113
+ "is_encoder_decoder": false,
114
+ "label2id": {
115
+ "LABEL_0": 0,
116
+ "LABEL_1": 1
117
+ },
118
+ "layer_norm_eps": 1e-12,
119
+ "length_penalty": 1.0,
120
+ "max_length": 20,
121
+ "min_length": 0,
122
+ "model_type": "deit",
123
+ "no_repeat_ngram_size": 0,
124
+ "num_attention_heads": 6,
125
+ "num_beam_groups": 1,
126
+ "num_beams": 1,
127
+ "num_channels": 3,
128
+ "num_hidden_layers": 12,
129
+ "num_return_sequences": 1,
130
+ "output_attentions": false,
131
+ "output_hidden_states": false,
132
+ "output_scores": false,
133
+ "pad_token_id": null,
134
+ "patch_size": 16,
135
+ "prefix": null,
136
+ "problem_type": null,
137
+ "pruned_heads": {},
138
+ "qkv_bias": true,
139
+ "remove_invalid_values": false,
140
+ "repetition_penalty": 1.0,
141
+ "return_dict": true,
142
+ "return_dict_in_generate": false,
143
+ "sep_token_id": null,
144
+ "task_specific_params": null,
145
+ "temperature": 1.0,
146
+ "tie_encoder_decoder": false,
147
+ "tie_word_embeddings": true,
148
+ "tokenizer_class": null,
149
+ "top_k": 50,
150
+ "top_p": 1.0,
151
+ "torch_dtype": null,
152
+ "torchscript": false,
153
+ "transformers_version": "4.16.2",
154
+ "use_bfloat16": false
155
+ },
156
+ "eos_token_id": 2,
157
+ "is_encoder_decoder": true,
158
+ "length_penalty": 2.0,
159
+ "max_length": 100,
160
+ "model_type": "vision-encoder-decoder",
161
+ "no_repeat_ngram_size": 3,
162
+ "num_beams": 4,
163
+ "pad_token_id": 3,
164
+ "tie_word_embeddings": false,
165
+ "torch_dtype": "float32",
166
+ "transformers_version": null,
167
+ "vocab_size": 200
168
+ }
model/tokenizer-wordlevel.json ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "truncation": {
4
+ "direction": "Right",
5
+ "max_length": 100,
6
+ "strategy": "LongestFirst",
7
+ "stride": 0
8
+ },
9
+ "padding": {
10
+ "strategy": {
11
+ "Fixed": 100
12
+ },
13
+ "direction": "Right",
14
+ "pad_to_multiple_of": null,
15
+ "pad_id": 0,
16
+ "pad_type_id": 0,
17
+ "pad_token": "[PAD]"
18
+ },
19
+ "added_tokens": [
20
+ {
21
+ "id": 0,
22
+ "content": "[UNK]",
23
+ "single_word": false,
24
+ "lstrip": false,
25
+ "rstrip": false,
26
+ "normalized": false,
27
+ "special": true
28
+ },
29
+ {
30
+ "id": 1,
31
+ "content": "[CLS]",
32
+ "single_word": false,
33
+ "lstrip": false,
34
+ "rstrip": false,
35
+ "normalized": false,
36
+ "special": true
37
+ },
38
+ {
39
+ "id": 2,
40
+ "content": "[SEP]",
41
+ "single_word": false,
42
+ "lstrip": false,
43
+ "rstrip": false,
44
+ "normalized": false,
45
+ "special": true
46
+ },
47
+ {
48
+ "id": 3,
49
+ "content": "[PAD]",
50
+ "single_word": false,
51
+ "lstrip": false,
52
+ "rstrip": false,
53
+ "normalized": false,
54
+ "special": true
55
+ },
56
+ {
57
+ "id": 4,
58
+ "content": "[MASK]",
59
+ "single_word": false,
60
+ "lstrip": false,
61
+ "rstrip": false,
62
+ "normalized": false,
63
+ "special": true
64
+ }
65
+ ],
66
+ "normalizer": null,
67
+ "pre_tokenizer": {
68
+ "type": "Whitespace"
69
+ },
70
+ "post_processor": {
71
+ "type": "TemplateProcessing",
72
+ "single": [
73
+ {
74
+ "SpecialToken": {
75
+ "id": "[CLS]",
76
+ "type_id": 0
77
+ }
78
+ },
79
+ {
80
+ "Sequence": {
81
+ "id": "A",
82
+ "type_id": 0
83
+ }
84
+ },
85
+ {
86
+ "SpecialToken": {
87
+ "id": "[SEP]",
88
+ "type_id": 0
89
+ }
90
+ }
91
+ ],
92
+ "pair": [
93
+ {
94
+ "SpecialToken": {
95
+ "id": "[CLS]",
96
+ "type_id": 0
97
+ }
98
+ },
99
+ {
100
+ "Sequence": {
101
+ "id": "A",
102
+ "type_id": 0
103
+ }
104
+ },
105
+ {
106
+ "SpecialToken": {
107
+ "id": "[SEP]",
108
+ "type_id": 0
109
+ }
110
+ },
111
+ {
112
+ "Sequence": {
113
+ "id": "B",
114
+ "type_id": 1
115
+ }
116
+ },
117
+ {
118
+ "SpecialToken": {
119
+ "id": "[SEP]",
120
+ "type_id": 1
121
+ }
122
+ }
123
+ ],
124
+ "special_tokens": {
125
+ "[CLS]": {
126
+ "id": "[CLS]",
127
+ "ids": [
128
+ 1
129
+ ],
130
+ "tokens": [
131
+ "[CLS]"
132
+ ]
133
+ },
134
+ "[SEP]": {
135
+ "id": "[SEP]",
136
+ "ids": [
137
+ 2
138
+ ],
139
+ "tokens": [
140
+ "[SEP]"
141
+ ]
142
+ }
143
+ }
144
+ },
145
+ "decoder": null,
146
+ "model": {
147
+ "type": "WordLevel",
148
+ "vocab": {
149
+ "[UNK]": 0,
150
+ "[CLS]": 1,
151
+ "[SEP]": 2,
152
+ "[PAD]": 3,
153
+ "[MASK]": 4,
154
+ "}": 5,
155
+ "{": 6,
156
+ "\\": 7,
157
+ "_": 8,
158
+ "^": 9,
159
+ "(": 10,
160
+ ")": 11,
161
+ "2": 12,
162
+ "1": 13,
163
+ "-": 14,
164
+ "=": 15,
165
+ ",": 16,
166
+ "+": 17,
167
+ "frac": 18,
168
+ "i": 19,
169
+ "0": 20,
170
+ "x": 21,
171
+ "n": 22,
172
+ ".": 23,
173
+ "d": 24,
174
+ "\\,": 25,
175
+ "a": 26,
176
+ "mu": 27,
177
+ "left": 28,
178
+ "right": 29,
179
+ "e": 30,
180
+ "k": 31,
181
+ "c": 32,
182
+ "m": 33,
183
+ "r": 34,
184
+ "p": 35,
185
+ "3": 36,
186
+ "alpha": 37,
187
+ "t": 38,
188
+ "partial": 39,
189
+ "~": 40,
190
+ "l": 41,
191
+ "A": 42,
192
+ "s": 43,
193
+ "&": 44,
194
+ "4": 45,
195
+ "j": 46,
196
+ "\\;": 47,
197
+ "g": 48,
198
+ "prime": 49,
199
+ "]": 50,
200
+ "[": 51,
201
+ "nu": 52,
202
+ "z": 53,
203
+ "pi": 54,
204
+ "|": 55,
205
+ "b": 56,
206
+ "phi": 57,
207
+ "\\\\": 58,
208
+ "mathrm": 59,
209
+ "q": 60,
210
+ "operatorname": 61,
211
+ "cal": 62,
212
+ "N": 63,
213
+ "delta": 64,
214
+ "f": 65,
215
+ "lambda": 66,
216
+ "beta": 67,
217
+ "bar": 68,
218
+ "T": 69,
219
+ "int": 70,
220
+ "array": 71,
221
+ "R": 72,
222
+ "S": 73,
223
+ "D": 74,
224
+ "L": 75,
225
+ "M": 76,
226
+ "B": 77,
227
+ "y": 78,
228
+ "sigma": 79,
229
+ "F": 80,
230
+ "theta": 81,
231
+ "/": 82,
232
+ "gamma": 83,
233
+ "h": 84,
234
+ "hat": 85,
235
+ "psi": 86,
236
+ "sqrt": 87,
237
+ "sum": 88,
238
+ "u": 89,
239
+ "H": 90,
240
+ "o": 91,
241
+ "rho": 92,
242
+ "tilde": 93,
243
+ "tau": 94,
244
+ "C": 95,
245
+ "P": 96,
246
+ "G": 97,
247
+ "V": 98,
248
+ "I": 99,
249
+ "X": 100,
250
+ "omega": 101,
251
+ "epsilon": 102,
252
+ "E": 103,
253
+ "J": 104,
254
+ "bf": 105,
255
+ "eta": 106,
256
+ "v": 107,
257
+ "xi": 108,
258
+ "Q": 109,
259
+ "Phi": 110,
260
+ "quad": 111,
261
+ "*": 112,
262
+ "5": 113,
263
+ "\\{": 114,
264
+ "vec": 115,
265
+ "begin": 116,
266
+ "end": 117,
267
+ "Gamma": 118,
268
+ "K": 119,
269
+ "infty": 120,
270
+ "\\}": 121,
271
+ "6": 122,
272
+ "U": 123,
273
+ "rangle": 124,
274
+ "dot": 125,
275
+ "W": 126,
276
+ "pm": 127,
277
+ "Lambda": 128,
278
+ "Z": 129,
279
+ "varphi": 130,
280
+ "Delta": 131,
281
+ "w": 132,
282
+ "chi": 133,
283
+ ";": 134,
284
+ "8": 135,
285
+ "\\!": 136,
286
+ "Omega": 137,
287
+ "kappa": 138,
288
+ "qquad": 139,
289
+ "cdot": 140,
290
+ "Psi": 141,
291
+ "equiv": 142,
292
+ "langle": 143,
293
+ "overline": 144,
294
+ ">": 145,
295
+ "<": 146,
296
+ "dagger": 147,
297
+ "zeta": 148,
298
+ "varepsilon": 149,
299
+ "cdots": 150,
300
+ "rightarrow": 151,
301
+ "O": 152,
302
+ "nabla": 153,
303
+ "Y": 154,
304
+ "ldots": 155,
305
+ ":": 156,
306
+ "Sigma": 157,
307
+ "ell": 158,
308
+ "7": 159,
309
+ "mathcal": 160,
310
+ "\\:": 161,
311
+ "!": 162,
312
+ "otimes": 163,
313
+ "prod": 164,
314
+ "wedge": 165,
315
+ "9": 166,
316
+ "hspace": 167,
317
+ "Pi": 168,
318
+ "hbar": 169,
319
+ "sim": 170,
320
+ "vert": 171,
321
+ "in": 172,
322
+ "Big": 173,
323
+ "widetilde": 174,
324
+ "displaystyle": 175,
325
+ "times": 176,
326
+ "Theta": 177,
327
+ "underline": 178,
328
+ "mid": 179,
329
+ "to": 180,
330
+ "dots": 181,
331
+ "mathbf": 182,
332
+ "ast": 183,
333
+ "leq": 184,
334
+ "approx": 185,
335
+ "star": 186,
336
+ "stackrel": 187,
337
+ "perp": 188,
338
+ "widehat": 189,
339
+ "big": 190,
340
+ "vartheta": 191,
341
+ "'": 192,
342
+ "Bigr": 193,
343
+ "geq": 194,
344
+ "mp": 195,
345
+ "Bigl": 196,
346
+ "dag": 197,
347
+ "neq": 198,
348
+ "simeq": 199
349
+ },
350
+ "unk_token": "[UNK]"
351
+ }
352
+ }