End of training
Browse files- README.md +79 -0
- logs/events.out.tfevents.1685570128.909f6e96fe53.3967.0 +2 -2
- preprocessor_config.json +14 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +38 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- generated_from_trainer
|
| 4 |
+
datasets:
|
| 5 |
+
- funsd
|
| 6 |
+
model-index:
|
| 7 |
+
- name: layoutlm-funsd
|
| 8 |
+
results: []
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 12 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 13 |
+
|
| 14 |
+
# layoutlm-funsd
|
| 15 |
+
|
| 16 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
| 17 |
+
It achieves the following results on the evaluation set:
|
| 18 |
+
- Loss: 0.7053
|
| 19 |
+
- Answer: {'precision': 0.7111597374179431, 'recall': 0.8034610630407911, 'f1': 0.7544979686593152, 'number': 809}
|
| 20 |
+
- Header: {'precision': 0.3697478991596639, 'recall': 0.3697478991596639, 'f1': 0.3697478991596639, 'number': 119}
|
| 21 |
+
- Question: {'precision': 0.7862254025044723, 'recall': 0.8253521126760563, 'f1': 0.8053137883646359, 'number': 1065}
|
| 22 |
+
- Overall Precision: 0.7313
|
| 23 |
+
- Overall Recall: 0.7893
|
| 24 |
+
- Overall F1: 0.7592
|
| 25 |
+
- Overall Accuracy: 0.8115
|
| 26 |
+
|
| 27 |
+
## Model description
|
| 28 |
+
|
| 29 |
+
More information needed
|
| 30 |
+
|
| 31 |
+
## Intended uses & limitations
|
| 32 |
+
|
| 33 |
+
More information needed
|
| 34 |
+
|
| 35 |
+
## Training and evaluation data
|
| 36 |
+
|
| 37 |
+
More information needed
|
| 38 |
+
|
| 39 |
+
## Training procedure
|
| 40 |
+
|
| 41 |
+
### Training hyperparameters
|
| 42 |
+
|
| 43 |
+
The following hyperparameters were used during training:
|
| 44 |
+
- learning_rate: 3e-05
|
| 45 |
+
- train_batch_size: 16
|
| 46 |
+
- eval_batch_size: 8
|
| 47 |
+
- seed: 42
|
| 48 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 49 |
+
- lr_scheduler_type: linear
|
| 50 |
+
- num_epochs: 15
|
| 51 |
+
- mixed_precision_training: Native AMP
|
| 52 |
+
|
| 53 |
+
### Training results
|
| 54 |
+
|
| 55 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
| 56 |
+
|:-------------:|:-----:|:----:|:---------------:|:-------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
| 57 |
+
| 1.8129 | 1.0 | 10 | 1.6175 | {'precision': 0.024783147459727387, 'recall': 0.024721878862793572, 'f1': 0.02475247524752475, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.24563318777292575, 'recall': 0.2112676056338028, 'f1': 0.2271580010095911, 'number': 1065} | 0.1422 | 0.1229 | 0.1319 | 0.3619 |
|
| 58 |
+
| 1.4587 | 2.0 | 20 | 1.2242 | {'precision': 0.14423076923076922, 'recall': 0.12978986402966625, 'f1': 0.13662979830839295, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.45927075252133437, 'recall': 0.5558685446009389, 'f1': 0.5029736618521666, 'number': 1065} | 0.3456 | 0.3497 | 0.3476 | 0.5892 |
|
| 59 |
+
| 1.0781 | 3.0 | 30 | 0.9399 | {'precision': 0.4616252821670429, 'recall': 0.5055624227441285, 'f1': 0.4825958702064897, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5979381443298969, 'recall': 0.6535211267605634, 'f1': 0.6244952893674293, 'number': 1065} | 0.5300 | 0.5544 | 0.5419 | 0.6934 |
|
| 60 |
+
| 0.8159 | 4.0 | 40 | 0.7947 | {'precision': 0.5964912280701754, 'recall': 0.7144622991347342, 'f1': 0.6501687289088864, 'number': 809} | {'precision': 0.125, 'recall': 0.07563025210084033, 'f1': 0.09424083769633507, 'number': 119} | {'precision': 0.6864175022789426, 'recall': 0.7070422535211267, 'f1': 0.696577243293247, 'number': 1065} | 0.6268 | 0.6724 | 0.6488 | 0.7517 |
|
| 61 |
+
| 0.6615 | 5.0 | 50 | 0.7330 | {'precision': 0.6485042735042735, 'recall': 0.7503090234857849, 'f1': 0.695702005730659, 'number': 809} | {'precision': 0.28205128205128205, 'recall': 0.18487394957983194, 'f1': 0.2233502538071066, 'number': 119} | {'precision': 0.7291857273559011, 'recall': 0.748356807511737, 'f1': 0.7386468952734011, 'number': 1065} | 0.6768 | 0.7155 | 0.6956 | 0.7756 |
|
| 62 |
+
| 0.5414 | 6.0 | 60 | 0.6814 | {'precision': 0.6427850655903128, 'recall': 0.7873918417799752, 'f1': 0.7077777777777777, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.16806722689075632, 'f1': 0.21164021164021166, 'number': 119} | {'precision': 0.726039016115352, 'recall': 0.8037558685446009, 'f1': 0.7629233511586453, 'number': 1065} | 0.6754 | 0.7592 | 0.7149 | 0.7878 |
|
| 63 |
+
| 0.4787 | 7.0 | 70 | 0.6756 | {'precision': 0.6776947705442903, 'recall': 0.7849196538936959, 'f1': 0.7273768613974799, 'number': 809} | {'precision': 0.3402061855670103, 'recall': 0.2773109243697479, 'f1': 0.3055555555555556, 'number': 119} | {'precision': 0.7390557939914163, 'recall': 0.8084507042253521, 'f1': 0.7721973094170403, 'number': 1065} | 0.6953 | 0.7672 | 0.7295 | 0.8014 |
|
| 64 |
+
| 0.4379 | 8.0 | 80 | 0.6724 | {'precision': 0.6952695269526953, 'recall': 0.7812113720642769, 'f1': 0.7357392316647265, 'number': 809} | {'precision': 0.3448275862068966, 'recall': 0.25210084033613445, 'f1': 0.2912621359223301, 'number': 119} | {'precision': 0.7552264808362369, 'recall': 0.8140845070422535, 'f1': 0.7835517397198374, 'number': 1065} | 0.7132 | 0.7672 | 0.7392 | 0.8063 |
|
| 65 |
+
| 0.3864 | 9.0 | 90 | 0.6771 | {'precision': 0.6915584415584416, 'recall': 0.7898640296662547, 'f1': 0.7374495095210617, 'number': 809} | {'precision': 0.32142857142857145, 'recall': 0.3025210084033613, 'f1': 0.3116883116883117, 'number': 119} | {'precision': 0.7570573139435415, 'recall': 0.8309859154929577, 'f1': 0.792300805729633, 'number': 1065} | 0.7075 | 0.7827 | 0.7432 | 0.7962 |
|
| 66 |
+
| 0.3486 | 10.0 | 100 | 0.6774 | {'precision': 0.6862955032119914, 'recall': 0.792336217552534, 'f1': 0.7355134825014343, 'number': 809} | {'precision': 0.3557692307692308, 'recall': 0.31092436974789917, 'f1': 0.33183856502242154, 'number': 119} | {'precision': 0.7725284339457568, 'recall': 0.8291079812206573, 'f1': 0.7998188405797102, 'number': 1065} | 0.7157 | 0.7832 | 0.7480 | 0.8027 |
|
| 67 |
+
| 0.3138 | 11.0 | 110 | 0.6960 | {'precision': 0.6893203883495146, 'recall': 0.7898640296662547, 'f1': 0.7361751152073734, 'number': 809} | {'precision': 0.3619047619047619, 'recall': 0.31932773109243695, 'f1': 0.33928571428571425, 'number': 119} | {'precision': 0.7870619946091644, 'recall': 0.8225352112676056, 'f1': 0.8044077134986226, 'number': 1065} | 0.7240 | 0.7792 | 0.7506 | 0.8066 |
|
| 68 |
+
| 0.303 | 12.0 | 120 | 0.6989 | {'precision': 0.6927194860813705, 'recall': 0.799752781211372, 'f1': 0.7423981640849111, 'number': 809} | {'precision': 0.3783783783783784, 'recall': 0.35294117647058826, 'f1': 0.3652173913043478, 'number': 119} | {'precision': 0.7902350813743219, 'recall': 0.8206572769953052, 'f1': 0.8051589129433441, 'number': 1065} | 0.7266 | 0.7842 | 0.7543 | 0.8054 |
|
| 69 |
+
| 0.2823 | 13.0 | 130 | 0.7023 | {'precision': 0.7027322404371584, 'recall': 0.7948084054388134, 'f1': 0.7459396751740139, 'number': 809} | {'precision': 0.36134453781512604, 'recall': 0.36134453781512604, 'f1': 0.36134453781512604, 'number': 119} | {'precision': 0.7818343722172751, 'recall': 0.8244131455399061, 'f1': 0.8025594149908593, 'number': 1065} | 0.7251 | 0.7847 | 0.7537 | 0.8080 |
|
| 70 |
+
| 0.2707 | 14.0 | 140 | 0.7048 | {'precision': 0.7040261153427638, 'recall': 0.799752781211372, 'f1': 0.7488425925925926, 'number': 809} | {'precision': 0.35833333333333334, 'recall': 0.36134453781512604, 'f1': 0.35983263598326365, 'number': 119} | {'precision': 0.7774822695035462, 'recall': 0.8234741784037559, 'f1': 0.7998176014591885, 'number': 1065} | 0.7231 | 0.7863 | 0.7534 | 0.8094 |
|
| 71 |
+
| 0.2678 | 15.0 | 150 | 0.7053 | {'precision': 0.7111597374179431, 'recall': 0.8034610630407911, 'f1': 0.7544979686593152, 'number': 809} | {'precision': 0.3697478991596639, 'recall': 0.3697478991596639, 'f1': 0.3697478991596639, 'number': 119} | {'precision': 0.7862254025044723, 'recall': 0.8253521126760563, 'f1': 0.8053137883646359, 'number': 1065} | 0.7313 | 0.7893 | 0.7592 | 0.8115 |
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
### Framework versions
|
| 75 |
+
|
| 76 |
+
- Transformers 4.28.0
|
| 77 |
+
- Pytorch 2.0.1+cu118
|
| 78 |
+
- Datasets 2.12.0
|
| 79 |
+
- Tokenizers 0.13.3
|
logs/events.out.tfevents.1685570128.909f6e96fe53.3967.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:1624fd3cf6537f53abba14933139320026fbdedbea554e6bce65468d98f898df
|
| 3 |
+
size 14372
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"apply_ocr": true,
|
| 3 |
+
"do_resize": true,
|
| 4 |
+
"feature_extractor_type": "LayoutLMv2FeatureExtractor",
|
| 5 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
| 6 |
+
"ocr_lang": null,
|
| 7 |
+
"processor_class": "LayoutLMv2Processor",
|
| 8 |
+
"resample": 2,
|
| 9 |
+
"size": {
|
| 10 |
+
"height": 224,
|
| 11 |
+
"width": 224
|
| 12 |
+
},
|
| 13 |
+
"tesseract_config": ""
|
| 14 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": null,
|
| 3 |
+
"apply_ocr": false,
|
| 4 |
+
"clean_up_tokenization_spaces": true,
|
| 5 |
+
"cls_token": "[CLS]",
|
| 6 |
+
"cls_token_box": [
|
| 7 |
+
0,
|
| 8 |
+
0,
|
| 9 |
+
0,
|
| 10 |
+
0
|
| 11 |
+
],
|
| 12 |
+
"do_basic_tokenize": true,
|
| 13 |
+
"do_lower_case": true,
|
| 14 |
+
"mask_token": "[MASK]",
|
| 15 |
+
"model_max_length": 512,
|
| 16 |
+
"never_split": null,
|
| 17 |
+
"only_label_first_subword": true,
|
| 18 |
+
"pad_token": "[PAD]",
|
| 19 |
+
"pad_token_box": [
|
| 20 |
+
0,
|
| 21 |
+
0,
|
| 22 |
+
0,
|
| 23 |
+
0
|
| 24 |
+
],
|
| 25 |
+
"pad_token_label": -100,
|
| 26 |
+
"processor_class": "LayoutLMv2Processor",
|
| 27 |
+
"sep_token": "[SEP]",
|
| 28 |
+
"sep_token_box": [
|
| 29 |
+
1000,
|
| 30 |
+
1000,
|
| 31 |
+
1000,
|
| 32 |
+
1000
|
| 33 |
+
],
|
| 34 |
+
"strip_accents": null,
|
| 35 |
+
"tokenize_chinese_chars": true,
|
| 36 |
+
"tokenizer_class": "LayoutLMv2Tokenizer",
|
| 37 |
+
"unk_token": "[UNK]"
|
| 38 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|