shoubhik commited on
Commit
a6decb8
1 Parent(s): 01045aa

Initial Version

Browse files
config.json ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/trocr-base-printed",
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
+ "bos_token_id": 0,
15
+ "chunk_size_feed_forward": 0,
16
+ "classifier_dropout": 0.0,
17
+ "cross_attention_hidden_size": 768,
18
+ "d_model": 1024,
19
+ "decoder_attention_heads": 16,
20
+ "decoder_ffn_dim": 4096,
21
+ "decoder_layerdrop": 0.0,
22
+ "decoder_layers": 12,
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": false,
67
+ "sep_token_id": null,
68
+ "task_specific_params": null,
69
+ "temperature": 1.0,
70
+ "tie_encoder_decoder": false,
71
+ "tie_word_embeddings": true,
72
+ "tokenizer_class": null,
73
+ "top_k": 50,
74
+ "top_p": 1.0,
75
+ "torch_dtype": null,
76
+ "torchscript": false,
77
+ "transformers_version": "4.19.4",
78
+ "typical_p": 1.0,
79
+ "use_bfloat16": false,
80
+ "use_cache": false,
81
+ "use_learned_position_embeddings": true,
82
+ "vocab_size": 50265
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": 768,
109
+ "id2label": {
110
+ "0": "LABEL_0",
111
+ "1": "LABEL_1"
112
+ },
113
+ "image_size": 384,
114
+ "initializer_range": 0.02,
115
+ "intermediate_size": 3072,
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": "vit",
127
+ "no_repeat_ngram_size": 0,
128
+ "num_attention_heads": 12,
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": false,
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.19.4",
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": 50265
173
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
preprocessor_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "ViTFeatureExtractor",
5
+ "image_mean": [
6
+ 0.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_std": [
11
+ 0.5,
12
+ 0.5,
13
+ 0.5
14
+ ],
15
+ "processor_class": "TrOCRProcessor",
16
+ "resample": 2,
17
+ "size": 384
18
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d51ab228c9bbc2250ce072cc500588cad9e7482006cfd0d4adb74f9dd4e475c8
3
+ size 1335850753
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"bos_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<unk>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "sep_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "pad_token": {"content": "<pad>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "cls_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true}}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"errors": "replace", "bos_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "sep_token": {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "cls_token": {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "unk_token": {"content": "<unk>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "pad_token": {"content": "<pad>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "trim_offsets": true, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "microsoft/trocr-base-printed", "tokenizer_class": "RobertaTokenizer", "processor_class": "TrOCRProcessor"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff