End of training
Browse files- README.md +82 -0
- logs/events.out.tfevents.1725956688.layout-20240908-075832.34556.1 +2 -2
- model.safetensors +1 -1
- 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,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: mit
|
| 4 |
+
base_model: microsoft/layoutlm-base-uncased
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
datasets:
|
| 8 |
+
- funsd
|
| 9 |
+
model-index:
|
| 10 |
+
- name: layoutlm-funsd
|
| 11 |
+
results: []
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
+
|
| 17 |
+
# layoutlm-funsd
|
| 18 |
+
|
| 19 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
| 20 |
+
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 0.7672
|
| 22 |
+
- Answer: {'precision': 0.7376681614349776, 'recall': 0.8133498145859085, 'f1': 0.7736625514403291, 'number': 809}
|
| 23 |
+
- Header: {'precision': 0.37857142857142856, 'recall': 0.44537815126050423, 'f1': 0.4092664092664093, 'number': 119}
|
| 24 |
+
- Question: {'precision': 0.8122109158186864, 'recall': 0.8244131455399061, 'f1': 0.8182665424044735, 'number': 1065}
|
| 25 |
+
- Overall Precision: 0.7520
|
| 26 |
+
- Overall Recall: 0.7973
|
| 27 |
+
- Overall F1: 0.7740
|
| 28 |
+
- Overall Accuracy: 0.8111
|
| 29 |
+
|
| 30 |
+
## Model description
|
| 31 |
+
|
| 32 |
+
More information needed
|
| 33 |
+
|
| 34 |
+
## Intended uses & limitations
|
| 35 |
+
|
| 36 |
+
More information needed
|
| 37 |
+
|
| 38 |
+
## Training and evaluation data
|
| 39 |
+
|
| 40 |
+
More information needed
|
| 41 |
+
|
| 42 |
+
## Training procedure
|
| 43 |
+
|
| 44 |
+
### Training hyperparameters
|
| 45 |
+
|
| 46 |
+
The following hyperparameters were used during training:
|
| 47 |
+
- learning_rate: 3e-05
|
| 48 |
+
- train_batch_size: 8
|
| 49 |
+
- eval_batch_size: 8
|
| 50 |
+
- seed: 42
|
| 51 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 52 |
+
- lr_scheduler_type: linear
|
| 53 |
+
- num_epochs: 15
|
| 54 |
+
- mixed_precision_training: Native AMP
|
| 55 |
+
|
| 56 |
+
### Training results
|
| 57 |
+
|
| 58 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
| 59 |
+
|:-------------:|:-----:|:----:|:---------------:|:----------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
| 60 |
+
| 1.6896 | 1.0 | 19 | 1.4068 | {'precision': 0.0572737686139748, 'recall': 0.06180469715698393, 'f1': 0.05945303210463733, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4044834307992203, 'recall': 0.38967136150234744, 'f1': 0.3969392635102822, 'number': 1065} | 0.2449 | 0.2333 | 0.2390 | 0.4540 |
|
| 61 |
+
| 1.1462 | 2.0 | 38 | 0.8626 | {'precision': 0.5445075757575758, 'recall': 0.7107540173053152, 'f1': 0.6166219839142091, 'number': 809} | {'precision': 0.04878048780487805, 'recall': 0.01680672268907563, 'f1': 0.025, 'number': 119} | {'precision': 0.6331615120274914, 'recall': 0.692018779342723, 'f1': 0.661283086585913, 'number': 1065} | 0.5812 | 0.6593 | 0.6178 | 0.7285 |
|
| 62 |
+
| 0.7687 | 3.0 | 57 | 0.7051 | {'precision': 0.6217264791464597, 'recall': 0.792336217552534, 'f1': 0.6967391304347825, 'number': 809} | {'precision': 0.18421052631578946, 'recall': 0.11764705882352941, 'f1': 0.14358974358974358, 'number': 119} | {'precision': 0.6805084745762712, 'recall': 0.7539906103286385, 'f1': 0.7153674832962139, 'number': 1065} | 0.6375 | 0.7316 | 0.6813 | 0.7678 |
|
| 63 |
+
| 0.5961 | 4.0 | 76 | 0.6423 | {'precision': 0.6527918781725889, 'recall': 0.7948084054388134, 'f1': 0.7168338907469342, 'number': 809} | {'precision': 0.26785714285714285, 'recall': 0.25210084033613445, 'f1': 0.2597402597402597, 'number': 119} | {'precision': 0.7100949094046591, 'recall': 0.7727699530516432, 'f1': 0.7401079136690648, 'number': 1065} | 0.6631 | 0.7506 | 0.7042 | 0.7923 |
|
| 64 |
+
| 0.4739 | 5.0 | 95 | 0.6263 | {'precision': 0.7024972855591748, 'recall': 0.799752781211372, 'f1': 0.7479768786127167, 'number': 809} | {'precision': 0.33070866141732286, 'recall': 0.35294117647058826, 'f1': 0.34146341463414637, 'number': 119} | {'precision': 0.7435897435897436, 'recall': 0.8169014084507042, 'f1': 0.778523489932886, 'number': 1065} | 0.7029 | 0.7822 | 0.7404 | 0.8059 |
|
| 65 |
+
| 0.3893 | 6.0 | 114 | 0.6456 | {'precision': 0.6912681912681913, 'recall': 0.8220024721878862, 'f1': 0.7509881422924901, 'number': 809} | {'precision': 0.28169014084507044, 'recall': 0.33613445378151263, 'f1': 0.30651340996168586, 'number': 119} | {'precision': 0.768270944741533, 'recall': 0.8093896713615023, 'f1': 0.7882944673068131, 'number': 1065} | 0.7040 | 0.7863 | 0.7428 | 0.8050 |
|
| 66 |
+
| 0.3267 | 7.0 | 133 | 0.6813 | {'precision': 0.7297605473204105, 'recall': 0.7911001236093943, 'f1': 0.7591933570581256, 'number': 809} | {'precision': 0.33070866141732286, 'recall': 0.35294117647058826, 'f1': 0.34146341463414637, 'number': 119} | {'precision': 0.7810283687943262, 'recall': 0.8272300469483568, 'f1': 0.8034655722754217, 'number': 1065} | 0.7331 | 0.7842 | 0.7578 | 0.8019 |
|
| 67 |
+
| 0.2731 | 8.0 | 152 | 0.6628 | {'precision': 0.7153846153846154, 'recall': 0.8046971569839307, 'f1': 0.7574171029668412, 'number': 809} | {'precision': 0.3697478991596639, 'recall': 0.3697478991596639, 'f1': 0.3697478991596639, 'number': 119} | {'precision': 0.7877145438121048, 'recall': 0.8187793427230047, 'f1': 0.8029465930018417, 'number': 1065} | 0.7336 | 0.7863 | 0.7590 | 0.8137 |
|
| 68 |
+
| 0.2425 | 9.0 | 171 | 0.6992 | {'precision': 0.7209302325581395, 'recall': 0.8046971569839307, 'f1': 0.7605140186915887, 'number': 809} | {'precision': 0.3851851851851852, 'recall': 0.4369747899159664, 'f1': 0.4094488188976378, 'number': 119} | {'precision': 0.801980198019802, 'recall': 0.8366197183098592, 'f1': 0.8189338235294118, 'number': 1065} | 0.7417 | 0.7998 | 0.7697 | 0.8104 |
|
| 69 |
+
| 0.2145 | 10.0 | 190 | 0.7271 | {'precision': 0.7373167981961668, 'recall': 0.8084054388133498, 'f1': 0.7712264150943396, 'number': 809} | {'precision': 0.36075949367088606, 'recall': 0.4789915966386555, 'f1': 0.41155234657039713, 'number': 119} | {'precision': 0.8250950570342205, 'recall': 0.8150234741784037, 'f1': 0.8200283419933868, 'number': 1065} | 0.7530 | 0.7923 | 0.7721 | 0.8047 |
|
| 70 |
+
| 0.1882 | 11.0 | 209 | 0.7348 | {'precision': 0.7400681044267877, 'recall': 0.8059332509270705, 'f1': 0.7715976331360946, 'number': 809} | {'precision': 0.375, 'recall': 0.453781512605042, 'f1': 0.4106463878326997, 'number': 119} | {'precision': 0.8254716981132075, 'recall': 0.8215962441314554, 'f1': 0.8235294117647057, 'number': 1065} | 0.7583 | 0.7933 | 0.7754 | 0.8103 |
|
| 71 |
+
| 0.1668 | 12.0 | 228 | 0.7541 | {'precision': 0.7360178970917226, 'recall': 0.8133498145859085, 'f1': 0.7727539635936582, 'number': 809} | {'precision': 0.3984375, 'recall': 0.42857142857142855, 'f1': 0.41295546558704455, 'number': 119} | {'precision': 0.8007246376811594, 'recall': 0.8300469483568075, 'f1': 0.8151221761180267, 'number': 1065} | 0.7493 | 0.7993 | 0.7735 | 0.8097 |
|
| 72 |
+
| 0.1595 | 13.0 | 247 | 0.7616 | {'precision': 0.7370786516853932, 'recall': 0.8108776266996292, 'f1': 0.7722189523248971, 'number': 809} | {'precision': 0.38345864661654133, 'recall': 0.42857142857142855, 'f1': 0.4047619047619047, 'number': 119} | {'precision': 0.8153988868274582, 'recall': 0.8253521126760563, 'f1': 0.8203453103126458, 'number': 1065} | 0.7549 | 0.7958 | 0.7748 | 0.8122 |
|
| 73 |
+
| 0.1451 | 14.0 | 266 | 0.7638 | {'precision': 0.7361894024802705, 'recall': 0.8071693448702101, 'f1': 0.7700471698113207, 'number': 809} | {'precision': 0.375886524822695, 'recall': 0.44537815126050423, 'f1': 0.40769230769230774, 'number': 119} | {'precision': 0.8150557620817844, 'recall': 0.8234741784037559, 'f1': 0.8192433442316676, 'number': 1065} | 0.7524 | 0.7943 | 0.7728 | 0.8110 |
|
| 74 |
+
| 0.1449 | 15.0 | 285 | 0.7672 | {'precision': 0.7376681614349776, 'recall': 0.8133498145859085, 'f1': 0.7736625514403291, 'number': 809} | {'precision': 0.37857142857142856, 'recall': 0.44537815126050423, 'f1': 0.4092664092664093, 'number': 119} | {'precision': 0.8122109158186864, 'recall': 0.8244131455399061, 'f1': 0.8182665424044735, 'number': 1065} | 0.7520 | 0.7973 | 0.7740 | 0.8111 |
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
### Framework versions
|
| 78 |
+
|
| 79 |
+
- Transformers 4.44.2
|
| 80 |
+
- Pytorch 2.4.1+cu121
|
| 81 |
+
- Datasets 2.21.0
|
| 82 |
+
- Tokenizers 0.19.1
|
logs/events.out.tfevents.1725956688.layout-20240908-075832.34556.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:4c667de16be05639a041de522bbd9f535d0dac8a8160958d4632298b12fd1a6c
|
| 3 |
+
size 16157
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 450558212
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7eddc7a4974e5a3e1ad82d6c717392f47876236d0a3e61ee69d10b599c345e96
|
| 3 |
size 450558212
|
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
|
|
|