trocr fine-tune, epoch 8, cer=0.016840019811788013
Browse files- config.json +98 -0
- generation_config.json +36 -0
- model.safetensors +3 -0
- processor_config.json +26 -0
- tokenizer.json +0 -0
- tokenizer_config.json +20 -0
config.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VisionEncoderDecoderModel"
|
| 4 |
+
],
|
| 5 |
+
"decoder": {
|
| 6 |
+
"_name_or_path": "",
|
| 7 |
+
"activation_dropout": 0.0,
|
| 8 |
+
"activation_function": "gelu",
|
| 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": 1024,
|
| 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": 2,
|
| 22 |
+
"dropout": 0.1,
|
| 23 |
+
"dtype": "float32",
|
| 24 |
+
"eos_token_id": 2,
|
| 25 |
+
"id2label": {
|
| 26 |
+
"0": "LABEL_0",
|
| 27 |
+
"1": "LABEL_1"
|
| 28 |
+
},
|
| 29 |
+
"init_std": 0.02,
|
| 30 |
+
"is_decoder": true,
|
| 31 |
+
"is_encoder_decoder": false,
|
| 32 |
+
"label2id": {
|
| 33 |
+
"LABEL_0": 0,
|
| 34 |
+
"LABEL_1": 1
|
| 35 |
+
},
|
| 36 |
+
"layernorm_embedding": true,
|
| 37 |
+
"max_position_embeddings": 512,
|
| 38 |
+
"model_type": "trocr",
|
| 39 |
+
"output_attentions": false,
|
| 40 |
+
"output_hidden_states": false,
|
| 41 |
+
"pad_token_id": 1,
|
| 42 |
+
"problem_type": null,
|
| 43 |
+
"return_dict": true,
|
| 44 |
+
"scale_embedding": false,
|
| 45 |
+
"tie_word_embeddings": true,
|
| 46 |
+
"use_cache": false,
|
| 47 |
+
"use_learned_position_embeddings": true,
|
| 48 |
+
"vocab_size": 30000
|
| 49 |
+
},
|
| 50 |
+
"decoder_layerdrop": 0.16239780813448107,
|
| 51 |
+
"decoder_start_token_id": 2,
|
| 52 |
+
"dtype": "float32",
|
| 53 |
+
"encoder": {
|
| 54 |
+
"_name_or_path": "",
|
| 55 |
+
"architectures": null,
|
| 56 |
+
"attention_probs_dropout_prob": 0.0,
|
| 57 |
+
"chunk_size_feed_forward": 0,
|
| 58 |
+
"dtype": "float32",
|
| 59 |
+
"encoder_stride": 16,
|
| 60 |
+
"hidden_act": "gelu",
|
| 61 |
+
"hidden_dropout_prob": 0.0,
|
| 62 |
+
"hidden_size": 1024,
|
| 63 |
+
"id2label": {
|
| 64 |
+
"0": "LABEL_0",
|
| 65 |
+
"1": "LABEL_1"
|
| 66 |
+
},
|
| 67 |
+
"image_size": 384,
|
| 68 |
+
"initializer_range": 0.02,
|
| 69 |
+
"intermediate_size": 4096,
|
| 70 |
+
"is_encoder_decoder": false,
|
| 71 |
+
"label2id": {
|
| 72 |
+
"LABEL_0": 0,
|
| 73 |
+
"LABEL_1": 1
|
| 74 |
+
},
|
| 75 |
+
"layer_norm_eps": 1e-12,
|
| 76 |
+
"model_type": "vit",
|
| 77 |
+
"num_attention_heads": 16,
|
| 78 |
+
"num_channels": 3,
|
| 79 |
+
"num_hidden_layers": 24,
|
| 80 |
+
"output_attentions": false,
|
| 81 |
+
"output_hidden_states": false,
|
| 82 |
+
"patch_size": 16,
|
| 83 |
+
"pooler_act": "tanh",
|
| 84 |
+
"pooler_output_size": 1024,
|
| 85 |
+
"problem_type": null,
|
| 86 |
+
"qkv_bias": false,
|
| 87 |
+
"return_dict": true
|
| 88 |
+
},
|
| 89 |
+
"encoder_layerdrop": 0.16239780813448107,
|
| 90 |
+
"eos_token_id": 3,
|
| 91 |
+
"is_encoder_decoder": true,
|
| 92 |
+
"model_type": "vision-encoder-decoder",
|
| 93 |
+
"pad_token_id": 0,
|
| 94 |
+
"tie_word_embeddings": false,
|
| 95 |
+
"transformers_version": "5.0.0",
|
| 96 |
+
"use_cache": false,
|
| 97 |
+
"vocab_size": 30000
|
| 98 |
+
}
|
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": 2,
|
| 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": 3,
|
| 13 |
+
"epsilon_cutoff": 0.0,
|
| 14 |
+
"eta_cutoff": 0.0,
|
| 15 |
+
"length_penalty": 1.0,
|
| 16 |
+
"max_length": 32,
|
| 17 |
+
"min_length": 0,
|
| 18 |
+
"no_repeat_ngram_size": 0,
|
| 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": 0,
|
| 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.0.0",
|
| 34 |
+
"typical_p": 1.0,
|
| 35 |
+
"use_cache": false
|
| 36 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9addc3d6ef7d29628933d35bbd1cbb7e7da24d346505971bc10791ca12b077af
|
| 3 |
+
size 2149979832
|
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,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": true,
|
| 4 |
+
"cls_token": "[CLS]",
|
| 5 |
+
"do_basic_tokenize": true,
|
| 6 |
+
"do_lower_case": false,
|
| 7 |
+
"full_tokenizer_file": null,
|
| 8 |
+
"is_local": false,
|
| 9 |
+
"mask_token": "[MASK]",
|
| 10 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 11 |
+
"model_specific_special_tokens": {},
|
| 12 |
+
"never_split": null,
|
| 13 |
+
"pad_token": "[PAD]",
|
| 14 |
+
"processor_class": "TrOCRProcessor",
|
| 15 |
+
"sep_token": "[SEP]",
|
| 16 |
+
"strip_accents": null,
|
| 17 |
+
"tokenize_chinese_chars": true,
|
| 18 |
+
"tokenizer_class": "TokenizersBackend",
|
| 19 |
+
"unk_token": "[UNK]"
|
| 20 |
+
}
|