Add 83 files (runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/model.safetensors ...)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- runs/hf-recognizer-mixed-v1-rebalanced/README.md +17 -0
- runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/config.json +122 -0
- runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/generation_config.json +38 -0
- runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/model.safetensors +3 -0
- runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/processor_config.json +30 -0
- runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/tokenizer.json +0 -0
- runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/tokenizer_config.json +22 -0
- runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/trainer_state.json +192 -0
- runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/training_args.bin +3 -0
- runs/hf-recognizer-mixed-v1-rebalanced/final-model/config.json +122 -0
- runs/hf-recognizer-mixed-v1-rebalanced/final-model/generation_config.json +38 -0
- runs/hf-recognizer-mixed-v1-rebalanced/final-model/model.safetensors +3 -0
- runs/hf-recognizer-mixed-v1-rebalanced/final-model/processor_config.json +30 -0
- runs/hf-recognizer-mixed-v1-rebalanced/final-model/tokenizer.json +0 -0
- runs/hf-recognizer-mixed-v1-rebalanced/final-model/tokenizer_config.json +22 -0
- runs/hf-recognizer-mixed-v1-rebalanced/final-model/training_args.bin +3 -0
- runs/hf-recognizer-mixed-v1-rebalanced/hf_recognizer_config.json +16 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/PACKAGE.md +10 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/config.json +122 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/generation_config.json +38 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/model.safetensors +3 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/processor_config.json +30 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/tokenizer.json +0 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/tokenizer_config.json +22 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/training_args.bin +3 -0
- runs/hf-recognizer-mixed-v1-rebalanced/package/model-card.json +36 -0
- runs/hf-recognizer-mixed-v1-rebalanced/training_metrics.json +10 -0
- runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/model.safetensors +3 -0
- runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/processor_config.json +30 -0
- runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/tokenizer.json +0 -0
- runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/tokenizer_config.json +22 -0
- runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/trainer_state.json +129 -0
- runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/training_args.bin +3 -0
- runs/hf-recognizer-mixed-v1/final-model/config.json +122 -0
- runs/hf-recognizer-mixed-v1/final-model/generation_config.json +38 -0
- runs/hf-recognizer-mixed-v1/final-model/model.safetensors +3 -0
- runs/hf-recognizer-mixed-v1/final-model/processor_config.json +30 -0
- runs/hf-recognizer-mixed-v1/final-model/tokenizer.json +0 -0
- runs/hf-recognizer-mixed-v1/final-model/tokenizer_config.json +22 -0
- runs/hf-recognizer-mixed-v1/final-model/training_args.bin +3 -0
- runs/hf-recognizer-mixed-v1/package/PACKAGE.md +10 -0
- runs/hf-recognizer-mixed-v1/package/artifacts/model/config.json +122 -0
- runs/hf-recognizer-mixed-v1/package/artifacts/model/generation_config.json +38 -0
- runs/hf-recognizer-mixed-v1/package/artifacts/model/model.safetensors +3 -0
- runs/hf-recognizer-mixed-v1/package/artifacts/model/processor_config.json +30 -0
- runs/hf-recognizer-mixed-v1/package/artifacts/model/tokenizer.json +0 -0
- runs/hf-recognizer-mixed-v1/package/artifacts/model/tokenizer_config.json +22 -0
- runs/hf-recognizer-mixed-v1/package/artifacts/model/training_args.bin +3 -0
- runs/hf-recognizer-mixed-v1/package/model-card.json +36 -0
- runs/hf-recognizer-mixed-v2-full/README.md +17 -0
runs/hf-recognizer-mixed-v1-rebalanced/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hugging Face Recognizer Training Recipe
|
| 2 |
+
|
| 3 |
+
Base model: `microsoft/trocr-small-printed`
|
| 4 |
+
Train manifest: `data/splits-mixed-v1/train-rebalanced-nep-eng.jsonl` (1700 samples)
|
| 5 |
+
Eval manifest: `data/splits-mixed-v1/eval-with-refs.jsonl` (180 samples)
|
| 6 |
+
|
| 7 |
+
Install the backend dependencies first:
|
| 8 |
+
|
| 9 |
+
```bash
|
| 10 |
+
python -m pip install -e '.[hf-recognizer]'
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
Run in-process:
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
ocrtech train-recognizer --backend hf-vision-encoder-decoder --train-manifest data/splits-mixed-v1/train-rebalanced-nep-eng.jsonl --eval-manifest data/splits-mixed-v1/eval-with-refs.jsonl --out runs/hf-recognizer-mixed-v1-rebalanced --run
|
| 17 |
+
```
|
runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/config.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VisionEncoderDecoderModel"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 0,
|
| 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 |
+
"bos_token_id": 0,
|
| 14 |
+
"chunk_size_feed_forward": 0,
|
| 15 |
+
"classifier_dropout": 0.0,
|
| 16 |
+
"cross_attention_hidden_size": 384,
|
| 17 |
+
"d_model": 256,
|
| 18 |
+
"decoder_attention_heads": 8,
|
| 19 |
+
"decoder_ffn_dim": 1024,
|
| 20 |
+
"decoder_layerdrop": 0.0,
|
| 21 |
+
"decoder_layers": 6,
|
| 22 |
+
"decoder_start_token_id": 2,
|
| 23 |
+
"dropout": 0.1,
|
| 24 |
+
"dtype": "float32",
|
| 25 |
+
"eos_token_id": 2,
|
| 26 |
+
"finetuning_task": null,
|
| 27 |
+
"id2label": {
|
| 28 |
+
"0": "LABEL_0",
|
| 29 |
+
"1": "LABEL_1"
|
| 30 |
+
},
|
| 31 |
+
"init_std": 0.02,
|
| 32 |
+
"is_decoder": true,
|
| 33 |
+
"is_encoder_decoder": false,
|
| 34 |
+
"label2id": {
|
| 35 |
+
"LABEL_0": 0,
|
| 36 |
+
"LABEL_1": 1
|
| 37 |
+
},
|
| 38 |
+
"layernorm_embedding": true,
|
| 39 |
+
"max_position_embeddings": 512,
|
| 40 |
+
"model_type": "trocr",
|
| 41 |
+
"output_attentions": false,
|
| 42 |
+
"output_hidden_states": false,
|
| 43 |
+
"pad_token_id": 1,
|
| 44 |
+
"prefix": null,
|
| 45 |
+
"problem_type": null,
|
| 46 |
+
"pruned_heads": {},
|
| 47 |
+
"return_dict": true,
|
| 48 |
+
"scale_embedding": true,
|
| 49 |
+
"sep_token_id": null,
|
| 50 |
+
"task_specific_params": null,
|
| 51 |
+
"tie_encoder_decoder": false,
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"tokenizer_class": null,
|
| 54 |
+
"torchscript": false,
|
| 55 |
+
"use_bfloat16": false,
|
| 56 |
+
"use_cache": false,
|
| 57 |
+
"use_learned_position_embeddings": true,
|
| 58 |
+
"vocab_size": 64044
|
| 59 |
+
},
|
| 60 |
+
"decoder_start_token_id": 2,
|
| 61 |
+
"dtype": "float32",
|
| 62 |
+
"encoder": {
|
| 63 |
+
"_name_or_path": "",
|
| 64 |
+
"add_cross_attention": false,
|
| 65 |
+
"architectures": null,
|
| 66 |
+
"attention_probs_dropout_prob": 0.0,
|
| 67 |
+
"bos_token_id": null,
|
| 68 |
+
"chunk_size_feed_forward": 0,
|
| 69 |
+
"cross_attention_hidden_size": null,
|
| 70 |
+
"decoder_start_token_id": null,
|
| 71 |
+
"dtype": "float32",
|
| 72 |
+
"encoder_stride": 16,
|
| 73 |
+
"eos_token_id": null,
|
| 74 |
+
"finetuning_task": null,
|
| 75 |
+
"hidden_act": "gelu",
|
| 76 |
+
"hidden_dropout_prob": 0.0,
|
| 77 |
+
"hidden_size": 384,
|
| 78 |
+
"id2label": {
|
| 79 |
+
"0": "LABEL_0",
|
| 80 |
+
"1": "LABEL_1"
|
| 81 |
+
},
|
| 82 |
+
"image_size": 384,
|
| 83 |
+
"initializer_range": 0.02,
|
| 84 |
+
"intermediate_size": 1536,
|
| 85 |
+
"is_decoder": false,
|
| 86 |
+
"is_encoder_decoder": false,
|
| 87 |
+
"label2id": {
|
| 88 |
+
"LABEL_0": 0,
|
| 89 |
+
"LABEL_1": 1
|
| 90 |
+
},
|
| 91 |
+
"layer_norm_eps": 1e-12,
|
| 92 |
+
"model_type": "deit",
|
| 93 |
+
"num_attention_heads": 6,
|
| 94 |
+
"num_channels": 3,
|
| 95 |
+
"num_hidden_layers": 12,
|
| 96 |
+
"output_attentions": false,
|
| 97 |
+
"output_hidden_states": false,
|
| 98 |
+
"pad_token_id": null,
|
| 99 |
+
"patch_size": 16,
|
| 100 |
+
"pooler_act": "tanh",
|
| 101 |
+
"pooler_output_size": 384,
|
| 102 |
+
"prefix": null,
|
| 103 |
+
"problem_type": null,
|
| 104 |
+
"pruned_heads": {},
|
| 105 |
+
"qkv_bias": true,
|
| 106 |
+
"return_dict": true,
|
| 107 |
+
"sep_token_id": null,
|
| 108 |
+
"task_specific_params": null,
|
| 109 |
+
"tie_encoder_decoder": false,
|
| 110 |
+
"tie_word_embeddings": true,
|
| 111 |
+
"tokenizer_class": null,
|
| 112 |
+
"torchscript": false,
|
| 113 |
+
"use_bfloat16": false
|
| 114 |
+
},
|
| 115 |
+
"eos_token_id": 2,
|
| 116 |
+
"is_encoder_decoder": true,
|
| 117 |
+
"model_type": "vision-encoder-decoder",
|
| 118 |
+
"pad_token_id": 1,
|
| 119 |
+
"tie_word_embeddings": false,
|
| 120 |
+
"transformers_version": "5.12.0",
|
| 121 |
+
"use_cache": false
|
| 122 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/generation_config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": false,
|
| 10 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 11 |
+
"encoder_repetition_penalty": 1.0,
|
| 12 |
+
"eos_token_id": [
|
| 13 |
+
2
|
| 14 |
+
],
|
| 15 |
+
"epsilon_cutoff": 0.0,
|
| 16 |
+
"eta_cutoff": 0.0,
|
| 17 |
+
"length_penalty": 1.0,
|
| 18 |
+
"max_length": 128,
|
| 19 |
+
"min_length": 0,
|
| 20 |
+
"no_repeat_ngram_size": 0,
|
| 21 |
+
"num_assistant_tokens": 20,
|
| 22 |
+
"num_assistant_tokens_schedule": "constant",
|
| 23 |
+
"num_beam_groups": 1,
|
| 24 |
+
"num_beams": 1,
|
| 25 |
+
"num_return_sequences": 1,
|
| 26 |
+
"output_scores": false,
|
| 27 |
+
"pad_token_id": 1,
|
| 28 |
+
"remove_invalid_values": false,
|
| 29 |
+
"repetition_penalty": 1.0,
|
| 30 |
+
"return_dict_in_generate": false,
|
| 31 |
+
"target_lookbehind": 10,
|
| 32 |
+
"temperature": 1.0,
|
| 33 |
+
"top_k": 50,
|
| 34 |
+
"top_p": 1.0,
|
| 35 |
+
"transformers_version": "5.12.0",
|
| 36 |
+
"typical_p": 1.0,
|
| 37 |
+
"use_cache": false
|
| 38 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7064fcbeb19bb8428fa2c97cc7c6d3643def25cf15321437126ae5c67f4c9c0b
|
| 3 |
+
size 246430696
|
runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/processor_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"crop_size": {
|
| 4 |
+
"height": 224,
|
| 5 |
+
"width": 224
|
| 6 |
+
},
|
| 7 |
+
"do_center_crop": false,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.5,
|
| 13 |
+
0.5,
|
| 14 |
+
0.5
|
| 15 |
+
],
|
| 16 |
+
"image_processor_type": "DeiTImageProcessor",
|
| 17 |
+
"image_std": [
|
| 18 |
+
0.5,
|
| 19 |
+
0.5,
|
| 20 |
+
0.5
|
| 21 |
+
],
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"height": 384,
|
| 26 |
+
"width": 384
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"processor_class": "TrOCRProcessor"
|
| 30 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/tokenizer_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "pil",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<s>",
|
| 9 |
+
"</s>"
|
| 10 |
+
],
|
| 11 |
+
"is_local": false,
|
| 12 |
+
"local_files_only": false,
|
| 13 |
+
"mask_token": "<mask>",
|
| 14 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 15 |
+
"pad_token": "<pad>",
|
| 16 |
+
"processor_class": "TrOCRProcessor",
|
| 17 |
+
"sep_token": "</s>",
|
| 18 |
+
"sp_model_kwargs": {},
|
| 19 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 20 |
+
"unk_id": 0,
|
| 21 |
+
"unk_token": "<unk>"
|
| 22 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/trainer_state.json
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_global_step": null,
|
| 3 |
+
"best_metric": null,
|
| 4 |
+
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 0.5011764705882353,
|
| 6 |
+
"eval_steps": 500,
|
| 7 |
+
"global_step": 213,
|
| 8 |
+
"is_hyper_param_search": false,
|
| 9 |
+
"is_local_process_zero": true,
|
| 10 |
+
"is_world_process_zero": true,
|
| 11 |
+
"log_history": [
|
| 12 |
+
{
|
| 13 |
+
"epoch": 0.023529411764705882,
|
| 14 |
+
"grad_norm": 45.97473907470703,
|
| 15 |
+
"learning_rate": 4.788732394366197e-05,
|
| 16 |
+
"loss": 10.72406234741211,
|
| 17 |
+
"step": 10
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"epoch": 0.047058823529411764,
|
| 21 |
+
"grad_norm": 26.508514404296875,
|
| 22 |
+
"learning_rate": 4.553990610328639e-05,
|
| 23 |
+
"loss": 7.398578643798828,
|
| 24 |
+
"step": 20
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"epoch": 0.07058823529411765,
|
| 28 |
+
"grad_norm": 25.61277198791504,
|
| 29 |
+
"learning_rate": 4.3192488262910805e-05,
|
| 30 |
+
"loss": 6.21863021850586,
|
| 31 |
+
"step": 30
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 0.09411764705882353,
|
| 35 |
+
"grad_norm": 50.67647171020508,
|
| 36 |
+
"learning_rate": 4.0845070422535214e-05,
|
| 37 |
+
"loss": 5.556427001953125,
|
| 38 |
+
"step": 40
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 0.11764705882352941,
|
| 42 |
+
"grad_norm": 101.74993133544922,
|
| 43 |
+
"learning_rate": 3.8497652582159623e-05,
|
| 44 |
+
"loss": 4.702029800415039,
|
| 45 |
+
"step": 50
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"epoch": 0.1411764705882353,
|
| 49 |
+
"grad_norm": 21.31694221496582,
|
| 50 |
+
"learning_rate": 3.615023474178404e-05,
|
| 51 |
+
"loss": 4.732540893554687,
|
| 52 |
+
"step": 60
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"epoch": 0.16470588235294117,
|
| 56 |
+
"grad_norm": 22.998191833496094,
|
| 57 |
+
"learning_rate": 3.380281690140845e-05,
|
| 58 |
+
"loss": 4.295072555541992,
|
| 59 |
+
"step": 70
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"epoch": 0.18823529411764706,
|
| 63 |
+
"grad_norm": 19.26465606689453,
|
| 64 |
+
"learning_rate": 3.1455399061032865e-05,
|
| 65 |
+
"loss": 3.8775455474853517,
|
| 66 |
+
"step": 80
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"epoch": 0.21176470588235294,
|
| 70 |
+
"grad_norm": 35.51206970214844,
|
| 71 |
+
"learning_rate": 2.9107981220657278e-05,
|
| 72 |
+
"loss": 4.0072776794433596,
|
| 73 |
+
"step": 90
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"epoch": 0.23529411764705882,
|
| 77 |
+
"grad_norm": 64.04591369628906,
|
| 78 |
+
"learning_rate": 2.676056338028169e-05,
|
| 79 |
+
"loss": 3.635472869873047,
|
| 80 |
+
"step": 100
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"epoch": 0.25882352941176473,
|
| 84 |
+
"grad_norm": 20.22920799255371,
|
| 85 |
+
"learning_rate": 2.4413145539906104e-05,
|
| 86 |
+
"loss": 3.686369705200195,
|
| 87 |
+
"step": 110
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"epoch": 0.2823529411764706,
|
| 91 |
+
"grad_norm": 13.549466133117676,
|
| 92 |
+
"learning_rate": 2.2065727699530516e-05,
|
| 93 |
+
"loss": 3.223345947265625,
|
| 94 |
+
"step": 120
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"epoch": 0.3058823529411765,
|
| 98 |
+
"grad_norm": 42.418800354003906,
|
| 99 |
+
"learning_rate": 1.971830985915493e-05,
|
| 100 |
+
"loss": 3.3701553344726562,
|
| 101 |
+
"step": 130
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"epoch": 0.32941176470588235,
|
| 105 |
+
"grad_norm": 15.13133430480957,
|
| 106 |
+
"learning_rate": 1.7370892018779345e-05,
|
| 107 |
+
"loss": 3.481338882446289,
|
| 108 |
+
"step": 140
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"epoch": 0.35294117647058826,
|
| 112 |
+
"grad_norm": 68.87443542480469,
|
| 113 |
+
"learning_rate": 1.5023474178403756e-05,
|
| 114 |
+
"loss": 3.390645217895508,
|
| 115 |
+
"step": 150
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"epoch": 0.3764705882352941,
|
| 119 |
+
"grad_norm": 17.59540367126465,
|
| 120 |
+
"learning_rate": 1.267605633802817e-05,
|
| 121 |
+
"loss": 2.863226127624512,
|
| 122 |
+
"step": 160
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"epoch": 0.4,
|
| 126 |
+
"grad_norm": 54.68927764892578,
|
| 127 |
+
"learning_rate": 1.0328638497652584e-05,
|
| 128 |
+
"loss": 3.2845695495605467,
|
| 129 |
+
"step": 170
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"epoch": 0.4235294117647059,
|
| 133 |
+
"grad_norm": 17.10543441772461,
|
| 134 |
+
"learning_rate": 7.981220657276996e-06,
|
| 135 |
+
"loss": 3.4021926879882813,
|
| 136 |
+
"step": 180
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"epoch": 0.4470588235294118,
|
| 140 |
+
"grad_norm": 31.83983039855957,
|
| 141 |
+
"learning_rate": 5.6338028169014084e-06,
|
| 142 |
+
"loss": 2.953938293457031,
|
| 143 |
+
"step": 190
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"epoch": 0.47058823529411764,
|
| 147 |
+
"grad_norm": 30.184526443481445,
|
| 148 |
+
"learning_rate": 3.286384976525822e-06,
|
| 149 |
+
"loss": 3.0311773300170897,
|
| 150 |
+
"step": 200
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"epoch": 0.49411764705882355,
|
| 154 |
+
"grad_norm": 23.180566787719727,
|
| 155 |
+
"learning_rate": 9.389671361502348e-07,
|
| 156 |
+
"loss": 3.1766719818115234,
|
| 157 |
+
"step": 210
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"epoch": 0.5011764705882353,
|
| 161 |
+
"eval_cer": 0.5983964991975725,
|
| 162 |
+
"eval_exact_line_accuracy": 0.2611111111111111,
|
| 163 |
+
"eval_loss": 2.24769926071167,
|
| 164 |
+
"eval_runtime": 60.0557,
|
| 165 |
+
"eval_samples_per_second": 2.997,
|
| 166 |
+
"eval_steps_per_second": 0.749,
|
| 167 |
+
"eval_wer": 0.825085223418557,
|
| 168 |
+
"step": 213
|
| 169 |
+
}
|
| 170 |
+
],
|
| 171 |
+
"logging_steps": 10,
|
| 172 |
+
"max_steps": 213,
|
| 173 |
+
"num_input_tokens_seen": 0,
|
| 174 |
+
"num_train_epochs": 1,
|
| 175 |
+
"save_steps": 500,
|
| 176 |
+
"stateful_callbacks": {
|
| 177 |
+
"TrainerControl": {
|
| 178 |
+
"args": {
|
| 179 |
+
"should_epoch_stop": false,
|
| 180 |
+
"should_evaluate": false,
|
| 181 |
+
"should_log": false,
|
| 182 |
+
"should_save": true,
|
| 183 |
+
"should_training_stop": true
|
| 184 |
+
},
|
| 185 |
+
"attributes": {}
|
| 186 |
+
}
|
| 187 |
+
},
|
| 188 |
+
"total_flos": 1.0192023368132198e+17,
|
| 189 |
+
"train_batch_size": 4,
|
| 190 |
+
"trial_name": null,
|
| 191 |
+
"trial_params": null
|
| 192 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/checkpoints/checkpoint-213/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:911b0b48014da0ae90305da29da4b39029f1bd8b28456ad26b40e0b59326173e
|
| 3 |
+
size 5329
|
runs/hf-recognizer-mixed-v1-rebalanced/final-model/config.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VisionEncoderDecoderModel"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 0,
|
| 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 |
+
"bos_token_id": 0,
|
| 14 |
+
"chunk_size_feed_forward": 0,
|
| 15 |
+
"classifier_dropout": 0.0,
|
| 16 |
+
"cross_attention_hidden_size": 384,
|
| 17 |
+
"d_model": 256,
|
| 18 |
+
"decoder_attention_heads": 8,
|
| 19 |
+
"decoder_ffn_dim": 1024,
|
| 20 |
+
"decoder_layerdrop": 0.0,
|
| 21 |
+
"decoder_layers": 6,
|
| 22 |
+
"decoder_start_token_id": 2,
|
| 23 |
+
"dropout": 0.1,
|
| 24 |
+
"dtype": "float32",
|
| 25 |
+
"eos_token_id": 2,
|
| 26 |
+
"finetuning_task": null,
|
| 27 |
+
"id2label": {
|
| 28 |
+
"0": "LABEL_0",
|
| 29 |
+
"1": "LABEL_1"
|
| 30 |
+
},
|
| 31 |
+
"init_std": 0.02,
|
| 32 |
+
"is_decoder": true,
|
| 33 |
+
"is_encoder_decoder": false,
|
| 34 |
+
"label2id": {
|
| 35 |
+
"LABEL_0": 0,
|
| 36 |
+
"LABEL_1": 1
|
| 37 |
+
},
|
| 38 |
+
"layernorm_embedding": true,
|
| 39 |
+
"max_position_embeddings": 512,
|
| 40 |
+
"model_type": "trocr",
|
| 41 |
+
"output_attentions": false,
|
| 42 |
+
"output_hidden_states": false,
|
| 43 |
+
"pad_token_id": 1,
|
| 44 |
+
"prefix": null,
|
| 45 |
+
"problem_type": null,
|
| 46 |
+
"pruned_heads": {},
|
| 47 |
+
"return_dict": true,
|
| 48 |
+
"scale_embedding": true,
|
| 49 |
+
"sep_token_id": null,
|
| 50 |
+
"task_specific_params": null,
|
| 51 |
+
"tie_encoder_decoder": false,
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"tokenizer_class": null,
|
| 54 |
+
"torchscript": false,
|
| 55 |
+
"use_bfloat16": false,
|
| 56 |
+
"use_cache": false,
|
| 57 |
+
"use_learned_position_embeddings": true,
|
| 58 |
+
"vocab_size": 64044
|
| 59 |
+
},
|
| 60 |
+
"decoder_start_token_id": 2,
|
| 61 |
+
"dtype": "float32",
|
| 62 |
+
"encoder": {
|
| 63 |
+
"_name_or_path": "",
|
| 64 |
+
"add_cross_attention": false,
|
| 65 |
+
"architectures": null,
|
| 66 |
+
"attention_probs_dropout_prob": 0.0,
|
| 67 |
+
"bos_token_id": null,
|
| 68 |
+
"chunk_size_feed_forward": 0,
|
| 69 |
+
"cross_attention_hidden_size": null,
|
| 70 |
+
"decoder_start_token_id": null,
|
| 71 |
+
"dtype": "float32",
|
| 72 |
+
"encoder_stride": 16,
|
| 73 |
+
"eos_token_id": null,
|
| 74 |
+
"finetuning_task": null,
|
| 75 |
+
"hidden_act": "gelu",
|
| 76 |
+
"hidden_dropout_prob": 0.0,
|
| 77 |
+
"hidden_size": 384,
|
| 78 |
+
"id2label": {
|
| 79 |
+
"0": "LABEL_0",
|
| 80 |
+
"1": "LABEL_1"
|
| 81 |
+
},
|
| 82 |
+
"image_size": 384,
|
| 83 |
+
"initializer_range": 0.02,
|
| 84 |
+
"intermediate_size": 1536,
|
| 85 |
+
"is_decoder": false,
|
| 86 |
+
"is_encoder_decoder": false,
|
| 87 |
+
"label2id": {
|
| 88 |
+
"LABEL_0": 0,
|
| 89 |
+
"LABEL_1": 1
|
| 90 |
+
},
|
| 91 |
+
"layer_norm_eps": 1e-12,
|
| 92 |
+
"model_type": "deit",
|
| 93 |
+
"num_attention_heads": 6,
|
| 94 |
+
"num_channels": 3,
|
| 95 |
+
"num_hidden_layers": 12,
|
| 96 |
+
"output_attentions": false,
|
| 97 |
+
"output_hidden_states": false,
|
| 98 |
+
"pad_token_id": null,
|
| 99 |
+
"patch_size": 16,
|
| 100 |
+
"pooler_act": "tanh",
|
| 101 |
+
"pooler_output_size": 384,
|
| 102 |
+
"prefix": null,
|
| 103 |
+
"problem_type": null,
|
| 104 |
+
"pruned_heads": {},
|
| 105 |
+
"qkv_bias": true,
|
| 106 |
+
"return_dict": true,
|
| 107 |
+
"sep_token_id": null,
|
| 108 |
+
"task_specific_params": null,
|
| 109 |
+
"tie_encoder_decoder": false,
|
| 110 |
+
"tie_word_embeddings": true,
|
| 111 |
+
"tokenizer_class": null,
|
| 112 |
+
"torchscript": false,
|
| 113 |
+
"use_bfloat16": false
|
| 114 |
+
},
|
| 115 |
+
"eos_token_id": 2,
|
| 116 |
+
"is_encoder_decoder": true,
|
| 117 |
+
"model_type": "vision-encoder-decoder",
|
| 118 |
+
"pad_token_id": 1,
|
| 119 |
+
"tie_word_embeddings": false,
|
| 120 |
+
"transformers_version": "5.12.0",
|
| 121 |
+
"use_cache": false
|
| 122 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/final-model/generation_config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": false,
|
| 10 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 11 |
+
"encoder_repetition_penalty": 1.0,
|
| 12 |
+
"eos_token_id": [
|
| 13 |
+
2
|
| 14 |
+
],
|
| 15 |
+
"epsilon_cutoff": 0.0,
|
| 16 |
+
"eta_cutoff": 0.0,
|
| 17 |
+
"length_penalty": 1.0,
|
| 18 |
+
"max_length": 128,
|
| 19 |
+
"min_length": 0,
|
| 20 |
+
"no_repeat_ngram_size": 0,
|
| 21 |
+
"num_assistant_tokens": 20,
|
| 22 |
+
"num_assistant_tokens_schedule": "constant",
|
| 23 |
+
"num_beam_groups": 1,
|
| 24 |
+
"num_beams": 1,
|
| 25 |
+
"num_return_sequences": 1,
|
| 26 |
+
"output_scores": false,
|
| 27 |
+
"pad_token_id": 1,
|
| 28 |
+
"remove_invalid_values": false,
|
| 29 |
+
"repetition_penalty": 1.0,
|
| 30 |
+
"return_dict_in_generate": false,
|
| 31 |
+
"target_lookbehind": 10,
|
| 32 |
+
"temperature": 1.0,
|
| 33 |
+
"top_k": 50,
|
| 34 |
+
"top_p": 1.0,
|
| 35 |
+
"transformers_version": "5.12.0",
|
| 36 |
+
"typical_p": 1.0,
|
| 37 |
+
"use_cache": false
|
| 38 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/final-model/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7064fcbeb19bb8428fa2c97cc7c6d3643def25cf15321437126ae5c67f4c9c0b
|
| 3 |
+
size 246430696
|
runs/hf-recognizer-mixed-v1-rebalanced/final-model/processor_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"crop_size": {
|
| 4 |
+
"height": 224,
|
| 5 |
+
"width": 224
|
| 6 |
+
},
|
| 7 |
+
"do_center_crop": false,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.5,
|
| 13 |
+
0.5,
|
| 14 |
+
0.5
|
| 15 |
+
],
|
| 16 |
+
"image_processor_type": "DeiTImageProcessor",
|
| 17 |
+
"image_std": [
|
| 18 |
+
0.5,
|
| 19 |
+
0.5,
|
| 20 |
+
0.5
|
| 21 |
+
],
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"height": 384,
|
| 26 |
+
"width": 384
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"processor_class": "TrOCRProcessor"
|
| 30 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/final-model/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/hf-recognizer-mixed-v1-rebalanced/final-model/tokenizer_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "pil",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<s>",
|
| 9 |
+
"</s>"
|
| 10 |
+
],
|
| 11 |
+
"is_local": false,
|
| 12 |
+
"local_files_only": false,
|
| 13 |
+
"mask_token": "<mask>",
|
| 14 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 15 |
+
"pad_token": "<pad>",
|
| 16 |
+
"processor_class": "TrOCRProcessor",
|
| 17 |
+
"sep_token": "</s>",
|
| 18 |
+
"sp_model_kwargs": {},
|
| 19 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 20 |
+
"unk_id": 0,
|
| 21 |
+
"unk_token": "<unk>"
|
| 22 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/final-model/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:911b0b48014da0ae90305da29da4b39029f1bd8b28456ad26b40e0b59326173e
|
| 3 |
+
size 5329
|
runs/hf-recognizer-mixed-v1-rebalanced/hf_recognizer_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"train_manifest": "data/splits-mixed-v1/train-rebalanced-nep-eng.jsonl",
|
| 3 |
+
"eval_manifest": "data/splits-mixed-v1/eval-with-refs.jsonl",
|
| 4 |
+
"output_dir": "runs/hf-recognizer-mixed-v1-rebalanced",
|
| 5 |
+
"base_model": "microsoft/trocr-small-printed",
|
| 6 |
+
"max_target_length": 128,
|
| 7 |
+
"per_device_train_batch_size": 4,
|
| 8 |
+
"per_device_eval_batch_size": 4,
|
| 9 |
+
"learning_rate": 5e-05,
|
| 10 |
+
"num_train_epochs": 0.5,
|
| 11 |
+
"warmup_steps": 0,
|
| 12 |
+
"logging_steps": 10,
|
| 13 |
+
"save_total_limit": 2,
|
| 14 |
+
"predict_with_generate": true,
|
| 15 |
+
"generation_max_length": 128
|
| 16 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/package/PACKAGE.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Packaged Hugging Face OCR Candidate
|
| 2 |
+
|
| 3 |
+
Model card: `runs/hf-recognizer-mixed-v1-rebalanced/package/model-card.json`
|
| 4 |
+
Artifacts: `runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model`
|
| 5 |
+
|
| 6 |
+
Audit before benchmarking:
|
| 7 |
+
|
| 8 |
+
```bash
|
| 9 |
+
ocrtech audit-model runs/hf-recognizer-mixed-v1-rebalanced/package/model-card.json
|
| 10 |
+
```
|
runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/config.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VisionEncoderDecoderModel"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 0,
|
| 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 |
+
"bos_token_id": 0,
|
| 14 |
+
"chunk_size_feed_forward": 0,
|
| 15 |
+
"classifier_dropout": 0.0,
|
| 16 |
+
"cross_attention_hidden_size": 384,
|
| 17 |
+
"d_model": 256,
|
| 18 |
+
"decoder_attention_heads": 8,
|
| 19 |
+
"decoder_ffn_dim": 1024,
|
| 20 |
+
"decoder_layerdrop": 0.0,
|
| 21 |
+
"decoder_layers": 6,
|
| 22 |
+
"decoder_start_token_id": 2,
|
| 23 |
+
"dropout": 0.1,
|
| 24 |
+
"dtype": "float32",
|
| 25 |
+
"eos_token_id": 2,
|
| 26 |
+
"finetuning_task": null,
|
| 27 |
+
"id2label": {
|
| 28 |
+
"0": "LABEL_0",
|
| 29 |
+
"1": "LABEL_1"
|
| 30 |
+
},
|
| 31 |
+
"init_std": 0.02,
|
| 32 |
+
"is_decoder": true,
|
| 33 |
+
"is_encoder_decoder": false,
|
| 34 |
+
"label2id": {
|
| 35 |
+
"LABEL_0": 0,
|
| 36 |
+
"LABEL_1": 1
|
| 37 |
+
},
|
| 38 |
+
"layernorm_embedding": true,
|
| 39 |
+
"max_position_embeddings": 512,
|
| 40 |
+
"model_type": "trocr",
|
| 41 |
+
"output_attentions": false,
|
| 42 |
+
"output_hidden_states": false,
|
| 43 |
+
"pad_token_id": 1,
|
| 44 |
+
"prefix": null,
|
| 45 |
+
"problem_type": null,
|
| 46 |
+
"pruned_heads": {},
|
| 47 |
+
"return_dict": true,
|
| 48 |
+
"scale_embedding": true,
|
| 49 |
+
"sep_token_id": null,
|
| 50 |
+
"task_specific_params": null,
|
| 51 |
+
"tie_encoder_decoder": false,
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"tokenizer_class": null,
|
| 54 |
+
"torchscript": false,
|
| 55 |
+
"use_bfloat16": false,
|
| 56 |
+
"use_cache": false,
|
| 57 |
+
"use_learned_position_embeddings": true,
|
| 58 |
+
"vocab_size": 64044
|
| 59 |
+
},
|
| 60 |
+
"decoder_start_token_id": 2,
|
| 61 |
+
"dtype": "float32",
|
| 62 |
+
"encoder": {
|
| 63 |
+
"_name_or_path": "",
|
| 64 |
+
"add_cross_attention": false,
|
| 65 |
+
"architectures": null,
|
| 66 |
+
"attention_probs_dropout_prob": 0.0,
|
| 67 |
+
"bos_token_id": null,
|
| 68 |
+
"chunk_size_feed_forward": 0,
|
| 69 |
+
"cross_attention_hidden_size": null,
|
| 70 |
+
"decoder_start_token_id": null,
|
| 71 |
+
"dtype": "float32",
|
| 72 |
+
"encoder_stride": 16,
|
| 73 |
+
"eos_token_id": null,
|
| 74 |
+
"finetuning_task": null,
|
| 75 |
+
"hidden_act": "gelu",
|
| 76 |
+
"hidden_dropout_prob": 0.0,
|
| 77 |
+
"hidden_size": 384,
|
| 78 |
+
"id2label": {
|
| 79 |
+
"0": "LABEL_0",
|
| 80 |
+
"1": "LABEL_1"
|
| 81 |
+
},
|
| 82 |
+
"image_size": 384,
|
| 83 |
+
"initializer_range": 0.02,
|
| 84 |
+
"intermediate_size": 1536,
|
| 85 |
+
"is_decoder": false,
|
| 86 |
+
"is_encoder_decoder": false,
|
| 87 |
+
"label2id": {
|
| 88 |
+
"LABEL_0": 0,
|
| 89 |
+
"LABEL_1": 1
|
| 90 |
+
},
|
| 91 |
+
"layer_norm_eps": 1e-12,
|
| 92 |
+
"model_type": "deit",
|
| 93 |
+
"num_attention_heads": 6,
|
| 94 |
+
"num_channels": 3,
|
| 95 |
+
"num_hidden_layers": 12,
|
| 96 |
+
"output_attentions": false,
|
| 97 |
+
"output_hidden_states": false,
|
| 98 |
+
"pad_token_id": null,
|
| 99 |
+
"patch_size": 16,
|
| 100 |
+
"pooler_act": "tanh",
|
| 101 |
+
"pooler_output_size": 384,
|
| 102 |
+
"prefix": null,
|
| 103 |
+
"problem_type": null,
|
| 104 |
+
"pruned_heads": {},
|
| 105 |
+
"qkv_bias": true,
|
| 106 |
+
"return_dict": true,
|
| 107 |
+
"sep_token_id": null,
|
| 108 |
+
"task_specific_params": null,
|
| 109 |
+
"tie_encoder_decoder": false,
|
| 110 |
+
"tie_word_embeddings": true,
|
| 111 |
+
"tokenizer_class": null,
|
| 112 |
+
"torchscript": false,
|
| 113 |
+
"use_bfloat16": false
|
| 114 |
+
},
|
| 115 |
+
"eos_token_id": 2,
|
| 116 |
+
"is_encoder_decoder": true,
|
| 117 |
+
"model_type": "vision-encoder-decoder",
|
| 118 |
+
"pad_token_id": 1,
|
| 119 |
+
"tie_word_embeddings": false,
|
| 120 |
+
"transformers_version": "5.12.0",
|
| 121 |
+
"use_cache": false
|
| 122 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/generation_config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": false,
|
| 10 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 11 |
+
"encoder_repetition_penalty": 1.0,
|
| 12 |
+
"eos_token_id": [
|
| 13 |
+
2
|
| 14 |
+
],
|
| 15 |
+
"epsilon_cutoff": 0.0,
|
| 16 |
+
"eta_cutoff": 0.0,
|
| 17 |
+
"length_penalty": 1.0,
|
| 18 |
+
"max_length": 128,
|
| 19 |
+
"min_length": 0,
|
| 20 |
+
"no_repeat_ngram_size": 0,
|
| 21 |
+
"num_assistant_tokens": 20,
|
| 22 |
+
"num_assistant_tokens_schedule": "constant",
|
| 23 |
+
"num_beam_groups": 1,
|
| 24 |
+
"num_beams": 1,
|
| 25 |
+
"num_return_sequences": 1,
|
| 26 |
+
"output_scores": false,
|
| 27 |
+
"pad_token_id": 1,
|
| 28 |
+
"remove_invalid_values": false,
|
| 29 |
+
"repetition_penalty": 1.0,
|
| 30 |
+
"return_dict_in_generate": false,
|
| 31 |
+
"target_lookbehind": 10,
|
| 32 |
+
"temperature": 1.0,
|
| 33 |
+
"top_k": 50,
|
| 34 |
+
"top_p": 1.0,
|
| 35 |
+
"transformers_version": "5.12.0",
|
| 36 |
+
"typical_p": 1.0,
|
| 37 |
+
"use_cache": false
|
| 38 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7064fcbeb19bb8428fa2c97cc7c6d3643def25cf15321437126ae5c67f4c9c0b
|
| 3 |
+
size 246430696
|
runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/processor_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"crop_size": {
|
| 4 |
+
"height": 224,
|
| 5 |
+
"width": 224
|
| 6 |
+
},
|
| 7 |
+
"do_center_crop": false,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.5,
|
| 13 |
+
0.5,
|
| 14 |
+
0.5
|
| 15 |
+
],
|
| 16 |
+
"image_processor_type": "DeiTImageProcessor",
|
| 17 |
+
"image_std": [
|
| 18 |
+
0.5,
|
| 19 |
+
0.5,
|
| 20 |
+
0.5
|
| 21 |
+
],
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"height": 384,
|
| 26 |
+
"width": 384
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"processor_class": "TrOCRProcessor"
|
| 30 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/tokenizer_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "pil",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<s>",
|
| 9 |
+
"</s>"
|
| 10 |
+
],
|
| 11 |
+
"is_local": false,
|
| 12 |
+
"local_files_only": false,
|
| 13 |
+
"mask_token": "<mask>",
|
| 14 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 15 |
+
"pad_token": "<pad>",
|
| 16 |
+
"processor_class": "TrOCRProcessor",
|
| 17 |
+
"sep_token": "</s>",
|
| 18 |
+
"sp_model_kwargs": {},
|
| 19 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 20 |
+
"unk_id": 0,
|
| 21 |
+
"unk_token": "<unk>"
|
| 22 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/package/artifacts/model/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:911b0b48014da0ae90305da29da4b39029f1bd8b28456ad26b40e0b59326173e
|
| 3 |
+
size 5329
|
runs/hf-recognizer-mixed-v1-rebalanced/package/model-card.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_id": "ocrtech-hf-mixed-v1-rebalanced",
|
| 3 |
+
"backend": "hf_vision_encoder_decoder",
|
| 4 |
+
"base_model": "microsoft/trocr-small-printed",
|
| 5 |
+
"created_at_utc": "2026-06-14T02:18:39.082049+00:00",
|
| 6 |
+
"artifacts": [
|
| 7 |
+
{
|
| 8 |
+
"path": "artifacts/model",
|
| 9 |
+
"required": true,
|
| 10 |
+
"sha256": null,
|
| 11 |
+
"kind": "directory"
|
| 12 |
+
}
|
| 13 |
+
],
|
| 14 |
+
"backend_kwargs": {
|
| 15 |
+
"model_dir": "artifacts/model",
|
| 16 |
+
"processor_dir": "artifacts/model",
|
| 17 |
+
"max_new_tokens": 128
|
| 18 |
+
},
|
| 19 |
+
"provenance": {
|
| 20 |
+
"train_manifest": {
|
| 21 |
+
"path": "data/splits-mixed-v1/train-rebalanced-nep-eng.jsonl",
|
| 22 |
+
"sha256": "86325bc94e5f707329e8735c68afee27d32f7b3ac6186386325f46dc296184c6"
|
| 23 |
+
},
|
| 24 |
+
"eval_manifest": {
|
| 25 |
+
"path": "data/splits-mixed-v1/eval-with-refs.jsonl",
|
| 26 |
+
"sha256": "314c11e25aa6caccb2a801a6c5a6a3f7222eeb59ae76e77f12d6dd72ff4a90ae"
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"metrics": {
|
| 30 |
+
"report": {
|
| 31 |
+
"path": "runs/hf-recognizer-mixed-v1-rebalanced/training_metrics.json",
|
| 32 |
+
"sha256": "4bbc88dcabdf70b34e157d3c1f4ac5e8c9f779e860ebae81b97484f81b08d3ac"
|
| 33 |
+
}
|
| 34 |
+
},
|
| 35 |
+
"notes": null
|
| 36 |
+
}
|
runs/hf-recognizer-mixed-v1-rebalanced/training_metrics.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"eval_loss": 2.24769926071167,
|
| 3 |
+
"eval_cer": 0.5983964991975725,
|
| 4 |
+
"eval_wer": 0.825085223418557,
|
| 5 |
+
"eval_exact_line_accuracy": 0.2611111111111111,
|
| 6 |
+
"eval_runtime": 55.6962,
|
| 7 |
+
"eval_samples_per_second": 3.232,
|
| 8 |
+
"eval_steps_per_second": 0.808,
|
| 9 |
+
"epoch": 0.5011764705882353
|
| 10 |
+
}
|
runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae0ddf467abbc87b81bf3c2f458190913d9e6639e78f59a4798786bc4eb4cdf7
|
| 3 |
+
size 246430696
|
runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/processor_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"crop_size": {
|
| 4 |
+
"height": 224,
|
| 5 |
+
"width": 224
|
| 6 |
+
},
|
| 7 |
+
"do_center_crop": false,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.5,
|
| 13 |
+
0.5,
|
| 14 |
+
0.5
|
| 15 |
+
],
|
| 16 |
+
"image_processor_type": "DeiTImageProcessor",
|
| 17 |
+
"image_std": [
|
| 18 |
+
0.5,
|
| 19 |
+
0.5,
|
| 20 |
+
0.5
|
| 21 |
+
],
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"height": 384,
|
| 26 |
+
"width": 384
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"processor_class": "TrOCRProcessor"
|
| 30 |
+
}
|
runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/tokenizer_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "pil",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<s>",
|
| 9 |
+
"</s>"
|
| 10 |
+
],
|
| 11 |
+
"is_local": false,
|
| 12 |
+
"local_files_only": false,
|
| 13 |
+
"mask_token": "<mask>",
|
| 14 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 15 |
+
"pad_token": "<pad>",
|
| 16 |
+
"processor_class": "TrOCRProcessor",
|
| 17 |
+
"sep_token": "</s>",
|
| 18 |
+
"sp_model_kwargs": {},
|
| 19 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 20 |
+
"unk_id": 0,
|
| 21 |
+
"unk_token": "<unk>"
|
| 22 |
+
}
|
runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/trainer_state.json
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_global_step": null,
|
| 3 |
+
"best_metric": null,
|
| 4 |
+
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 0.5019607843137255,
|
| 6 |
+
"eval_steps": 500,
|
| 7 |
+
"global_step": 128,
|
| 8 |
+
"is_hyper_param_search": false,
|
| 9 |
+
"is_local_process_zero": true,
|
| 10 |
+
"is_world_process_zero": true,
|
| 11 |
+
"log_history": [
|
| 12 |
+
{
|
| 13 |
+
"epoch": 0.0392156862745098,
|
| 14 |
+
"grad_norm": 27.88178825378418,
|
| 15 |
+
"learning_rate": 4.6484375e-05,
|
| 16 |
+
"loss": 9.583903503417968,
|
| 17 |
+
"step": 10
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"epoch": 0.0784313725490196,
|
| 21 |
+
"grad_norm": 67.16509246826172,
|
| 22 |
+
"learning_rate": 4.2578125e-05,
|
| 23 |
+
"loss": 5.5034034729003904,
|
| 24 |
+
"step": 20
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"epoch": 0.11764705882352941,
|
| 28 |
+
"grad_norm": 77.37808990478516,
|
| 29 |
+
"learning_rate": 3.8671875e-05,
|
| 30 |
+
"loss": 3.263815689086914,
|
| 31 |
+
"step": 30
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 0.1568627450980392,
|
| 35 |
+
"grad_norm": 34.84569549560547,
|
| 36 |
+
"learning_rate": 3.4765625e-05,
|
| 37 |
+
"loss": 4.438254165649414,
|
| 38 |
+
"step": 40
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 0.19607843137254902,
|
| 42 |
+
"grad_norm": 169.0543212890625,
|
| 43 |
+
"learning_rate": 3.0859375e-05,
|
| 44 |
+
"loss": 3.9115428924560547,
|
| 45 |
+
"step": 50
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"epoch": 0.23529411764705882,
|
| 49 |
+
"grad_norm": 111.22168731689453,
|
| 50 |
+
"learning_rate": 2.6953125000000003e-05,
|
| 51 |
+
"loss": 3.912871170043945,
|
| 52 |
+
"step": 60
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"epoch": 0.27450980392156865,
|
| 56 |
+
"grad_norm": 51.50699996948242,
|
| 57 |
+
"learning_rate": 2.3046875e-05,
|
| 58 |
+
"loss": 3.8077743530273436,
|
| 59 |
+
"step": 70
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"epoch": 0.3137254901960784,
|
| 63 |
+
"grad_norm": 93.33935546875,
|
| 64 |
+
"learning_rate": 1.9140625e-05,
|
| 65 |
+
"loss": 3.9427940368652346,
|
| 66 |
+
"step": 80
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"epoch": 0.35294117647058826,
|
| 70 |
+
"grad_norm": 41.14353942871094,
|
| 71 |
+
"learning_rate": 1.5234375000000001e-05,
|
| 72 |
+
"loss": 3.039878273010254,
|
| 73 |
+
"step": 90
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"epoch": 0.39215686274509803,
|
| 77 |
+
"grad_norm": 113.24919891357422,
|
| 78 |
+
"learning_rate": 1.1328125000000001e-05,
|
| 79 |
+
"loss": 2.4481475830078123,
|
| 80 |
+
"step": 100
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"epoch": 0.43137254901960786,
|
| 84 |
+
"grad_norm": 230.97125244140625,
|
| 85 |
+
"learning_rate": 7.421875e-06,
|
| 86 |
+
"loss": 4.003024673461914,
|
| 87 |
+
"step": 110
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"epoch": 0.47058823529411764,
|
| 91 |
+
"grad_norm": 99.58470916748047,
|
| 92 |
+
"learning_rate": 3.5156250000000003e-06,
|
| 93 |
+
"loss": 2.606578063964844,
|
| 94 |
+
"step": 120
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"epoch": 0.5019607843137255,
|
| 98 |
+
"eval_cer": 0.9851591583632616,
|
| 99 |
+
"eval_exact_line_accuracy": 0.2833333333333333,
|
| 100 |
+
"eval_loss": 2.3953492641448975,
|
| 101 |
+
"eval_runtime": 68.0282,
|
| 102 |
+
"eval_samples_per_second": 2.646,
|
| 103 |
+
"eval_steps_per_second": 0.661,
|
| 104 |
+
"eval_wer": 2.8664177335010668,
|
| 105 |
+
"step": 128
|
| 106 |
+
}
|
| 107 |
+
],
|
| 108 |
+
"logging_steps": 10,
|
| 109 |
+
"max_steps": 128,
|
| 110 |
+
"num_input_tokens_seen": 0,
|
| 111 |
+
"num_train_epochs": 1,
|
| 112 |
+
"save_steps": 500,
|
| 113 |
+
"stateful_callbacks": {
|
| 114 |
+
"TrainerControl": {
|
| 115 |
+
"args": {
|
| 116 |
+
"should_epoch_stop": false,
|
| 117 |
+
"should_evaluate": false,
|
| 118 |
+
"should_log": false,
|
| 119 |
+
"should_save": true,
|
| 120 |
+
"should_training_stop": true
|
| 121 |
+
},
|
| 122 |
+
"attributes": {}
|
| 123 |
+
}
|
| 124 |
+
},
|
| 125 |
+
"total_flos": 6.12478399587287e+16,
|
| 126 |
+
"train_batch_size": 4,
|
| 127 |
+
"trial_name": null,
|
| 128 |
+
"trial_params": null
|
| 129 |
+
}
|
runs/hf-recognizer-mixed-v1/checkpoints/checkpoint-128/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a30c2c87d0fc2adc38a365055a2a496e9a46faab91eba78a269d69e9d682c0f0
|
| 3 |
+
size 5329
|
runs/hf-recognizer-mixed-v1/final-model/config.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VisionEncoderDecoderModel"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 0,
|
| 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 |
+
"bos_token_id": 0,
|
| 14 |
+
"chunk_size_feed_forward": 0,
|
| 15 |
+
"classifier_dropout": 0.0,
|
| 16 |
+
"cross_attention_hidden_size": 384,
|
| 17 |
+
"d_model": 256,
|
| 18 |
+
"decoder_attention_heads": 8,
|
| 19 |
+
"decoder_ffn_dim": 1024,
|
| 20 |
+
"decoder_layerdrop": 0.0,
|
| 21 |
+
"decoder_layers": 6,
|
| 22 |
+
"decoder_start_token_id": 2,
|
| 23 |
+
"dropout": 0.1,
|
| 24 |
+
"dtype": "float32",
|
| 25 |
+
"eos_token_id": 2,
|
| 26 |
+
"finetuning_task": null,
|
| 27 |
+
"id2label": {
|
| 28 |
+
"0": "LABEL_0",
|
| 29 |
+
"1": "LABEL_1"
|
| 30 |
+
},
|
| 31 |
+
"init_std": 0.02,
|
| 32 |
+
"is_decoder": true,
|
| 33 |
+
"is_encoder_decoder": false,
|
| 34 |
+
"label2id": {
|
| 35 |
+
"LABEL_0": 0,
|
| 36 |
+
"LABEL_1": 1
|
| 37 |
+
},
|
| 38 |
+
"layernorm_embedding": true,
|
| 39 |
+
"max_position_embeddings": 512,
|
| 40 |
+
"model_type": "trocr",
|
| 41 |
+
"output_attentions": false,
|
| 42 |
+
"output_hidden_states": false,
|
| 43 |
+
"pad_token_id": 1,
|
| 44 |
+
"prefix": null,
|
| 45 |
+
"problem_type": null,
|
| 46 |
+
"pruned_heads": {},
|
| 47 |
+
"return_dict": true,
|
| 48 |
+
"scale_embedding": true,
|
| 49 |
+
"sep_token_id": null,
|
| 50 |
+
"task_specific_params": null,
|
| 51 |
+
"tie_encoder_decoder": false,
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"tokenizer_class": null,
|
| 54 |
+
"torchscript": false,
|
| 55 |
+
"use_bfloat16": false,
|
| 56 |
+
"use_cache": false,
|
| 57 |
+
"use_learned_position_embeddings": true,
|
| 58 |
+
"vocab_size": 64044
|
| 59 |
+
},
|
| 60 |
+
"decoder_start_token_id": 2,
|
| 61 |
+
"dtype": "float32",
|
| 62 |
+
"encoder": {
|
| 63 |
+
"_name_or_path": "",
|
| 64 |
+
"add_cross_attention": false,
|
| 65 |
+
"architectures": null,
|
| 66 |
+
"attention_probs_dropout_prob": 0.0,
|
| 67 |
+
"bos_token_id": null,
|
| 68 |
+
"chunk_size_feed_forward": 0,
|
| 69 |
+
"cross_attention_hidden_size": null,
|
| 70 |
+
"decoder_start_token_id": null,
|
| 71 |
+
"dtype": "float32",
|
| 72 |
+
"encoder_stride": 16,
|
| 73 |
+
"eos_token_id": null,
|
| 74 |
+
"finetuning_task": null,
|
| 75 |
+
"hidden_act": "gelu",
|
| 76 |
+
"hidden_dropout_prob": 0.0,
|
| 77 |
+
"hidden_size": 384,
|
| 78 |
+
"id2label": {
|
| 79 |
+
"0": "LABEL_0",
|
| 80 |
+
"1": "LABEL_1"
|
| 81 |
+
},
|
| 82 |
+
"image_size": 384,
|
| 83 |
+
"initializer_range": 0.02,
|
| 84 |
+
"intermediate_size": 1536,
|
| 85 |
+
"is_decoder": false,
|
| 86 |
+
"is_encoder_decoder": false,
|
| 87 |
+
"label2id": {
|
| 88 |
+
"LABEL_0": 0,
|
| 89 |
+
"LABEL_1": 1
|
| 90 |
+
},
|
| 91 |
+
"layer_norm_eps": 1e-12,
|
| 92 |
+
"model_type": "deit",
|
| 93 |
+
"num_attention_heads": 6,
|
| 94 |
+
"num_channels": 3,
|
| 95 |
+
"num_hidden_layers": 12,
|
| 96 |
+
"output_attentions": false,
|
| 97 |
+
"output_hidden_states": false,
|
| 98 |
+
"pad_token_id": null,
|
| 99 |
+
"patch_size": 16,
|
| 100 |
+
"pooler_act": "tanh",
|
| 101 |
+
"pooler_output_size": 384,
|
| 102 |
+
"prefix": null,
|
| 103 |
+
"problem_type": null,
|
| 104 |
+
"pruned_heads": {},
|
| 105 |
+
"qkv_bias": true,
|
| 106 |
+
"return_dict": true,
|
| 107 |
+
"sep_token_id": null,
|
| 108 |
+
"task_specific_params": null,
|
| 109 |
+
"tie_encoder_decoder": false,
|
| 110 |
+
"tie_word_embeddings": true,
|
| 111 |
+
"tokenizer_class": null,
|
| 112 |
+
"torchscript": false,
|
| 113 |
+
"use_bfloat16": false
|
| 114 |
+
},
|
| 115 |
+
"eos_token_id": 2,
|
| 116 |
+
"is_encoder_decoder": true,
|
| 117 |
+
"model_type": "vision-encoder-decoder",
|
| 118 |
+
"pad_token_id": 1,
|
| 119 |
+
"tie_word_embeddings": false,
|
| 120 |
+
"transformers_version": "5.12.0",
|
| 121 |
+
"use_cache": false
|
| 122 |
+
}
|
runs/hf-recognizer-mixed-v1/final-model/generation_config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": false,
|
| 10 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 11 |
+
"encoder_repetition_penalty": 1.0,
|
| 12 |
+
"eos_token_id": [
|
| 13 |
+
2
|
| 14 |
+
],
|
| 15 |
+
"epsilon_cutoff": 0.0,
|
| 16 |
+
"eta_cutoff": 0.0,
|
| 17 |
+
"length_penalty": 1.0,
|
| 18 |
+
"max_length": 128,
|
| 19 |
+
"min_length": 0,
|
| 20 |
+
"no_repeat_ngram_size": 0,
|
| 21 |
+
"num_assistant_tokens": 20,
|
| 22 |
+
"num_assistant_tokens_schedule": "constant",
|
| 23 |
+
"num_beam_groups": 1,
|
| 24 |
+
"num_beams": 1,
|
| 25 |
+
"num_return_sequences": 1,
|
| 26 |
+
"output_scores": false,
|
| 27 |
+
"pad_token_id": 1,
|
| 28 |
+
"remove_invalid_values": false,
|
| 29 |
+
"repetition_penalty": 1.0,
|
| 30 |
+
"return_dict_in_generate": false,
|
| 31 |
+
"target_lookbehind": 10,
|
| 32 |
+
"temperature": 1.0,
|
| 33 |
+
"top_k": 50,
|
| 34 |
+
"top_p": 1.0,
|
| 35 |
+
"transformers_version": "5.12.0",
|
| 36 |
+
"typical_p": 1.0,
|
| 37 |
+
"use_cache": false
|
| 38 |
+
}
|
runs/hf-recognizer-mixed-v1/final-model/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae0ddf467abbc87b81bf3c2f458190913d9e6639e78f59a4798786bc4eb4cdf7
|
| 3 |
+
size 246430696
|
runs/hf-recognizer-mixed-v1/final-model/processor_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"crop_size": {
|
| 4 |
+
"height": 224,
|
| 5 |
+
"width": 224
|
| 6 |
+
},
|
| 7 |
+
"do_center_crop": false,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.5,
|
| 13 |
+
0.5,
|
| 14 |
+
0.5
|
| 15 |
+
],
|
| 16 |
+
"image_processor_type": "DeiTImageProcessor",
|
| 17 |
+
"image_std": [
|
| 18 |
+
0.5,
|
| 19 |
+
0.5,
|
| 20 |
+
0.5
|
| 21 |
+
],
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"height": 384,
|
| 26 |
+
"width": 384
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"processor_class": "TrOCRProcessor"
|
| 30 |
+
}
|
runs/hf-recognizer-mixed-v1/final-model/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/hf-recognizer-mixed-v1/final-model/tokenizer_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "pil",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<s>",
|
| 9 |
+
"</s>"
|
| 10 |
+
],
|
| 11 |
+
"is_local": false,
|
| 12 |
+
"local_files_only": false,
|
| 13 |
+
"mask_token": "<mask>",
|
| 14 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 15 |
+
"pad_token": "<pad>",
|
| 16 |
+
"processor_class": "TrOCRProcessor",
|
| 17 |
+
"sep_token": "</s>",
|
| 18 |
+
"sp_model_kwargs": {},
|
| 19 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 20 |
+
"unk_id": 0,
|
| 21 |
+
"unk_token": "<unk>"
|
| 22 |
+
}
|
runs/hf-recognizer-mixed-v1/final-model/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a30c2c87d0fc2adc38a365055a2a496e9a46faab91eba78a269d69e9d682c0f0
|
| 3 |
+
size 5329
|
runs/hf-recognizer-mixed-v1/package/PACKAGE.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Packaged Hugging Face OCR Candidate
|
| 2 |
+
|
| 3 |
+
Model card: `runs/hf-recognizer-mixed-v1/package/model-card.json`
|
| 4 |
+
Artifacts: `runs/hf-recognizer-mixed-v1/package/artifacts/model`
|
| 5 |
+
|
| 6 |
+
Audit before benchmarking:
|
| 7 |
+
|
| 8 |
+
```bash
|
| 9 |
+
ocrtech audit-model runs/hf-recognizer-mixed-v1/package/model-card.json
|
| 10 |
+
```
|
runs/hf-recognizer-mixed-v1/package/artifacts/model/config.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VisionEncoderDecoderModel"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 0,
|
| 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 |
+
"bos_token_id": 0,
|
| 14 |
+
"chunk_size_feed_forward": 0,
|
| 15 |
+
"classifier_dropout": 0.0,
|
| 16 |
+
"cross_attention_hidden_size": 384,
|
| 17 |
+
"d_model": 256,
|
| 18 |
+
"decoder_attention_heads": 8,
|
| 19 |
+
"decoder_ffn_dim": 1024,
|
| 20 |
+
"decoder_layerdrop": 0.0,
|
| 21 |
+
"decoder_layers": 6,
|
| 22 |
+
"decoder_start_token_id": 2,
|
| 23 |
+
"dropout": 0.1,
|
| 24 |
+
"dtype": "float32",
|
| 25 |
+
"eos_token_id": 2,
|
| 26 |
+
"finetuning_task": null,
|
| 27 |
+
"id2label": {
|
| 28 |
+
"0": "LABEL_0",
|
| 29 |
+
"1": "LABEL_1"
|
| 30 |
+
},
|
| 31 |
+
"init_std": 0.02,
|
| 32 |
+
"is_decoder": true,
|
| 33 |
+
"is_encoder_decoder": false,
|
| 34 |
+
"label2id": {
|
| 35 |
+
"LABEL_0": 0,
|
| 36 |
+
"LABEL_1": 1
|
| 37 |
+
},
|
| 38 |
+
"layernorm_embedding": true,
|
| 39 |
+
"max_position_embeddings": 512,
|
| 40 |
+
"model_type": "trocr",
|
| 41 |
+
"output_attentions": false,
|
| 42 |
+
"output_hidden_states": false,
|
| 43 |
+
"pad_token_id": 1,
|
| 44 |
+
"prefix": null,
|
| 45 |
+
"problem_type": null,
|
| 46 |
+
"pruned_heads": {},
|
| 47 |
+
"return_dict": true,
|
| 48 |
+
"scale_embedding": true,
|
| 49 |
+
"sep_token_id": null,
|
| 50 |
+
"task_specific_params": null,
|
| 51 |
+
"tie_encoder_decoder": false,
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"tokenizer_class": null,
|
| 54 |
+
"torchscript": false,
|
| 55 |
+
"use_bfloat16": false,
|
| 56 |
+
"use_cache": false,
|
| 57 |
+
"use_learned_position_embeddings": true,
|
| 58 |
+
"vocab_size": 64044
|
| 59 |
+
},
|
| 60 |
+
"decoder_start_token_id": 2,
|
| 61 |
+
"dtype": "float32",
|
| 62 |
+
"encoder": {
|
| 63 |
+
"_name_or_path": "",
|
| 64 |
+
"add_cross_attention": false,
|
| 65 |
+
"architectures": null,
|
| 66 |
+
"attention_probs_dropout_prob": 0.0,
|
| 67 |
+
"bos_token_id": null,
|
| 68 |
+
"chunk_size_feed_forward": 0,
|
| 69 |
+
"cross_attention_hidden_size": null,
|
| 70 |
+
"decoder_start_token_id": null,
|
| 71 |
+
"dtype": "float32",
|
| 72 |
+
"encoder_stride": 16,
|
| 73 |
+
"eos_token_id": null,
|
| 74 |
+
"finetuning_task": null,
|
| 75 |
+
"hidden_act": "gelu",
|
| 76 |
+
"hidden_dropout_prob": 0.0,
|
| 77 |
+
"hidden_size": 384,
|
| 78 |
+
"id2label": {
|
| 79 |
+
"0": "LABEL_0",
|
| 80 |
+
"1": "LABEL_1"
|
| 81 |
+
},
|
| 82 |
+
"image_size": 384,
|
| 83 |
+
"initializer_range": 0.02,
|
| 84 |
+
"intermediate_size": 1536,
|
| 85 |
+
"is_decoder": false,
|
| 86 |
+
"is_encoder_decoder": false,
|
| 87 |
+
"label2id": {
|
| 88 |
+
"LABEL_0": 0,
|
| 89 |
+
"LABEL_1": 1
|
| 90 |
+
},
|
| 91 |
+
"layer_norm_eps": 1e-12,
|
| 92 |
+
"model_type": "deit",
|
| 93 |
+
"num_attention_heads": 6,
|
| 94 |
+
"num_channels": 3,
|
| 95 |
+
"num_hidden_layers": 12,
|
| 96 |
+
"output_attentions": false,
|
| 97 |
+
"output_hidden_states": false,
|
| 98 |
+
"pad_token_id": null,
|
| 99 |
+
"patch_size": 16,
|
| 100 |
+
"pooler_act": "tanh",
|
| 101 |
+
"pooler_output_size": 384,
|
| 102 |
+
"prefix": null,
|
| 103 |
+
"problem_type": null,
|
| 104 |
+
"pruned_heads": {},
|
| 105 |
+
"qkv_bias": true,
|
| 106 |
+
"return_dict": true,
|
| 107 |
+
"sep_token_id": null,
|
| 108 |
+
"task_specific_params": null,
|
| 109 |
+
"tie_encoder_decoder": false,
|
| 110 |
+
"tie_word_embeddings": true,
|
| 111 |
+
"tokenizer_class": null,
|
| 112 |
+
"torchscript": false,
|
| 113 |
+
"use_bfloat16": false
|
| 114 |
+
},
|
| 115 |
+
"eos_token_id": 2,
|
| 116 |
+
"is_encoder_decoder": true,
|
| 117 |
+
"model_type": "vision-encoder-decoder",
|
| 118 |
+
"pad_token_id": 1,
|
| 119 |
+
"tie_word_embeddings": false,
|
| 120 |
+
"transformers_version": "5.12.0",
|
| 121 |
+
"use_cache": false
|
| 122 |
+
}
|
runs/hf-recognizer-mixed-v1/package/artifacts/model/generation_config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": false,
|
| 10 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 11 |
+
"encoder_repetition_penalty": 1.0,
|
| 12 |
+
"eos_token_id": [
|
| 13 |
+
2
|
| 14 |
+
],
|
| 15 |
+
"epsilon_cutoff": 0.0,
|
| 16 |
+
"eta_cutoff": 0.0,
|
| 17 |
+
"length_penalty": 1.0,
|
| 18 |
+
"max_length": 128,
|
| 19 |
+
"min_length": 0,
|
| 20 |
+
"no_repeat_ngram_size": 0,
|
| 21 |
+
"num_assistant_tokens": 20,
|
| 22 |
+
"num_assistant_tokens_schedule": "constant",
|
| 23 |
+
"num_beam_groups": 1,
|
| 24 |
+
"num_beams": 1,
|
| 25 |
+
"num_return_sequences": 1,
|
| 26 |
+
"output_scores": false,
|
| 27 |
+
"pad_token_id": 1,
|
| 28 |
+
"remove_invalid_values": false,
|
| 29 |
+
"repetition_penalty": 1.0,
|
| 30 |
+
"return_dict_in_generate": false,
|
| 31 |
+
"target_lookbehind": 10,
|
| 32 |
+
"temperature": 1.0,
|
| 33 |
+
"top_k": 50,
|
| 34 |
+
"top_p": 1.0,
|
| 35 |
+
"transformers_version": "5.12.0",
|
| 36 |
+
"typical_p": 1.0,
|
| 37 |
+
"use_cache": false
|
| 38 |
+
}
|
runs/hf-recognizer-mixed-v1/package/artifacts/model/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae0ddf467abbc87b81bf3c2f458190913d9e6639e78f59a4798786bc4eb4cdf7
|
| 3 |
+
size 246430696
|
runs/hf-recognizer-mixed-v1/package/artifacts/model/processor_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"crop_size": {
|
| 4 |
+
"height": 224,
|
| 5 |
+
"width": 224
|
| 6 |
+
},
|
| 7 |
+
"do_center_crop": false,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.5,
|
| 13 |
+
0.5,
|
| 14 |
+
0.5
|
| 15 |
+
],
|
| 16 |
+
"image_processor_type": "DeiTImageProcessor",
|
| 17 |
+
"image_std": [
|
| 18 |
+
0.5,
|
| 19 |
+
0.5,
|
| 20 |
+
0.5
|
| 21 |
+
],
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"height": 384,
|
| 26 |
+
"width": 384
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"processor_class": "TrOCRProcessor"
|
| 30 |
+
}
|
runs/hf-recognizer-mixed-v1/package/artifacts/model/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/hf-recognizer-mixed-v1/package/artifacts/model/tokenizer_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "pil",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"cls_token": "<s>",
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<s>",
|
| 9 |
+
"</s>"
|
| 10 |
+
],
|
| 11 |
+
"is_local": false,
|
| 12 |
+
"local_files_only": false,
|
| 13 |
+
"mask_token": "<mask>",
|
| 14 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 15 |
+
"pad_token": "<pad>",
|
| 16 |
+
"processor_class": "TrOCRProcessor",
|
| 17 |
+
"sep_token": "</s>",
|
| 18 |
+
"sp_model_kwargs": {},
|
| 19 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 20 |
+
"unk_id": 0,
|
| 21 |
+
"unk_token": "<unk>"
|
| 22 |
+
}
|
runs/hf-recognizer-mixed-v1/package/artifacts/model/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a30c2c87d0fc2adc38a365055a2a496e9a46faab91eba78a269d69e9d682c0f0
|
| 3 |
+
size 5329
|
runs/hf-recognizer-mixed-v1/package/model-card.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_id": "ocrtech-hf-mixed-v1",
|
| 3 |
+
"backend": "hf_vision_encoder_decoder",
|
| 4 |
+
"base_model": "microsoft/trocr-small-printed",
|
| 5 |
+
"created_at_utc": "2026-06-14T01:56:58.924306+00:00",
|
| 6 |
+
"artifacts": [
|
| 7 |
+
{
|
| 8 |
+
"path": "artifacts/model",
|
| 9 |
+
"required": true,
|
| 10 |
+
"sha256": null,
|
| 11 |
+
"kind": "directory"
|
| 12 |
+
}
|
| 13 |
+
],
|
| 14 |
+
"backend_kwargs": {
|
| 15 |
+
"model_dir": "artifacts/model",
|
| 16 |
+
"processor_dir": "artifacts/model",
|
| 17 |
+
"max_new_tokens": 128
|
| 18 |
+
},
|
| 19 |
+
"provenance": {
|
| 20 |
+
"train_manifest": {
|
| 21 |
+
"path": "data/splits-mixed-v1/train.jsonl",
|
| 22 |
+
"sha256": "d3447d628ba6bd56d7719199c6def2f2c453da29283ba1a72b475c8348727870"
|
| 23 |
+
},
|
| 24 |
+
"eval_manifest": {
|
| 25 |
+
"path": "data/splits-mixed-v1/eval-with-refs.jsonl",
|
| 26 |
+
"sha256": "314c11e25aa6caccb2a801a6c5a6a3f7222eeb59ae76e77f12d6dd72ff4a90ae"
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"metrics": {
|
| 30 |
+
"report": {
|
| 31 |
+
"path": "runs/hf-recognizer-mixed-v1/training_metrics.json",
|
| 32 |
+
"sha256": "26cc0f567f60ce31c8134bae47f17eb848f11e3caec628fd05c822d3847213fe"
|
| 33 |
+
}
|
| 34 |
+
},
|
| 35 |
+
"notes": null
|
| 36 |
+
}
|
runs/hf-recognizer-mixed-v2-full/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hugging Face Recognizer Training Recipe
|
| 2 |
+
|
| 3 |
+
Base model: `microsoft/trocr-small-printed`
|
| 4 |
+
Train manifest: `data/splits-mixed-v1/train-rebalanced-nep-eng.jsonl` (1700 samples)
|
| 5 |
+
Eval manifest: `data/splits-mixed-v1/eval-with-refs.jsonl` (180 samples)
|
| 6 |
+
|
| 7 |
+
Install the backend dependencies first:
|
| 8 |
+
|
| 9 |
+
```bash
|
| 10 |
+
python -m pip install -e '.[hf-recognizer]'
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
Run in-process:
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
ocrtech train-recognizer --backend hf-vision-encoder-decoder --train-manifest data/splits-mixed-v1/train-rebalanced-nep-eng.jsonl --eval-manifest data/splits-mixed-v1/eval-with-refs.jsonl --out runs/hf-recognizer-mixed-v2-full --run
|
| 17 |
+
```
|