martin-roman
commited on
Commit
•
f3702fe
1
Parent(s):
38f0a04
End of training
Browse files- README.md +78 -0
- logs/events.out.tfevents.1673454576.Martins-MacBook-Pro-2.local.94814.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 +39 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.6724
|
19 |
+
- Answer: {'precision': 0.7072368421052632, 'recall': 0.7972805933250927, 'f1': 0.7495642068564788, 'number': 809}
|
20 |
+
- Header: {'precision': 0.3333333333333333, 'recall': 0.3697478991596639, 'f1': 0.350597609561753, 'number': 119}
|
21 |
+
- Question: {'precision': 0.7901785714285714, 'recall': 0.8309859154929577, 'f1': 0.8100686498855836, 'number': 1065}
|
22 |
+
- Overall Precision: 0.7274
|
23 |
+
- Overall Recall: 0.7898
|
24 |
+
- Overall F1: 0.7573
|
25 |
+
- Overall Accuracy: 0.8170
|
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 |
+
|
52 |
+
### Training results
|
53 |
+
|
54 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
55 |
+
|:-------------:|:-----:|:----:|:---------------:|:------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
56 |
+
| 1.7705 | 1.0 | 10 | 1.5739 | {'precision': 0.010057471264367816, 'recall': 0.00865265760197775, 'f1': 0.00930232558139535, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.26591760299625467, 'recall': 0.13333333333333333, 'f1': 0.17761100687929957, 'number': 1065} | 0.1211 | 0.0748 | 0.0925 | 0.3598 |
|
57 |
+
| 1.4468 | 2.0 | 20 | 1.2327 | {'precision': 0.25151148730350664, 'recall': 0.25710754017305315, 'f1': 0.2542787286063569, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4251316779533484, 'recall': 0.5305164319248826, 'f1': 0.4720133667502089, 'number': 1065} | 0.3585 | 0.3879 | 0.3726 | 0.5921 |
|
58 |
+
| 1.1103 | 3.0 | 30 | 0.9608 | {'precision': 0.4880694143167028, 'recall': 0.5562422744128553, 'f1': 0.5199306759098786, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5613598673300166, 'recall': 0.6356807511737089, 'f1': 0.5962131219726994, 'number': 1065} | 0.5257 | 0.5655 | 0.5448 | 0.7058 |
|
59 |
+
| 0.8476 | 4.0 | 40 | 0.7875 | {'precision': 0.5821325648414986, 'recall': 0.7490729295426453, 'f1': 0.6551351351351351, 'number': 809} | {'precision': 0.1702127659574468, 'recall': 0.06722689075630252, 'f1': 0.09638554216867469, 'number': 119} | {'precision': 0.6254071661237784, 'recall': 0.7211267605633803, 'f1': 0.6698648059310947, 'number': 1065} | 0.5967 | 0.6934 | 0.6414 | 0.7538 |
|
60 |
+
| 0.6698 | 5.0 | 50 | 0.6948 | {'precision': 0.6421923474663909, 'recall': 0.7676143386897404, 'f1': 0.6993243243243243, 'number': 809} | {'precision': 0.3424657534246575, 'recall': 0.21008403361344538, 'f1': 0.2604166666666667, 'number': 119} | {'precision': 0.6873977086743044, 'recall': 0.7887323943661971, 'f1': 0.7345867949278532, 'number': 1065} | 0.6569 | 0.7456 | 0.6985 | 0.7860 |
|
61 |
+
| 0.554 | 6.0 | 60 | 0.6717 | {'precision': 0.6506410256410257, 'recall': 0.7527812113720643, 'f1': 0.6979942693409743, 'number': 809} | {'precision': 0.3448275862068966, 'recall': 0.25210084033613445, 'f1': 0.2912621359223301, 'number': 119} | {'precision': 0.716821639898563, 'recall': 0.7962441314553991, 'f1': 0.7544483985765124, 'number': 1065} | 0.6741 | 0.7461 | 0.7083 | 0.7920 |
|
62 |
+
| 0.4787 | 7.0 | 70 | 0.6462 | {'precision': 0.6666666666666666, 'recall': 0.7935723114956736, 'f1': 0.7246049661399547, 'number': 809} | {'precision': 0.3017241379310345, 'recall': 0.29411764705882354, 'f1': 0.29787234042553185, 'number': 119} | {'precision': 0.7368421052631579, 'recall': 0.8018779342723005, 'f1': 0.7679856115107914, 'number': 1065} | 0.6841 | 0.7682 | 0.7237 | 0.8038 |
|
63 |
+
| 0.4182 | 8.0 | 80 | 0.6516 | {'precision': 0.6790890269151139, 'recall': 0.8108776266996292, 'f1': 0.7391549295774646, 'number': 809} | {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119} | {'precision': 0.7450643776824034, 'recall': 0.8150234741784037, 'f1': 0.77847533632287, 'number': 1065} | 0.6949 | 0.7817 | 0.7358 | 0.8025 |
|
64 |
+
| 0.3877 | 9.0 | 90 | 0.6652 | {'precision': 0.6976744186046512, 'recall': 0.7787391841779975, 'f1': 0.7359813084112149, 'number': 809} | {'precision': 0.3194444444444444, 'recall': 0.3865546218487395, 'f1': 0.34980988593155893, 'number': 119} | {'precision': 0.7573913043478261, 'recall': 0.8178403755868544, 'f1': 0.7864559819413092, 'number': 1065} | 0.7041 | 0.7762 | 0.7384 | 0.8094 |
|
65 |
+
| 0.3483 | 10.0 | 100 | 0.6568 | {'precision': 0.6876332622601279, 'recall': 0.7972805933250927, 'f1': 0.7384087006296507, 'number': 809} | {'precision': 0.3225806451612903, 'recall': 0.33613445378151263, 'f1': 0.3292181069958848, 'number': 119} | {'precision': 0.7650602409638554, 'recall': 0.8347417840375587, 'f1': 0.7983834755276155, 'number': 1065} | 0.7077 | 0.7898 | 0.7465 | 0.8151 |
|
66 |
+
| 0.3136 | 11.0 | 110 | 0.6698 | {'precision': 0.7006507592190889, 'recall': 0.7985166872682324, 'f1': 0.7463893703061815, 'number': 809} | {'precision': 0.3247863247863248, 'recall': 0.31932773109243695, 'f1': 0.3220338983050848, 'number': 119} | {'precision': 0.7803365810451727, 'recall': 0.8272300469483568, 'f1': 0.8030993618960802, 'number': 1065} | 0.7219 | 0.7852 | 0.7522 | 0.8084 |
|
67 |
+
| 0.3044 | 12.0 | 120 | 0.6667 | {'precision': 0.7058177826564215, 'recall': 0.7948084054388134, 'f1': 0.7476744186046511, 'number': 809} | {'precision': 0.34328358208955223, 'recall': 0.3865546218487395, 'f1': 0.36363636363636365, 'number': 119} | {'precision': 0.785204991087344, 'recall': 0.8272300469483568, 'f1': 0.8056698673982624, 'number': 1065} | 0.7245 | 0.7878 | 0.7548 | 0.8138 |
|
68 |
+
| 0.2853 | 13.0 | 130 | 0.6699 | {'precision': 0.702819956616052, 'recall': 0.8009888751545118, 'f1': 0.7487001733102253, 'number': 809} | {'precision': 0.3442622950819672, 'recall': 0.35294117647058826, 'f1': 0.3485477178423237, 'number': 119} | {'precision': 0.7857769973661106, 'recall': 0.8403755868544601, 'f1': 0.8121597096188747, 'number': 1065} | 0.7261 | 0.7953 | 0.7591 | 0.8136 |
|
69 |
+
| 0.278 | 14.0 | 140 | 0.6716 | {'precision': 0.7009750812567714, 'recall': 0.799752781211372, 'f1': 0.7471131639722863, 'number': 809} | {'precision': 0.3233082706766917, 'recall': 0.36134453781512604, 'f1': 0.3412698412698413, 'number': 119} | {'precision': 0.7873665480427047, 'recall': 0.8309859154929577, 'f1': 0.808588396528095, 'number': 1065} | 0.7225 | 0.7903 | 0.7549 | 0.8154 |
|
70 |
+
| 0.2672 | 15.0 | 150 | 0.6724 | {'precision': 0.7072368421052632, 'recall': 0.7972805933250927, 'f1': 0.7495642068564788, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.3697478991596639, 'f1': 0.350597609561753, 'number': 119} | {'precision': 0.7901785714285714, 'recall': 0.8309859154929577, 'f1': 0.8100686498855836, 'number': 1065} | 0.7274 | 0.7898 | 0.7573 | 0.8170 |
|
71 |
+
|
72 |
+
|
73 |
+
### Framework versions
|
74 |
+
|
75 |
+
- Transformers 4.25.1
|
76 |
+
- Pytorch 1.9.0
|
77 |
+
- Datasets 2.8.0
|
78 |
+
- Tokenizers 0.13.2
|
logs/events.out.tfevents.1673454576.Martins-MacBook-Pro-2.local.94814.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:ab449c16112dc615fab1f698d52adc4f66b4d9e4cae86cdf542e3948ca3328f1
|
3 |
+
size 14129
|
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 450603685
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4300637404c2dc49709c1483ccd7add5b8da35d57eda87c52f6bb2513ee2115a
|
3 |
size 450603685
|
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,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": null,
|
3 |
+
"apply_ocr": false,
|
4 |
+
"cls_token": "[CLS]",
|
5 |
+
"cls_token_box": [
|
6 |
+
0,
|
7 |
+
0,
|
8 |
+
0,
|
9 |
+
0
|
10 |
+
],
|
11 |
+
"do_basic_tokenize": true,
|
12 |
+
"do_lower_case": true,
|
13 |
+
"mask_token": "[MASK]",
|
14 |
+
"model_max_length": 512,
|
15 |
+
"name_or_path": "microsoft/layoutlmv2-base-uncased",
|
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 |
+
"special_tokens_map_file": null,
|
35 |
+
"strip_accents": null,
|
36 |
+
"tokenize_chinese_chars": true,
|
37 |
+
"tokenizer_class": "LayoutLMv2Tokenizer",
|
38 |
+
"unk_token": "[UNK]"
|
39 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|