End of training
Browse files- README.md +79 -0
- logs/events.out.tfevents.1673531211.04f7d8001f2b.1574.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,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- generated_from_trainer
|
4 |
+
datasets:
|
5 |
+
- funsd
|
6 |
+
model-index:
|
7 |
+
- name: layoutlm-finetuned-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-finetuned-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.6806
|
19 |
+
- Answer: {'precision': 0.7069154774972558, 'recall': 0.796044499381953, 'f1': 0.7488372093023256, 'number': 809}
|
20 |
+
- Header: {'precision': 0.36752136752136755, 'recall': 0.36134453781512604, 'f1': 0.3644067796610169, 'number': 119}
|
21 |
+
- Question: {'precision': 0.7866549604916594, 'recall': 0.8413145539906103, 'f1': 0.8130671506352087, 'number': 1065}
|
22 |
+
- Overall Precision: 0.7305
|
23 |
+
- Overall Recall: 0.7943
|
24 |
+
- Overall F1: 0.7611
|
25 |
+
- Overall Accuracy: 0.8085
|
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.8023 | 1.0 | 10 | 1.6152 | {'precision': 0.009448818897637795, 'recall': 0.007416563658838072, 'f1': 0.008310249307479225, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.12998266897746968, 'recall': 0.07042253521126761, 'f1': 0.09135200974421437, 'number': 1065} | 0.0668 | 0.0406 | 0.0505 | 0.3276 |
|
58 |
+
| 1.4614 | 2.0 | 20 | 1.2547 | {'precision': 0.2211253701875617, 'recall': 0.276885043263288, 'f1': 0.24588364434687154, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.43353028064992616, 'recall': 0.5511737089201878, 'f1': 0.4853245142620918, 'number': 1065} | 0.3420 | 0.4069 | 0.3717 | 0.5926 |
|
59 |
+
| 1.0795 | 3.0 | 30 | 0.9150 | {'precision': 0.49837486457204766, 'recall': 0.5686032138442522, 'f1': 0.5311778290993071, 'number': 809} | {'precision': 0.04081632653061224, 'recall': 0.01680672268907563, 'f1': 0.023809523809523808, 'number': 119} | {'precision': 0.5953338696701529, 'recall': 0.6948356807511737, 'f1': 0.6412478336221837, 'number': 1065} | 0.5427 | 0.6031 | 0.5713 | 0.7145 |
|
60 |
+
| 0.8025 | 4.0 | 40 | 0.7686 | {'precision': 0.6056622851365016, 'recall': 0.7404202719406675, 'f1': 0.6662958843159066, 'number': 809} | {'precision': 0.10975609756097561, 'recall': 0.07563025210084033, 'f1': 0.08955223880597014, 'number': 119} | {'precision': 0.6737400530503979, 'recall': 0.7154929577464789, 'f1': 0.6939890710382515, 'number': 1065} | 0.6222 | 0.6874 | 0.6532 | 0.7506 |
|
61 |
+
| 0.6638 | 5.0 | 50 | 0.7034 | {'precision': 0.644535240040858, 'recall': 0.7799752781211372, 'f1': 0.7058165548098434, 'number': 809} | {'precision': 0.23711340206185566, 'recall': 0.19327731092436976, 'f1': 0.21296296296296294, 'number': 119} | {'precision': 0.7158992180712423, 'recall': 0.7737089201877935, 'f1': 0.7436823104693141, 'number': 1065} | 0.6637 | 0.7416 | 0.7005 | 0.7841 |
|
62 |
+
| 0.5567 | 6.0 | 60 | 0.6784 | {'precision': 0.6687435098650052, 'recall': 0.796044499381953, 'f1': 0.7268623024830699, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.2184873949579832, 'f1': 0.24761904761904763, 'number': 119} | {'precision': 0.7160392798690671, 'recall': 0.8215962441314554, 'f1': 0.765194578049847, 'number': 1065} | 0.6788 | 0.7752 | 0.7238 | 0.7903 |
|
63 |
+
| 0.4925 | 7.0 | 70 | 0.6815 | {'precision': 0.6839779005524862, 'recall': 0.765142150803461, 'f1': 0.7222870478413069, 'number': 809} | {'precision': 0.2894736842105263, 'recall': 0.2773109243697479, 'f1': 0.2832618025751073, 'number': 119} | {'precision': 0.7233169129720853, 'recall': 0.8272300469483568, 'f1': 0.7717915024091108, 'number': 1065} | 0.6853 | 0.7692 | 0.7248 | 0.7913 |
|
64 |
+
| 0.4494 | 8.0 | 80 | 0.6765 | {'precision': 0.6962305986696231, 'recall': 0.7762669962917181, 'f1': 0.734073641145529, 'number': 809} | {'precision': 0.28, 'recall': 0.29411764705882354, 'f1': 0.28688524590163933, 'number': 119} | {'precision': 0.7360066833751044, 'recall': 0.8272300469483568, 'f1': 0.7789566755083996, 'number': 1065} | 0.6942 | 0.7747 | 0.7323 | 0.8004 |
|
65 |
+
| 0.3986 | 9.0 | 90 | 0.6587 | {'precision': 0.7077777777777777, 'recall': 0.7873918417799752, 'f1': 0.7454651843183148, 'number': 809} | {'precision': 0.3274336283185841, 'recall': 0.31092436974789917, 'f1': 0.3189655172413793, 'number': 119} | {'precision': 0.7487266553480475, 'recall': 0.828169014084507, 'f1': 0.7864467231386535, 'number': 1065} | 0.7102 | 0.7807 | 0.7438 | 0.8019 |
|
66 |
+
| 0.3597 | 10.0 | 100 | 0.6607 | {'precision': 0.7054945054945055, 'recall': 0.7935723114956736, 'f1': 0.7469458987783596, 'number': 809} | {'precision': 0.3305084745762712, 'recall': 0.3277310924369748, 'f1': 0.32911392405063294, 'number': 119} | {'precision': 0.7600685518423308, 'recall': 0.8328638497652582, 'f1': 0.7948028673835125, 'number': 1065} | 0.7144 | 0.7868 | 0.7488 | 0.8048 |
|
67 |
+
| 0.3266 | 11.0 | 110 | 0.6751 | {'precision': 0.7050279329608938, 'recall': 0.7799752781211372, 'f1': 0.7406103286384977, 'number': 809} | {'precision': 0.3684210526315789, 'recall': 0.35294117647058826, 'f1': 0.3605150214592275, 'number': 119} | {'precision': 0.7711571675302246, 'recall': 0.8384976525821596, 'f1': 0.8034188034188035, 'number': 1065} | 0.7227 | 0.7858 | 0.7529 | 0.8056 |
|
68 |
+
| 0.3103 | 12.0 | 120 | 0.6799 | {'precision': 0.7047413793103449, 'recall': 0.8084054388133498, 'f1': 0.7530224525043179, 'number': 809} | {'precision': 0.3474576271186441, 'recall': 0.3445378151260504, 'f1': 0.3459915611814346, 'number': 119} | {'precision': 0.7799295774647887, 'recall': 0.831924882629108, 'f1': 0.8050885960926851, 'number': 1065} | 0.7246 | 0.7933 | 0.7574 | 0.8034 |
|
69 |
+
| 0.2893 | 13.0 | 130 | 0.6773 | {'precision': 0.7191392978482446, 'recall': 0.7849196538936959, 'f1': 0.7505910165484633, 'number': 809} | {'precision': 0.35833333333333334, 'recall': 0.36134453781512604, 'f1': 0.35983263598326365, 'number': 119} | {'precision': 0.7861524978089395, 'recall': 0.8422535211267606, 'f1': 0.8132366273798729, 'number': 1065} | 0.7346 | 0.7903 | 0.7614 | 0.8050 |
|
70 |
+
| 0.2743 | 14.0 | 140 | 0.6788 | {'precision': 0.7063318777292577, 'recall': 0.799752781211372, 'f1': 0.750144927536232, 'number': 809} | {'precision': 0.37168141592920356, 'recall': 0.35294117647058826, 'f1': 0.36206896551724144, 'number': 119} | {'precision': 0.7879858657243817, 'recall': 0.8375586854460094, 'f1': 0.812016385980883, 'number': 1065} | 0.7316 | 0.7933 | 0.7612 | 0.8085 |
|
71 |
+
| 0.2756 | 15.0 | 150 | 0.6806 | {'precision': 0.7069154774972558, 'recall': 0.796044499381953, 'f1': 0.7488372093023256, 'number': 809} | {'precision': 0.36752136752136755, 'recall': 0.36134453781512604, 'f1': 0.3644067796610169, 'number': 119} | {'precision': 0.7866549604916594, 'recall': 0.8413145539906103, 'f1': 0.8130671506352087, 'number': 1065} | 0.7305 | 0.7943 | 0.7611 | 0.8085 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.25.1
|
77 |
+
- Pytorch 1.13.1+cu116
|
78 |
+
- Datasets 2.8.0
|
79 |
+
- Tokenizers 0.13.2
|
logs/events.out.tfevents.1673531211.04f7d8001f2b.1574.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:ba6ae1f01078b79df9b538a49a72e4d6e0d9af1f4dfd6d52ae1cea6ddd57ff6a
|
3 |
+
size 14172
|
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:dd9f5636d7808b1e34d0d9dba22bd976c3d295b3bb7e717dd2f4b22c874a3d1f
|
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,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
|
|