Hypernova823 commited on
Commit
e7257c0
·
verified ·
1 Parent(s): 93c6a7a

Upload 9 files

Browse files
.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ model.safetensors filter=lfs diff=lfs merge=lfs -text
config.json ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "VisionEncoderDecoderModel"
4
+ ],
5
+ "decoder": {
6
+ "_name_or_path": "",
7
+ "activation_dropout": 0.0,
8
+ "activation_function": "relu",
9
+ "add_cross_attention": true,
10
+ "architectures": null,
11
+ "attention_dropout": 0.0,
12
+ "bos_token_id": 0,
13
+ "chunk_size_feed_forward": 0,
14
+ "classifier_dropout": 0.0,
15
+ "cross_attention_hidden_size": 768,
16
+ "d_model": 1024,
17
+ "decoder_attention_heads": 16,
18
+ "decoder_ffn_dim": 4096,
19
+ "decoder_layerdrop": 0.0,
20
+ "decoder_layers": 12,
21
+ "decoder_start_token_id": 0,
22
+ "dropout": 0.1,
23
+ "dtype": "float32",
24
+ "eos_token_id": 2,
25
+ "finetuning_task": null,
26
+ "id2label": {
27
+ "0": "LABEL_0",
28
+ "1": "LABEL_1"
29
+ },
30
+ "init_std": 0.02,
31
+ "is_decoder": true,
32
+ "is_encoder_decoder": false,
33
+ "label2id": {
34
+ "LABEL_0": 0,
35
+ "LABEL_1": 1
36
+ },
37
+ "layernorm_embedding": false,
38
+ "max_position_embeddings": 1024,
39
+ "model_type": "trocr",
40
+ "output_attentions": false,
41
+ "output_hidden_states": false,
42
+ "pad_token_id": 1,
43
+ "prefix": null,
44
+ "problem_type": null,
45
+ "pruned_heads": {},
46
+ "return_dict": true,
47
+ "scale_embedding": true,
48
+ "sep_token_id": null,
49
+ "task_specific_params": null,
50
+ "tie_encoder_decoder": false,
51
+ "tie_word_embeddings": false,
52
+ "tokenizer_class": null,
53
+ "torchscript": false,
54
+ "use_bfloat16": false,
55
+ "use_cache": false,
56
+ "use_learned_position_embeddings": false,
57
+ "vocab_size": 50265
58
+ },
59
+ "decoder_start_token_id": 0,
60
+ "dtype": "float32",
61
+ "encoder": {
62
+ "_name_or_path": "",
63
+ "add_cross_attention": false,
64
+ "architectures": null,
65
+ "attention_probs_dropout_prob": 0.0,
66
+ "bos_token_id": null,
67
+ "chunk_size_feed_forward": 0,
68
+ "cross_attention_hidden_size": null,
69
+ "decoder_start_token_id": null,
70
+ "dtype": "float32",
71
+ "encoder_stride": 16,
72
+ "eos_token_id": null,
73
+ "finetuning_task": null,
74
+ "hidden_act": "gelu",
75
+ "hidden_dropout_prob": 0.0,
76
+ "hidden_size": 768,
77
+ "id2label": {
78
+ "0": "LABEL_0",
79
+ "1": "LABEL_1"
80
+ },
81
+ "image_size": 384,
82
+ "initializer_range": 0.02,
83
+ "intermediate_size": 3072,
84
+ "is_decoder": false,
85
+ "is_encoder_decoder": false,
86
+ "label2id": {
87
+ "LABEL_0": 0,
88
+ "LABEL_1": 1
89
+ },
90
+ "layer_norm_eps": 1e-12,
91
+ "model_type": "vit",
92
+ "num_attention_heads": 12,
93
+ "num_channels": 3,
94
+ "num_hidden_layers": 12,
95
+ "output_attentions": false,
96
+ "output_hidden_states": false,
97
+ "pad_token_id": null,
98
+ "patch_size": 16,
99
+ "pooler_act": "tanh",
100
+ "pooler_output_size": 768,
101
+ "prefix": null,
102
+ "problem_type": null,
103
+ "pruned_heads": {},
104
+ "qkv_bias": false,
105
+ "return_dict": true,
106
+ "sep_token_id": null,
107
+ "task_specific_params": null,
108
+ "tie_encoder_decoder": false,
109
+ "tie_word_embeddings": true,
110
+ "tokenizer_class": null,
111
+ "torchscript": false,
112
+ "use_bfloat16": false
113
+ },
114
+ "eos_token_id": 2,
115
+ "is_encoder_decoder": true,
116
+ "model_type": "vision-encoder-decoder",
117
+ "pad_token_id": 1,
118
+ "tie_word_embeddings": false,
119
+ "transformers_version": "5.3.0",
120
+ "use_cache": false,
121
+ "vocab_size": 50265
122
+ }
generation_config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": false,
3
+ "assistant_confidence_threshold": 0.4,
4
+ "assistant_lookbehind": 10,
5
+ "bos_token_id": 0,
6
+ "decoder_start_token_id": 0,
7
+ "diversity_penalty": 0.0,
8
+ "do_sample": false,
9
+ "early_stopping": true,
10
+ "encoder_no_repeat_ngram_size": 0,
11
+ "encoder_repetition_penalty": 1.0,
12
+ "eos_token_id": 2,
13
+ "epsilon_cutoff": 0.0,
14
+ "eta_cutoff": 0.0,
15
+ "length_penalty": 2.0,
16
+ "max_length": 128,
17
+ "min_length": 0,
18
+ "no_repeat_ngram_size": 3,
19
+ "num_assistant_tokens": 20,
20
+ "num_assistant_tokens_schedule": "constant",
21
+ "num_beam_groups": 1,
22
+ "num_beams": 4,
23
+ "num_return_sequences": 1,
24
+ "output_scores": false,
25
+ "pad_token_id": 1,
26
+ "remove_invalid_values": false,
27
+ "repetition_penalty": 1.0,
28
+ "return_dict_in_generate": false,
29
+ "target_lookbehind": 10,
30
+ "temperature": 1.0,
31
+ "top_k": 50,
32
+ "top_p": 1.0,
33
+ "transformers_version": "5.3.0",
34
+ "typical_p": 1.0,
35
+ "use_cache": false
36
+ }
metrics.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eval_loss": 0.8702017068862915,
3
+ "eval_cer": 0.008529115298131348,
4
+ "eval_runtime": 452.1877,
5
+ "eval_samples_per_second": 0.663,
6
+ "eval_steps_per_second": 0.042,
7
+ "epoch": 3.510140405616225
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b595dcbd08d0212c341946c5355eec5e1db682d70a73bc35e12ad24fb4a6af9c
3
+ size 1539518704
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data_format": "channels_first",
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "ViTImageProcessorFast",
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
+ }
processor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "data_format": "channels_first",
4
+ "do_normalize": true,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_processor_type": "ViTImageProcessorFast",
13
+ "image_std": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "resample": 2,
19
+ "rescale_factor": 0.00392156862745098,
20
+ "size": {
21
+ "height": 384,
22
+ "width": 384
23
+ }
24
+ },
25
+ "processor_class": "TrOCRProcessor"
26
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "cls_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "errors": "replace",
8
+ "is_local": true,
9
+ "mask_token": "<mask>",
10
+ "max_length": 128,
11
+ "model_max_length": 512,
12
+ "pad_to_multiple_of": null,
13
+ "pad_token": "<pad>",
14
+ "pad_token_type_id": 0,
15
+ "padding_side": "right",
16
+ "processor_class": "TrOCRProcessor",
17
+ "sep_token": "</s>",
18
+ "stride": 0,
19
+ "tokenizer_class": "RobertaTokenizer",
20
+ "trim_offsets": true,
21
+ "truncation_side": "right",
22
+ "truncation_strategy": "longest_first",
23
+ "unk_token": "<unk>"
24
+ }
training_args.bin ADDED
Binary file (4.92 kB). View file