personalizedrefrigerator commited on
Commit
63176cb
·
verified ·
1 Parent(s): c3d1076

End of training

Browse files
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ language:
4
+ - fr
5
+ base_model: microsoft/trocr-base-handwritten
6
+ tags:
7
+ - generated_from_trainer
8
+ metrics:
9
+ - wer
10
+ model-index:
11
+ - name: TrOCR Small (Finetuned on French)
12
+ results: []
13
+ ---
14
+
15
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
+ should probably proofread and complete it, then remove this comment. -->
17
+
18
+ # TrOCR Small (Finetuned on French)
19
+
20
+ This model is a fine-tuned version of [microsoft/trocr-base-handwritten](https://huggingface.co/microsoft/trocr-base-handwritten) on an unknown dataset.
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.0871
23
+ - Model Preparation Time: 0.0066
24
+ - Cer: 0.0134
25
+ - Wer: 0.0350
26
+ - Ratio: 97.4287
27
+
28
+ ## Model description
29
+
30
+ More information needed
31
+
32
+ ## Intended uses & limitations
33
+
34
+ More information needed
35
+
36
+ ## Training and evaluation data
37
+
38
+ More information needed
39
+
40
+ ## Training procedure
41
+
42
+ ### Training hyperparameters
43
+
44
+ The following hyperparameters were used during training:
45
+ - learning_rate: 5e-05
46
+ - train_batch_size: 8
47
+ - eval_batch_size: 8
48
+ - seed: 42
49
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
50
+ - lr_scheduler_type: linear
51
+ - training_steps: 12000
52
+ - mixed_precision_training: Native AMP
53
+
54
+ ### Training results
55
+
56
+ | Training Loss | Epoch | Step | Validation Loss | Model Preparation Time | Cer | Wer | Ratio |
57
+ |:-------------:|:------:|:-----:|:---------------:|:----------------------:|:------:|:------:|:-------:|
58
+ | 1.359 | 0.0333 | 400 | 1.0638 | 0.0066 | 0.1715 | 0.3841 | 89.6898 |
59
+ | 1.1123 | 0.0667 | 800 | 1.2707 | 0.0066 | 0.1715 | 0.4437 | 89.7413 |
60
+ | 0.872 | 0.1 | 1200 | 0.9230 | 0.0066 | 0.1305 | 0.3576 | 91.0810 |
61
+ | 0.6831 | 0.1333 | 1600 | 0.7046 | 0.0066 | 0.1195 | 0.2848 | 92.7617 |
62
+ | 0.6659 | 0.1667 | 2000 | 0.5952 | 0.0066 | 0.0841 | 0.2450 | 94.7742 |
63
+ | 0.612 | 0.2 | 2400 | 0.5830 | 0.0066 | 0.1029 | 0.2517 | 93.2609 |
64
+ | 0.4865 | 0.2333 | 2800 | 0.5312 | 0.0066 | 0.0973 | 0.2318 | 94.4422 |
65
+ | 0.4922 | 0.2667 | 3200 | 0.5842 | 0.0066 | 0.0918 | 0.1987 | 95.5454 |
66
+ | 0.4152 | 0.3 | 3600 | 0.4215 | 0.0066 | 0.0664 | 0.1921 | 95.9747 |
67
+ | 0.3648 | 0.3333 | 4000 | 0.4264 | 0.0066 | 0.0608 | 0.1722 | 96.4262 |
68
+ | 0.3272 | 0.3667 | 4400 | 0.5209 | 0.0066 | 0.0653 | 0.1921 | 95.3742 |
69
+ | 0.3172 | 0.4 | 4800 | 0.4229 | 0.0066 | 0.0531 | 0.1788 | 95.8131 |
70
+ | 0.2672 | 0.4333 | 5200 | 0.4071 | 0.0066 | 0.0586 | 0.1921 | 96.0787 |
71
+ | 0.2747 | 0.4667 | 5600 | 0.3494 | 0.0066 | 0.0586 | 0.1656 | 96.2269 |
72
+ | 0.2576 | 0.5 | 6000 | 0.3687 | 0.0066 | 0.0642 | 0.1523 | 96.6562 |
73
+ | 0.2138 | 0.5333 | 6400 | 0.3945 | 0.0066 | 0.0564 | 0.1391 | 96.8775 |
74
+ | 0.2197 | 0.5667 | 6800 | 0.3698 | 0.0066 | 0.0420 | 0.1391 | 97.3293 |
75
+ | 0.1908 | 1.0141 | 7200 | 0.3288 | 0.0066 | 0.0420 | 0.1126 | 97.6500 |
76
+ | 0.145 | 1.0474 | 7600 | 0.2655 | 0.0066 | 0.0332 | 0.0993 | 97.6602 |
77
+ | 0.1347 | 1.0808 | 8000 | 0.2659 | 0.0066 | 0.0365 | 0.1258 | 97.2893 |
78
+ | 0.1092 | 1.1141 | 8400 | 0.2496 | 0.0066 | 0.0343 | 0.1192 | 97.6671 |
79
+ | 0.111 | 1.1474 | 8800 | 0.2205 | 0.0066 | 0.0221 | 0.0861 | 98.4693 |
80
+ | 0.1033 | 1.1807 | 9200 | 0.2226 | 0.0066 | 0.0254 | 0.0927 | 98.1761 |
81
+ | 0.0919 | 1.2141 | 9600 | 0.1787 | 0.0066 | 0.0210 | 0.0728 | 98.6440 |
82
+ | 0.074 | 1.2474 | 10000 | 0.1756 | 0.0066 | 0.0188 | 0.0464 | 99.3030 |
83
+ | 0.0833 | 1.2808 | 10400 | 0.1830 | 0.0066 | 0.0232 | 0.0728 | 98.8762 |
84
+ | 0.057 | 1.3141 | 10800 | 0.1675 | 0.0066 | 0.0133 | 0.0530 | 99.3276 |
85
+ | 0.038 | 1.3474 | 11200 | 0.1709 | 0.0066 | 0.0188 | 0.0596 | 98.9563 |
86
+ | 0.0409 | 1.3807 | 11600 | 0.1400 | 0.0066 | 0.0133 | 0.0530 | 99.2905 |
87
+ | 0.0404 | 1.4141 | 12000 | 0.1423 | 0.0066 | 0.0122 | 0.0464 | 99.2598 |
88
+
89
+
90
+ ### Framework versions
91
+
92
+ - Transformers 4.46.3
93
+ - Pytorch 2.5.1+cu121
94
+ - Tokenizers 0.20.3
config.json ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/trocr-base-handwritten",
3
+ "architectures": [
4
+ "VisionEncoderDecoderModel"
5
+ ],
6
+ "decoder": {
7
+ "_attn_implementation_autoset": false,
8
+ "_name_or_path": "",
9
+ "activation_dropout": 0.0,
10
+ "activation_function": "gelu",
11
+ "add_cross_attention": true,
12
+ "architectures": null,
13
+ "attention_dropout": 0.0,
14
+ "bad_words_ids": null,
15
+ "begin_suppress_tokens": null,
16
+ "bos_token_id": 0,
17
+ "chunk_size_feed_forward": 0,
18
+ "classifier_dropout": 0.0,
19
+ "cross_attention_hidden_size": 768,
20
+ "d_model": 1024,
21
+ "decoder_attention_heads": 16,
22
+ "decoder_ffn_dim": 4096,
23
+ "decoder_layerdrop": 0.0,
24
+ "decoder_layers": 12,
25
+ "decoder_start_token_id": 2,
26
+ "diversity_penalty": 0.0,
27
+ "do_sample": false,
28
+ "dropout": 0.1,
29
+ "early_stopping": false,
30
+ "encoder_no_repeat_ngram_size": 0,
31
+ "eos_token_id": 2,
32
+ "exponential_decay_length_penalty": null,
33
+ "finetuning_task": null,
34
+ "forced_bos_token_id": null,
35
+ "forced_eos_token_id": null,
36
+ "id2label": {
37
+ "0": "LABEL_0",
38
+ "1": "LABEL_1"
39
+ },
40
+ "init_std": 0.02,
41
+ "is_decoder": true,
42
+ "is_encoder_decoder": false,
43
+ "label2id": {
44
+ "LABEL_0": 0,
45
+ "LABEL_1": 1
46
+ },
47
+ "layernorm_embedding": true,
48
+ "length_penalty": 1.0,
49
+ "max_length": 20,
50
+ "max_position_embeddings": 512,
51
+ "min_length": 0,
52
+ "model_type": "trocr",
53
+ "no_repeat_ngram_size": 0,
54
+ "num_beam_groups": 1,
55
+ "num_beams": 1,
56
+ "num_return_sequences": 1,
57
+ "output_attentions": false,
58
+ "output_hidden_states": false,
59
+ "output_scores": false,
60
+ "pad_token_id": 1,
61
+ "prefix": null,
62
+ "problem_type": null,
63
+ "pruned_heads": {},
64
+ "remove_invalid_values": false,
65
+ "repetition_penalty": 1.0,
66
+ "return_dict": true,
67
+ "return_dict_in_generate": false,
68
+ "scale_embedding": false,
69
+ "sep_token_id": null,
70
+ "suppress_tokens": null,
71
+ "task_specific_params": null,
72
+ "temperature": 1.0,
73
+ "tf_legacy_loss": false,
74
+ "tie_encoder_decoder": false,
75
+ "tie_word_embeddings": true,
76
+ "tokenizer_class": null,
77
+ "top_k": 50,
78
+ "top_p": 1.0,
79
+ "torch_dtype": null,
80
+ "torchscript": false,
81
+ "typical_p": 1.0,
82
+ "use_bfloat16": false,
83
+ "use_cache": false,
84
+ "use_learned_position_embeddings": true,
85
+ "vocab_size": 50265
86
+ },
87
+ "decoder_start_token_id": 0,
88
+ "encoder": {
89
+ "_attn_implementation_autoset": false,
90
+ "_name_or_path": "",
91
+ "add_cross_attention": false,
92
+ "architectures": null,
93
+ "attention_probs_dropout_prob": 0.0,
94
+ "bad_words_ids": null,
95
+ "begin_suppress_tokens": null,
96
+ "bos_token_id": null,
97
+ "chunk_size_feed_forward": 0,
98
+ "cross_attention_hidden_size": null,
99
+ "decoder_start_token_id": null,
100
+ "diversity_penalty": 0.0,
101
+ "do_sample": false,
102
+ "early_stopping": false,
103
+ "encoder_no_repeat_ngram_size": 0,
104
+ "encoder_stride": 16,
105
+ "eos_token_id": null,
106
+ "exponential_decay_length_penalty": null,
107
+ "finetuning_task": null,
108
+ "forced_bos_token_id": null,
109
+ "forced_eos_token_id": null,
110
+ "hidden_act": "gelu",
111
+ "hidden_dropout_prob": 0.0,
112
+ "hidden_size": 768,
113
+ "id2label": {
114
+ "0": "LABEL_0",
115
+ "1": "LABEL_1"
116
+ },
117
+ "image_size": 384,
118
+ "initializer_range": 0.02,
119
+ "intermediate_size": 3072,
120
+ "is_decoder": false,
121
+ "is_encoder_decoder": false,
122
+ "label2id": {
123
+ "LABEL_0": 0,
124
+ "LABEL_1": 1
125
+ },
126
+ "layer_norm_eps": 1e-12,
127
+ "length_penalty": 1.0,
128
+ "max_length": 20,
129
+ "min_length": 0,
130
+ "model_type": "vit",
131
+ "no_repeat_ngram_size": 0,
132
+ "num_attention_heads": 12,
133
+ "num_beam_groups": 1,
134
+ "num_beams": 1,
135
+ "num_channels": 3,
136
+ "num_hidden_layers": 12,
137
+ "num_return_sequences": 1,
138
+ "output_attentions": false,
139
+ "output_hidden_states": false,
140
+ "output_scores": false,
141
+ "pad_token_id": null,
142
+ "patch_size": 16,
143
+ "prefix": null,
144
+ "problem_type": null,
145
+ "pruned_heads": {},
146
+ "qkv_bias": false,
147
+ "remove_invalid_values": false,
148
+ "repetition_penalty": 1.0,
149
+ "return_dict": true,
150
+ "return_dict_in_generate": false,
151
+ "sep_token_id": null,
152
+ "suppress_tokens": null,
153
+ "task_specific_params": null,
154
+ "temperature": 1.0,
155
+ "tf_legacy_loss": false,
156
+ "tie_encoder_decoder": false,
157
+ "tie_word_embeddings": true,
158
+ "tokenizer_class": null,
159
+ "top_k": 50,
160
+ "top_p": 1.0,
161
+ "torch_dtype": null,
162
+ "torchscript": false,
163
+ "typical_p": 1.0,
164
+ "use_bfloat16": false
165
+ },
166
+ "is_encoder_decoder": true,
167
+ "model_type": "vision-encoder-decoder",
168
+ "pad_token_id": 1,
169
+ "processor_class": "TrOCRProcessor",
170
+ "tie_word_embeddings": false,
171
+ "torch_dtype": "float32",
172
+ "transformers_version": "4.46.3",
173
+ "vocab_size": 50265
174
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 0,
3
+ "decoder_start_token_id": 2,
4
+ "early_stopping": true,
5
+ "eos_token_id": 2,
6
+ "length_penalty": 1.1,
7
+ "max_length": 64,
8
+ "no_repeat_ngram_size": 3,
9
+ "num_beams": 4,
10
+ "pad_token_id": 1,
11
+ "transformers_version": "4.46.3",
12
+ "use_cache": false
13
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60474b94d4aa67289743f45eea521f27f6c02bf71ee689ffd8aad09cf85a634f
3
+ size 1335747032
preprocessor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": true,
5
+ "image_mean": [
6
+ 0.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_processor_type": "ViTImageProcessor",
11
+ "image_std": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "resample": 2,
17
+ "rescale_factor": 0.00392156862745098,
18
+ "size": {
19
+ "height": 384,
20
+ "width": 384
21
+ }
22
+ }
runs/Dec09_11-01-10_e8c588f131b1/events.out.tfevents.1733742109.e8c588f131b1.377.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5b1ad13a11e09b06046bc096742f24dd46a6b7fdf298e9a216d8e10a63a9e8c
3
+ size 29274
runs/Dec09_12-05-48_e8c588f131b1/events.out.tfevents.1733745993.e8c588f131b1.377.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:994922334272df62679a681aae154723c22fd7c26e8434e51ffb578b8a808287
3
+ size 49928
runs/Dec09_12-05-48_e8c588f131b1/events.out.tfevents.1733753882.e8c588f131b1.377.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8aef7d7c63d784c10cccb9cd925dfed233ee48fff482fb59848dc60c47c2c7c9
3
+ size 568
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11cb56a281d2b5b41bfa5ab077a4d6f548f351ca5cc413cd7556b023b1b13a5d
3
+ size 5432