End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1719273795.ae49b29c4439.7028.1 +2 -2
- preprocessor_config.json +25 -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: 0.6953
|
| 21 |
+
- Answer: {'precision': 0.7040261153427638, 'recall': 0.799752781211372, 'f1': 0.7488425925925926, 'number': 809}
|
| 22 |
+
- Header: {'precision': 0.24516129032258063, 'recall': 0.31932773109243695, 'f1': 0.2773722627737226, 'number': 119}
|
| 23 |
+
- Question: {'precision': 0.7894273127753304, 'recall': 0.8413145539906103, 'f1': 0.8145454545454545, 'number': 1065}
|
| 24 |
+
- Overall Precision: 0.7157
|
| 25 |
+
- Overall Recall: 0.7933
|
| 26 |
+
- Overall F1: 0.7525
|
| 27 |
+
- Overall Accuracy: 0.8063
|
| 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.8542 | 1.0 | 10 | 1.6365 | {'precision': 0.01658374792703151, 'recall': 0.012360939431396786, 'f1': 0.014164305949008497, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.21144674085850557, 'recall': 0.12488262910798122, 'f1': 0.15702479338842976, 'number': 1065} | 0.1161 | 0.0718 | 0.0887 | 0.3298 |
|
| 60 |
+
| 1.4883 | 2.0 | 20 | 1.3085 | {'precision': 0.17417417417417416, 'recall': 0.21508034610630408, 'f1': 0.19247787610619468, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.37554585152838427, 'recall': 0.48450704225352115, 'f1': 0.4231242312423124, 'number': 1065} | 0.2908 | 0.3462 | 0.3161 | 0.5523 |
|
| 61 |
+
| 1.1521 | 3.0 | 30 | 0.9728 | {'precision': 0.452642073778664, 'recall': 0.5611866501854141, 'f1': 0.5011037527593818, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5948678071539658, 'recall': 0.7183098591549296, 'f1': 0.6507868991918333, 'number': 1065} | 0.53 | 0.6116 | 0.5679 | 0.6953 |
|
| 62 |
+
| 0.8808 | 4.0 | 40 | 0.7922 | {'precision': 0.582089552238806, 'recall': 0.723114956736712, 'f1': 0.6449834619625138, 'number': 809} | {'precision': 0.06666666666666667, 'recall': 0.025210084033613446, 'f1': 0.036585365853658534, 'number': 119} | {'precision': 0.6649916247906198, 'recall': 0.7455399061032864, 'f1': 0.7029659141212926, 'number': 1065} | 0.6159 | 0.6934 | 0.6523 | 0.7508 |
|
| 63 |
+
| 0.6941 | 5.0 | 50 | 0.7105 | {'precision': 0.6461704422869471, 'recall': 0.7404202719406675, 'f1': 0.6900921658986174, 'number': 809} | {'precision': 0.1875, 'recall': 0.15126050420168066, 'f1': 0.16744186046511625, 'number': 119} | {'precision': 0.651778955336866, 'recall': 0.8084507042253521, 'f1': 0.721709974853311, 'number': 1065} | 0.6305 | 0.7416 | 0.6816 | 0.7809 |
|
| 64 |
+
| 0.5844 | 6.0 | 60 | 0.6780 | {'precision': 0.6598360655737705, 'recall': 0.796044499381953, 'f1': 0.7215686274509804, 'number': 809} | {'precision': 0.2079207920792079, 'recall': 0.17647058823529413, 'f1': 0.19090909090909092, 'number': 119} | {'precision': 0.7283633247643531, 'recall': 0.7981220657276995, 'f1': 0.7616487455197132, 'number': 1065} | 0.6751 | 0.7602 | 0.7151 | 0.7926 |
|
| 65 |
+
| 0.5021 | 7.0 | 70 | 0.6522 | {'precision': 0.6852248394004282, 'recall': 0.7911001236093943, 'f1': 0.7343660355708548, 'number': 809} | {'precision': 0.20149253731343283, 'recall': 0.226890756302521, 'f1': 0.21343873517786563, 'number': 119} | {'precision': 0.7521514629948365, 'recall': 0.8206572769953052, 'f1': 0.7849124382577458, 'number': 1065} | 0.6910 | 0.7732 | 0.7298 | 0.8036 |
|
| 66 |
+
| 0.443 | 8.0 | 80 | 0.6501 | {'precision': 0.6827731092436975, 'recall': 0.8034610630407911, 'f1': 0.7382169222032936, 'number': 809} | {'precision': 0.2542372881355932, 'recall': 0.25210084033613445, 'f1': 0.25316455696202533, 'number': 119} | {'precision': 0.7689003436426117, 'recall': 0.8403755868544601, 'f1': 0.8030506953790938, 'number': 1065} | 0.7050 | 0.7903 | 0.7452 | 0.8060 |
|
| 67 |
+
| 0.3917 | 9.0 | 90 | 0.6715 | {'precision': 0.6913319238900634, 'recall': 0.8084054388133498, 'f1': 0.7452991452991453, 'number': 809} | {'precision': 0.25547445255474455, 'recall': 0.29411764705882354, 'f1': 0.2734375, 'number': 119} | {'precision': 0.7811387900355872, 'recall': 0.8244131455399061, 'f1': 0.8021927820922796, 'number': 1065} | 0.7100 | 0.7863 | 0.7462 | 0.8032 |
|
| 68 |
+
| 0.3849 | 10.0 | 100 | 0.6725 | {'precision': 0.6908315565031983, 'recall': 0.8009888751545118, 'f1': 0.7418431597023468, 'number': 809} | {'precision': 0.24444444444444444, 'recall': 0.2773109243697479, 'f1': 0.25984251968503935, 'number': 119} | {'precision': 0.7829937998228521, 'recall': 0.8300469483568075, 'f1': 0.805834092980857, 'number': 1065} | 0.7107 | 0.7852 | 0.7461 | 0.8064 |
|
| 69 |
+
| 0.3232 | 11.0 | 110 | 0.6747 | {'precision': 0.6918976545842217, 'recall': 0.8022249690976514, 'f1': 0.7429879793932456, 'number': 809} | {'precision': 0.25161290322580643, 'recall': 0.3277310924369748, 'f1': 0.2846715328467153, 'number': 119} | {'precision': 0.7609797297297297, 'recall': 0.8460093896713615, 'f1': 0.8012449977767896, 'number': 1065} | 0.6978 | 0.7973 | 0.7443 | 0.8001 |
|
| 70 |
+
| 0.3028 | 12.0 | 120 | 0.6871 | {'precision': 0.700218818380744, 'recall': 0.7911001236093943, 'f1': 0.7428903076030179, 'number': 809} | {'precision': 0.25, 'recall': 0.31092436974789917, 'f1': 0.27715355805243447, 'number': 119} | {'precision': 0.7985611510791367, 'recall': 0.8338028169014085, 'f1': 0.8158015617822691, 'number': 1065} | 0.7199 | 0.7852 | 0.7511 | 0.8042 |
|
| 71 |
+
| 0.284 | 13.0 | 130 | 0.6905 | {'precision': 0.697524219590958, 'recall': 0.8009888751545118, 'f1': 0.7456846950517838, 'number': 809} | {'precision': 0.2602739726027397, 'recall': 0.31932773109243695, 'f1': 0.28679245283018867, 'number': 119} | {'precision': 0.7929203539823009, 'recall': 0.8413145539906103, 'f1': 0.8164009111617311, 'number': 1065} | 0.7175 | 0.7938 | 0.7537 | 0.8057 |
|
| 72 |
+
| 0.2666 | 14.0 | 140 | 0.6958 | {'precision': 0.6949516648764769, 'recall': 0.799752781211372, 'f1': 0.7436781609195402, 'number': 809} | {'precision': 0.2585034013605442, 'recall': 0.31932773109243695, 'f1': 0.2857142857142857, 'number': 119} | {'precision': 0.7904085257548845, 'recall': 0.8356807511737089, 'f1': 0.8124144226380648, 'number': 1065} | 0.7146 | 0.7903 | 0.7505 | 0.8040 |
|
| 73 |
+
| 0.2705 | 15.0 | 150 | 0.6953 | {'precision': 0.7040261153427638, 'recall': 0.799752781211372, 'f1': 0.7488425925925926, 'number': 809} | {'precision': 0.24516129032258063, 'recall': 0.31932773109243695, 'f1': 0.2773722627737226, 'number': 119} | {'precision': 0.7894273127753304, 'recall': 0.8413145539906103, 'f1': 0.8145454545454545, 'number': 1065} | 0.7157 | 0.7933 | 0.7525 | 0.8063 |
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
### Framework versions
|
| 77 |
+
|
| 78 |
+
- Transformers 4.41.2
|
| 79 |
+
- Pytorch 2.3.0+cu121
|
| 80 |
+
- Datasets 2.20.0
|
| 81 |
+
- Tokenizers 0.19.1
|
logs/events.out.tfevents.1719273795.ae49b29c4439.7028.1
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:fa189f90c91b412183980f15f2994851e3e89993abc7fb4453a8db82383b858b
|
| 3 |
+
size 15981
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_valid_processor_keys": [
|
| 3 |
+
"images",
|
| 4 |
+
"do_resize",
|
| 5 |
+
"size",
|
| 6 |
+
"resample",
|
| 7 |
+
"apply_ocr",
|
| 8 |
+
"ocr_lang",
|
| 9 |
+
"tesseract_config",
|
| 10 |
+
"return_tensors",
|
| 11 |
+
"data_format",
|
| 12 |
+
"input_data_format"
|
| 13 |
+
],
|
| 14 |
+
"apply_ocr": true,
|
| 15 |
+
"do_resize": true,
|
| 16 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
| 17 |
+
"ocr_lang": null,
|
| 18 |
+
"processor_class": "LayoutLMv2Processor",
|
| 19 |
+
"resample": 2,
|
| 20 |
+
"size": {
|
| 21 |
+
"height": 224,
|
| 22 |
+
"width": 224
|
| 23 |
+
},
|
| 24 |
+
"tesseract_config": ""
|
| 25 |
+
}
|
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
|
|
|