AndreasPiper
commited on
Commit
•
c9f0629
1
Parent(s):
c66185d
End of training
Browse files- README.md +79 -0
- 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 |
+
base_model: microsoft/layoutlm-base-uncased
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- funsd
|
7 |
+
model-index:
|
8 |
+
- name: layoutlm-funsd
|
9 |
+
results: []
|
10 |
+
---
|
11 |
+
|
12 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
+
should probably proofread and complete it, then remove this comment. -->
|
14 |
+
|
15 |
+
# layoutlm-funsd
|
16 |
+
|
17 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
18 |
+
It achieves the following results on the evaluation set:
|
19 |
+
- Loss: 0.6735
|
20 |
+
- Answer: {'precision': 0.7215601300108342, 'recall': 0.823238566131026, 'f1': 0.76905311778291, 'number': 809}
|
21 |
+
- Header: {'precision': 0.3046875, 'recall': 0.3277310924369748, 'f1': 0.31578947368421056, 'number': 119}
|
22 |
+
- Question: {'precision': 0.7800175284837861, 'recall': 0.8356807511737089, 'f1': 0.8068902991840435, 'number': 1065}
|
23 |
+
- Overall Precision: 0.7276
|
24 |
+
- Overall Recall: 0.8003
|
25 |
+
- Overall F1: 0.7622
|
26 |
+
- Overall Accuracy: 0.8080
|
27 |
+
|
28 |
+
## Model description
|
29 |
+
|
30 |
+
More information needed
|
31 |
+
|
32 |
+
## Intended uses & limitations
|
33 |
+
|
34 |
+
More information needed
|
35 |
+
|
36 |
+
## Training and evaluation data
|
37 |
+
|
38 |
+
More information needed
|
39 |
+
|
40 |
+
## Training procedure
|
41 |
+
|
42 |
+
### Training hyperparameters
|
43 |
+
|
44 |
+
The following hyperparameters were used during training:
|
45 |
+
- learning_rate: 3e-05
|
46 |
+
- train_batch_size: 16
|
47 |
+
- eval_batch_size: 8
|
48 |
+
- seed: 42
|
49 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
50 |
+
- lr_scheduler_type: linear
|
51 |
+
- num_epochs: 15
|
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.7753 | 1.0 | 10 | 1.5651 | {'precision': 0.01791713325867861, 'recall': 0.019777503090234856, 'f1': 0.018801410105757928, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.253315649867374, 'recall': 0.17934272300469484, 'f1': 0.21000549752611322, 'number': 1065} | 0.1257 | 0.1039 | 0.1137 | 0.3966 |
|
58 |
+
| 1.4505 | 2.0 | 20 | 1.2385 | {'precision': 0.2100456621004566, 'recall': 0.22744128553770088, 'f1': 0.21839762611275965, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.46676197283774123, 'recall': 0.6131455399061033, 'f1': 0.5300324675324676, 'number': 1065} | 0.3657 | 0.4200 | 0.3909 | 0.6293 |
|
59 |
+
| 1.0869 | 3.0 | 30 | 0.8993 | {'precision': 0.5091496232508074, 'recall': 0.584672435105068, 'f1': 0.5443037974683544, 'number': 809} | {'precision': 0.046511627906976744, 'recall': 0.01680672268907563, 'f1': 0.02469135802469136, 'number': 119} | {'precision': 0.5931254996003198, 'recall': 0.6967136150234742, 'f1': 0.6407599309153713, 'number': 1065} | 0.5475 | 0.6106 | 0.5773 | 0.7210 |
|
60 |
+
| 0.8144 | 4.0 | 40 | 0.7685 | {'precision': 0.5755755755755756, 'recall': 0.7107540173053152, 'f1': 0.6360619469026548, 'number': 809} | {'precision': 0.15625, 'recall': 0.08403361344537816, 'f1': 0.10928961748633881, 'number': 119} | {'precision': 0.6641350210970464, 'recall': 0.7389671361502348, 'f1': 0.6995555555555556, 'number': 1065} | 0.6103 | 0.6884 | 0.6470 | 0.7562 |
|
61 |
+
| 0.6642 | 5.0 | 50 | 0.6960 | {'precision': 0.6472424557752341, 'recall': 0.7688504326328801, 'f1': 0.7028248587570621, 'number': 809} | {'precision': 0.19607843137254902, 'recall': 0.16806722689075632, 'f1': 0.18099547511312217, 'number': 119} | {'precision': 0.6795201371036846, 'recall': 0.7446009389671362, 'f1': 0.7105734767025091, 'number': 1065} | 0.6435 | 0.7200 | 0.6796 | 0.7773 |
|
62 |
+
| 0.5578 | 6.0 | 60 | 0.6555 | {'precision': 0.6557377049180327, 'recall': 0.7911001236093943, 'f1': 0.7170868347338936, 'number': 809} | {'precision': 0.19327731092436976, 'recall': 0.19327731092436976, 'f1': 0.19327731092436978, 'number': 119} | {'precision': 0.7009038619556286, 'recall': 0.8009389671361502, 'f1': 0.7475898334794041, 'number': 1065} | 0.6557 | 0.7607 | 0.7043 | 0.7920 |
|
63 |
+
| 0.484 | 7.0 | 70 | 0.6448 | {'precision': 0.6560574948665298, 'recall': 0.7898640296662547, 'f1': 0.7167694896242288, 'number': 809} | {'precision': 0.24509803921568626, 'recall': 0.21008403361344538, 'f1': 0.22624434389140272, 'number': 119} | {'precision': 0.7357859531772575, 'recall': 0.8262910798122066, 'f1': 0.7784166298098186, 'number': 1065} | 0.6796 | 0.7747 | 0.7240 | 0.8003 |
|
64 |
+
| 0.4248 | 8.0 | 80 | 0.6501 | {'precision': 0.6865828092243187, 'recall': 0.8096415327564895, 'f1': 0.7430516165626773, 'number': 809} | {'precision': 0.23972602739726026, 'recall': 0.29411764705882354, 'f1': 0.2641509433962264, 'number': 119} | {'precision': 0.7493403693931399, 'recall': 0.8, 'f1': 0.7738419618528609, 'number': 1065} | 0.6893 | 0.7737 | 0.7291 | 0.7993 |
|
65 |
+
| 0.3833 | 9.0 | 90 | 0.6427 | {'precision': 0.7062706270627063, 'recall': 0.7935723114956736, 'f1': 0.7473806752037252, 'number': 809} | {'precision': 0.2777777777777778, 'recall': 0.29411764705882354, 'f1': 0.28571428571428575, 'number': 119} | {'precision': 0.7600685518423308, 'recall': 0.8328638497652582, 'f1': 0.7948028673835125, 'number': 1065} | 0.7103 | 0.7847 | 0.7456 | 0.8069 |
|
66 |
+
| 0.3435 | 10.0 | 100 | 0.6499 | {'precision': 0.7076271186440678, 'recall': 0.8257107540173053, 'f1': 0.7621220764403879, 'number': 809} | {'precision': 0.3217391304347826, 'recall': 0.31092436974789917, 'f1': 0.3162393162393162, 'number': 119} | {'precision': 0.7789566755083996, 'recall': 0.8272300469483568, 'f1': 0.802367941712204, 'number': 1065} | 0.7242 | 0.7958 | 0.7583 | 0.8088 |
|
67 |
+
| 0.3157 | 11.0 | 110 | 0.6661 | {'precision': 0.7183406113537117, 'recall': 0.8133498145859085, 'f1': 0.7628985507246376, 'number': 809} | {'precision': 0.32231404958677684, 'recall': 0.3277310924369748, 'f1': 0.32499999999999996, 'number': 119} | {'precision': 0.7774846086191732, 'recall': 0.8300469483568075, 'f1': 0.8029064486830154, 'number': 1065} | 0.7272 | 0.7933 | 0.7588 | 0.8052 |
|
68 |
+
| 0.2921 | 12.0 | 120 | 0.6645 | {'precision': 0.7142857142857143, 'recall': 0.8281829419035847, 'f1': 0.767029192902118, 'number': 809} | {'precision': 0.30158730158730157, 'recall': 0.31932773109243695, 'f1': 0.310204081632653, 'number': 119} | {'precision': 0.7777777777777778, 'recall': 0.8347417840375587, 'f1': 0.8052536231884059, 'number': 1065} | 0.7236 | 0.8013 | 0.7605 | 0.8075 |
|
69 |
+
| 0.2805 | 13.0 | 130 | 0.6742 | {'precision': 0.7270742358078602, 'recall': 0.823238566131026, 'f1': 0.7721739130434783, 'number': 809} | {'precision': 0.29850746268656714, 'recall': 0.33613445378151263, 'f1': 0.31620553359683795, 'number': 119} | {'precision': 0.7802101576182137, 'recall': 0.8366197183098592, 'f1': 0.8074309016764839, 'number': 1065} | 0.7286 | 0.8013 | 0.7632 | 0.8074 |
|
70 |
+
| 0.2676 | 14.0 | 140 | 0.6739 | {'precision': 0.720173535791757, 'recall': 0.8207663782447466, 'f1': 0.7671865973425764, 'number': 809} | {'precision': 0.2932330827067669, 'recall': 0.3277310924369748, 'f1': 0.30952380952380953, 'number': 119} | {'precision': 0.7730434782608696, 'recall': 0.8347417840375587, 'f1': 0.8027088036117382, 'number': 1065} | 0.7220 | 0.7988 | 0.7585 | 0.8066 |
|
71 |
+
| 0.2731 | 15.0 | 150 | 0.6735 | {'precision': 0.7215601300108342, 'recall': 0.823238566131026, 'f1': 0.76905311778291, 'number': 809} | {'precision': 0.3046875, 'recall': 0.3277310924369748, 'f1': 0.31578947368421056, 'number': 119} | {'precision': 0.7800175284837861, 'recall': 0.8356807511737089, 'f1': 0.8068902991840435, 'number': 1065} | 0.7276 | 0.8003 | 0.7622 | 0.8080 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.33.0.dev0
|
77 |
+
- Pytorch 2.0.1+cpu
|
78 |
+
- Datasets 2.14.4
|
79 |
+
- Tokenizers 0.13.3
|
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 450601089
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0aadcdd5fb7f3abadf2bba739e4da5d5c212ec85ab9492c05761aaade862a60d
|
3 |
size 450601089
|
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
|
|