End of training
Browse files- README.md +79 -0
- logs/events.out.tfevents.1684833889.97d68b1e9c63.4236.0 +2 -2
- preprocessor_config.json +14 -0
- pytorch_model.bin +1 -1
- 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.7049
|
19 |
+
- Answer: {'precision': 0.7178051511758119, 'recall': 0.792336217552534, 'f1': 0.7532314923619271, 'number': 809}
|
20 |
+
- Header: {'precision': 0.2803030303030303, 'recall': 0.31092436974789917, 'f1': 0.29482071713147406, 'number': 119}
|
21 |
+
- Question: {'precision': 0.7570815450643776, 'recall': 0.828169014084507, 'f1': 0.7910313901345292, 'number': 1065}
|
22 |
+
- Overall Precision: 0.7123
|
23 |
+
- Overall Recall: 0.7827
|
24 |
+
- Overall F1: 0.7459
|
25 |
+
- Overall Accuracy: 0.8046
|
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.747 | 1.0 | 10 | 1.5873 | {'precision': 0.018205461638491547, 'recall': 0.0173053152039555, 'f1': 0.01774397972116603, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.19186046511627908, 'recall': 0.15492957746478872, 'f1': 0.17142857142857143, 'number': 1065} | 0.1099 | 0.0898 | 0.0988 | 0.3629 |
|
58 |
+
| 1.4357 | 2.0 | 20 | 1.2348 | {'precision': 0.2678787878787879, 'recall': 0.273176761433869, 'f1': 0.27050183598531213, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4725705329153605, 'recall': 0.5661971830985916, 'f1': 0.5151644596326356, 'number': 1065} | 0.3922 | 0.4134 | 0.4025 | 0.5730 |
|
59 |
+
| 1.0578 | 3.0 | 30 | 0.9336 | {'precision': 0.4918864097363083, 'recall': 0.5995055624227441, 'f1': 0.5403899721448469, 'number': 809} | {'precision': 0.027777777777777776, 'recall': 0.008403361344537815, 'f1': 0.012903225806451613, 'number': 119} | {'precision': 0.6016260162601627, 'recall': 0.6948356807511737, 'f1': 0.644880174291939, 'number': 1065} | 0.5444 | 0.6152 | 0.5776 | 0.7071 |
|
60 |
+
| 0.814 | 4.0 | 40 | 0.7665 | {'precision': 0.5914935707220573, 'recall': 0.7391841779975278, 'f1': 0.6571428571428571, 'number': 809} | {'precision': 0.14084507042253522, 'recall': 0.08403361344537816, 'f1': 0.10526315789473685, 'number': 119} | {'precision': 0.6415562913907285, 'recall': 0.7276995305164319, 'f1': 0.6819181698196215, 'number': 1065} | 0.6039 | 0.6939 | 0.6458 | 0.7567 |
|
61 |
+
| 0.6755 | 5.0 | 50 | 0.7183 | {'precision': 0.6652221018418202, 'recall': 0.7589616810877626, 'f1': 0.7090069284064666, 'number': 809} | {'precision': 0.2692307692307692, 'recall': 0.23529411764705882, 'f1': 0.25112107623318386, 'number': 119} | {'precision': 0.7006039689387403, 'recall': 0.7624413145539906, 'f1': 0.7302158273381295, 'number': 1065} | 0.6651 | 0.7296 | 0.6959 | 0.7844 |
|
62 |
+
| 0.5514 | 6.0 | 60 | 0.6832 | {'precision': 0.6699134199134199, 'recall': 0.765142150803461, 'f1': 0.7143681477207153, 'number': 809} | {'precision': 0.2625, 'recall': 0.17647058823529413, 'f1': 0.21105527638190955, 'number': 119} | {'precision': 0.7032, 'recall': 0.8253521126760563, 'f1': 0.7593952483801296, 'number': 1065} | 0.6739 | 0.7622 | 0.7153 | 0.7894 |
|
63 |
+
| 0.4846 | 7.0 | 70 | 0.6668 | {'precision': 0.6698513800424628, 'recall': 0.7799752781211372, 'f1': 0.7207310108509423, 'number': 809} | {'precision': 0.2773109243697479, 'recall': 0.2773109243697479, 'f1': 0.2773109243697479, 'number': 119} | {'precision': 0.719932716568545, 'recall': 0.8037558685446009, 'f1': 0.7595385980479148, 'number': 1065} | 0.6756 | 0.7627 | 0.7165 | 0.7922 |
|
64 |
+
| 0.4323 | 8.0 | 80 | 0.6610 | {'precision': 0.6934065934065934, 'recall': 0.7799752781211372, 'f1': 0.7341477603257708, 'number': 809} | {'precision': 0.3113207547169811, 'recall': 0.2773109243697479, 'f1': 0.2933333333333334, 'number': 119} | {'precision': 0.7377892030848329, 'recall': 0.8084507042253521, 'f1': 0.771505376344086, 'number': 1065} | 0.6986 | 0.7652 | 0.7304 | 0.7999 |
|
65 |
+
| 0.3889 | 9.0 | 90 | 0.6681 | {'precision': 0.7054871220604704, 'recall': 0.7787391841779975, 'f1': 0.7403055229142185, 'number': 809} | {'precision': 0.2975206611570248, 'recall': 0.3025210084033613, 'f1': 0.3, 'number': 119} | {'precision': 0.7395309882747069, 'recall': 0.8291079812206573, 'f1': 0.7817618415227978, 'number': 1065} | 0.7015 | 0.7772 | 0.7374 | 0.8046 |
|
66 |
+
| 0.3514 | 10.0 | 100 | 0.6881 | {'precision': 0.7018909899888766, 'recall': 0.7799752781211372, 'f1': 0.7388758782201406, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.3025210084033613, 'f1': 0.2938775510204082, 'number': 119} | {'precision': 0.7391304347826086, 'recall': 0.8300469483568075, 'f1': 0.7819548872180452, 'number': 1065} | 0.6983 | 0.7782 | 0.7361 | 0.7977 |
|
67 |
+
| 0.3179 | 11.0 | 110 | 0.6895 | {'precision': 0.6925566343042071, 'recall': 0.7935723114956736, 'f1': 0.73963133640553, 'number': 809} | {'precision': 0.3185840707964602, 'recall': 0.3025210084033613, 'f1': 0.3103448275862069, 'number': 119} | {'precision': 0.7578125, 'recall': 0.819718309859155, 'f1': 0.7875507442489851, 'number': 1065} | 0.7076 | 0.7782 | 0.7412 | 0.8011 |
|
68 |
+
| 0.3008 | 12.0 | 120 | 0.6971 | {'precision': 0.7183257918552036, 'recall': 0.7849196538936959, 'f1': 0.7501476668635558, 'number': 809} | {'precision': 0.2923076923076923, 'recall': 0.31932773109243695, 'f1': 0.3052208835341365, 'number': 119} | {'precision': 0.7574978577549272, 'recall': 0.8300469483568075, 'f1': 0.7921146953405018, 'number': 1065} | 0.7139 | 0.7812 | 0.7460 | 0.8036 |
|
69 |
+
| 0.2844 | 13.0 | 130 | 0.7024 | {'precision': 0.710352422907489, 'recall': 0.7972805933250927, 'f1': 0.751310425160163, 'number': 809} | {'precision': 0.2868217054263566, 'recall': 0.31092436974789917, 'f1': 0.2983870967741935, 'number': 119} | {'precision': 0.7601031814273431, 'recall': 0.8300469483568075, 'f1': 0.7935368043087971, 'number': 1065} | 0.7118 | 0.7858 | 0.7470 | 0.8027 |
|
70 |
+
| 0.2735 | 14.0 | 140 | 0.7061 | {'precision': 0.7136514983351832, 'recall': 0.7948084054388134, 'f1': 0.752046783625731, 'number': 809} | {'precision': 0.2824427480916031, 'recall': 0.31092436974789917, 'f1': 0.29600000000000004, 'number': 119} | {'precision': 0.7575236457437661, 'recall': 0.8272300469483568, 'f1': 0.7908438061041293, 'number': 1065} | 0.7112 | 0.7832 | 0.7455 | 0.8040 |
|
71 |
+
| 0.2676 | 15.0 | 150 | 0.7049 | {'precision': 0.7178051511758119, 'recall': 0.792336217552534, 'f1': 0.7532314923619271, 'number': 809} | {'precision': 0.2803030303030303, 'recall': 0.31092436974789917, 'f1': 0.29482071713147406, 'number': 119} | {'precision': 0.7570815450643776, 'recall': 0.828169014084507, 'f1': 0.7910313901345292, 'number': 1065} | 0.7123 | 0.7827 | 0.7459 | 0.8046 |
|
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.1684833889.97d68b1e9c63.4236.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:1435d4c03678ea67a0633df2f9d80ca549a35d7898233b7a0c2eef12d707423b
|
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 |
+
}
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 450608389
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a27969e2598183471deb32692f24b8f93ebeab844dbd4a5aea12f5e3ac0f4a68
|
3 |
size 450608389
|
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
|
|