End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1709869740.66dbcb48ba8b.1198.0 +2 -2
- preprocessor_config.json +13 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +80 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: microsoft/layoutlm-base-uncased
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
datasets:
|
| 7 |
+
- funsd
|
| 8 |
+
model-index:
|
| 9 |
+
- name: layoutlm-funsd
|
| 10 |
+
results: []
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 14 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 15 |
+
|
| 16 |
+
# layoutlm-funsd
|
| 17 |
+
|
| 18 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
| 19 |
+
It achieves the following results on the evaluation set:
|
| 20 |
+
- Loss: 1.1243
|
| 21 |
+
- Answer: {'precision': 0.40076335877862596, 'recall': 0.519159456118665, 'f1': 0.4523424878836834, 'number': 809}
|
| 22 |
+
- Header: {'precision': 0.28421052631578947, 'recall': 0.226890756302521, 'f1': 0.25233644859813087, 'number': 119}
|
| 23 |
+
- Question: {'precision': 0.5280065897858319, 'recall': 0.6018779342723005, 'f1': 0.5625274243089073, 'number': 1065}
|
| 24 |
+
- Overall Precision: 0.4616
|
| 25 |
+
- Overall Recall: 0.5459
|
| 26 |
+
- Overall F1: 0.5002
|
| 27 |
+
- Overall Accuracy: 0.6215
|
| 28 |
+
|
| 29 |
+
## Model description
|
| 30 |
+
|
| 31 |
+
More information needed
|
| 32 |
+
|
| 33 |
+
## Intended uses & limitations
|
| 34 |
+
|
| 35 |
+
More information needed
|
| 36 |
+
|
| 37 |
+
## Training and evaluation data
|
| 38 |
+
|
| 39 |
+
More information needed
|
| 40 |
+
|
| 41 |
+
## Training procedure
|
| 42 |
+
|
| 43 |
+
### Training hyperparameters
|
| 44 |
+
|
| 45 |
+
The following hyperparameters were used during training:
|
| 46 |
+
- learning_rate: 3e-05
|
| 47 |
+
- train_batch_size: 16
|
| 48 |
+
- eval_batch_size: 8
|
| 49 |
+
- seed: 42
|
| 50 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 51 |
+
- lr_scheduler_type: linear
|
| 52 |
+
- num_epochs: 15
|
| 53 |
+
- mixed_precision_training: Native AMP
|
| 54 |
+
|
| 55 |
+
### Training results
|
| 56 |
+
|
| 57 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
| 58 |
+
|:-------------:|:-----:|:----:|:---------------:|:------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
| 59 |
+
| 1.7728 | 1.0 | 10 | 1.5441 | {'precision': 0.04580152671755725, 'recall': 0.059332509270704575, 'f1': 0.05169628432956382, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.20335429769392033, 'recall': 0.18215962441314554, 'f1': 0.19217434373452202, 'number': 1065} | 0.1209 | 0.1214 | 0.1212 | 0.3719 |
|
| 60 |
+
| 1.4551 | 2.0 | 20 | 1.3517 | {'precision': 0.20478234212139793, 'recall': 0.41285537700865266, 'f1': 0.27377049180327867, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.26090225563909775, 'recall': 0.32582159624413143, 'f1': 0.28977035490605424, 'number': 1065} | 0.2297 | 0.3417 | 0.2747 | 0.4263 |
|
| 61 |
+
| 1.295 | 3.0 | 30 | 1.2465 | {'precision': 0.26224426534407935, 'recall': 0.522867737948084, 'f1': 0.34929810074318746, 'number': 809} | {'precision': 0.058823529411764705, 'recall': 0.01680672268907563, 'f1': 0.026143790849673203, 'number': 119} | {'precision': 0.3458528951486698, 'recall': 0.41502347417840374, 'f1': 0.37729406743491256, 'number': 1065} | 0.2964 | 0.4350 | 0.3526 | 0.4803 |
|
| 62 |
+
| 1.1635 | 4.0 | 40 | 1.1449 | {'precision': 0.28778467908902694, 'recall': 0.515451174289246, 'f1': 0.3693534100974314, 'number': 809} | {'precision': 0.2638888888888889, 'recall': 0.15966386554621848, 'f1': 0.19895287958115182, 'number': 119} | {'precision': 0.412396694214876, 'recall': 0.46854460093896716, 'f1': 0.4386813186813187, 'number': 1065} | 0.3424 | 0.4691 | 0.3959 | 0.5521 |
|
| 63 |
+
| 1.0456 | 5.0 | 50 | 1.0703 | {'precision': 0.3060240963855422, 'recall': 0.47095179233621753, 'f1': 0.37098344693281404, 'number': 809} | {'precision': 0.3472222222222222, 'recall': 0.21008403361344538, 'f1': 0.2617801047120419, 'number': 119} | {'precision': 0.40298507462686567, 'recall': 0.5830985915492958, 'f1': 0.476592478894858, 'number': 1065} | 0.3593 | 0.5153 | 0.4234 | 0.5797 |
|
| 64 |
+
| 0.9601 | 6.0 | 60 | 1.2304 | {'precision': 0.30907920154539603, 'recall': 0.5933250927070457, 'f1': 0.40643522438611346, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.16806722689075632, 'f1': 0.223463687150838, 'number': 119} | {'precision': 0.4642857142857143, 'recall': 0.4394366197183099, 'f1': 0.4515195369030391, 'number': 1065} | 0.3693 | 0.4857 | 0.4196 | 0.5479 |
|
| 65 |
+
| 0.9153 | 7.0 | 70 | 1.1091 | {'precision': 0.35518157661647476, 'recall': 0.4956736711990111, 'f1': 0.41382868937048506, 'number': 809} | {'precision': 0.3125, 'recall': 0.21008403361344538, 'f1': 0.25125628140703515, 'number': 119} | {'precision': 0.5262645914396887, 'recall': 0.507981220657277, 'f1': 0.5169612995699953, 'number': 1065} | 0.4323 | 0.4852 | 0.4572 | 0.6011 |
|
| 66 |
+
| 0.8346 | 8.0 | 80 | 1.0632 | {'precision': 0.35597826086956524, 'recall': 0.4857849196538937, 'f1': 0.4108729743857816, 'number': 809} | {'precision': 0.28421052631578947, 'recall': 0.226890756302521, 'f1': 0.25233644859813087, 'number': 119} | {'precision': 0.46401799100449775, 'recall': 0.5812206572769953, 'f1': 0.516048353480617, 'number': 1065} | 0.4102 | 0.5213 | 0.4591 | 0.6103 |
|
| 67 |
+
| 0.7789 | 9.0 | 90 | 1.0955 | {'precision': 0.3817062445030783, 'recall': 0.5364647713226205, 'f1': 0.44604316546762585, 'number': 809} | {'precision': 0.26, 'recall': 0.2184873949579832, 'f1': 0.23744292237442924, 'number': 119} | {'precision': 0.5137693631669535, 'recall': 0.5605633802816902, 'f1': 0.5361472833408173, 'number': 1065} | 0.4406 | 0.5304 | 0.4813 | 0.6082 |
|
| 68 |
+
| 0.7751 | 10.0 | 100 | 1.1232 | {'precision': 0.38474434199497065, 'recall': 0.5673671199011124, 'f1': 0.45854145854145856, 'number': 809} | {'precision': 0.3010752688172043, 'recall': 0.23529411764705882, 'f1': 0.2641509433962264, 'number': 119} | {'precision': 0.5040358744394619, 'recall': 0.5276995305164319, 'f1': 0.5155963302752293, 'number': 1065} | 0.4369 | 0.5263 | 0.4775 | 0.6032 |
|
| 69 |
+
| 0.6875 | 11.0 | 110 | 1.1092 | {'precision': 0.39342723004694835, 'recall': 0.5179233621755254, 'f1': 0.44717182497331914, 'number': 809} | {'precision': 0.34146341463414637, 'recall': 0.23529411764705882, 'f1': 0.27860696517412936, 'number': 119} | {'precision': 0.5076305220883535, 'recall': 0.5934272300469483, 'f1': 0.5471861471861472, 'number': 1065} | 0.4511 | 0.5414 | 0.4921 | 0.6233 |
|
| 70 |
+
| 0.6808 | 12.0 | 120 | 1.1286 | {'precision': 0.40641158221303, 'recall': 0.4857849196538937, 'f1': 0.44256756756756754, 'number': 809} | {'precision': 0.24561403508771928, 'recall': 0.23529411764705882, 'f1': 0.24034334763948498, 'number': 119} | {'precision': 0.49772036474164133, 'recall': 0.6150234741784038, 'f1': 0.5501889962200757, 'number': 1065} | 0.4489 | 0.5399 | 0.4902 | 0.6159 |
|
| 71 |
+
| 0.656 | 13.0 | 130 | 1.1237 | {'precision': 0.39822134387351776, 'recall': 0.49814585908529047, 'f1': 0.442613948380011, 'number': 809} | {'precision': 0.2967032967032967, 'recall': 0.226890756302521, 'f1': 0.2571428571428572, 'number': 119} | {'precision': 0.5141732283464567, 'recall': 0.6131455399061033, 'f1': 0.5593147751605996, 'number': 1065} | 0.4564 | 0.5434 | 0.4961 | 0.6179 |
|
| 72 |
+
| 0.6359 | 14.0 | 140 | 1.1296 | {'precision': 0.3996399639963996, 'recall': 0.5488257107540173, 'f1': 0.46249999999999997, 'number': 809} | {'precision': 0.32926829268292684, 'recall': 0.226890756302521, 'f1': 0.26865671641791045, 'number': 119} | {'precision': 0.5376712328767124, 'recall': 0.5896713615023474, 'f1': 0.5624720107478729, 'number': 1065} | 0.4655 | 0.5514 | 0.5048 | 0.6173 |
|
| 73 |
+
| 0.6117 | 15.0 | 150 | 1.1243 | {'precision': 0.40076335877862596, 'recall': 0.519159456118665, 'f1': 0.4523424878836834, 'number': 809} | {'precision': 0.28421052631578947, 'recall': 0.226890756302521, 'f1': 0.25233644859813087, 'number': 119} | {'precision': 0.5280065897858319, 'recall': 0.6018779342723005, 'f1': 0.5625274243089073, 'number': 1065} | 0.4616 | 0.5459 | 0.5002 | 0.6215 |
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
### Framework versions
|
| 77 |
+
|
| 78 |
+
- Transformers 4.38.2
|
| 79 |
+
- Pytorch 2.1.0+cu121
|
| 80 |
+
- Datasets 2.18.0
|
| 81 |
+
- Tokenizers 0.15.2
|
logs/events.out.tfevents.1709869740.66dbcb48ba8b.1198.0
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5725ad969480bbd6a5742f15ba43d05b154738da107b437c6dfe571909276c16
|
| 3 |
+
size 15738
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"apply_ocr": true,
|
| 3 |
+
"do_resize": true,
|
| 4 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
| 5 |
+
"ocr_lang": null,
|
| 6 |
+
"processor_class": "LayoutLMv2Processor",
|
| 7 |
+
"resample": 2,
|
| 8 |
+
"size": {
|
| 9 |
+
"height": 224,
|
| 10 |
+
"width": 224
|
| 11 |
+
},
|
| 12 |
+
"tesseract_config": ""
|
| 13 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"additional_special_tokens": [],
|
| 45 |
+
"apply_ocr": false,
|
| 46 |
+
"clean_up_tokenization_spaces": true,
|
| 47 |
+
"cls_token": "[CLS]",
|
| 48 |
+
"cls_token_box": [
|
| 49 |
+
0,
|
| 50 |
+
0,
|
| 51 |
+
0,
|
| 52 |
+
0
|
| 53 |
+
],
|
| 54 |
+
"do_basic_tokenize": true,
|
| 55 |
+
"do_lower_case": true,
|
| 56 |
+
"mask_token": "[MASK]",
|
| 57 |
+
"model_max_length": 512,
|
| 58 |
+
"never_split": null,
|
| 59 |
+
"only_label_first_subword": true,
|
| 60 |
+
"pad_token": "[PAD]",
|
| 61 |
+
"pad_token_box": [
|
| 62 |
+
0,
|
| 63 |
+
0,
|
| 64 |
+
0,
|
| 65 |
+
0
|
| 66 |
+
],
|
| 67 |
+
"pad_token_label": -100,
|
| 68 |
+
"processor_class": "LayoutLMv2Processor",
|
| 69 |
+
"sep_token": "[SEP]",
|
| 70 |
+
"sep_token_box": [
|
| 71 |
+
1000,
|
| 72 |
+
1000,
|
| 73 |
+
1000,
|
| 74 |
+
1000
|
| 75 |
+
],
|
| 76 |
+
"strip_accents": null,
|
| 77 |
+
"tokenize_chinese_chars": true,
|
| 78 |
+
"tokenizer_class": "LayoutLMv2Tokenizer",
|
| 79 |
+
"unk_token": "[UNK]"
|
| 80 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|