End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1710902016.6e1e6ed48043.12592.0 +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,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: microsoft/layoutlm-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- funsd
|
8 |
+
model-index:
|
9 |
+
- name: layoutlm-funsd
|
10 |
+
results: []
|
11 |
+
---
|
12 |
+
|
13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
+
should probably proofread and complete it, then remove this comment. -->
|
15 |
+
|
16 |
+
# layoutlm-funsd
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 1.0370
|
21 |
+
- Answer: {'precision': 0.39444995044598613, 'recall': 0.4919653893695921, 'f1': 0.43784378437843785, 'number': 809}
|
22 |
+
- Header: {'precision': 0.26548672566371684, 'recall': 0.25210084033613445, 'f1': 0.25862068965517243, 'number': 119}
|
23 |
+
- Question: {'precision': 0.5051546391752577, 'recall': 0.644131455399061, 'f1': 0.566240198101527, 'number': 1065}
|
24 |
+
- Overall Precision: 0.4492
|
25 |
+
- Overall Recall: 0.5590
|
26 |
+
- Overall F1: 0.4981
|
27 |
+
- Overall Accuracy: 0.6347
|
28 |
+
|
29 |
+
## Model description
|
30 |
+
|
31 |
+
More information needed
|
32 |
+
|
33 |
+
## Intended uses & limitations
|
34 |
+
|
35 |
+
More information needed
|
36 |
+
|
37 |
+
## Training and evaluation data
|
38 |
+
|
39 |
+
More information needed
|
40 |
+
|
41 |
+
## Training procedure
|
42 |
+
|
43 |
+
### Training hyperparameters
|
44 |
+
|
45 |
+
The following hyperparameters were used during training:
|
46 |
+
- learning_rate: 3e-05
|
47 |
+
- train_batch_size: 16
|
48 |
+
- eval_batch_size: 8
|
49 |
+
- seed: 42
|
50 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
51 |
+
- lr_scheduler_type: linear
|
52 |
+
- num_epochs: 15
|
53 |
+
- mixed_precision_training: Native AMP
|
54 |
+
|
55 |
+
### Training results
|
56 |
+
|
57 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
58 |
+
|:-------------:|:-----:|:----:|:---------------:|:-------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
59 |
+
| 1.7638 | 1.0 | 10 | 1.5767 | {'precision': 0.02685284640171858, 'recall': 0.030902348578491966, 'f1': 0.028735632183908046, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.23186119873817035, 'recall': 0.13802816901408452, 'f1': 0.17304296645085343, 'number': 1065} | 0.1099 | 0.0863 | 0.0967 | 0.3463 |
|
60 |
+
| 1.4838 | 2.0 | 20 | 1.3817 | {'precision': 0.20173267326732675, 'recall': 0.40296662546353523, 'f1': 0.2688659793814433, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.27599486521181, 'recall': 0.40375586854460094, 'f1': 0.3278688524590164, 'number': 1065} | 0.2365 | 0.3793 | 0.2913 | 0.4223 |
|
61 |
+
| 1.2933 | 3.0 | 30 | 1.2178 | {'precision': 0.22845691382765532, 'recall': 0.4227441285537701, 'f1': 0.29661751951431053, 'number': 809} | {'precision': 0.1076923076923077, 'recall': 0.058823529411764705, 'f1': 0.07608695652173912, 'number': 119} | {'precision': 0.3385542168674699, 'recall': 0.5276995305164319, 'f1': 0.4124770642201835, 'number': 1065} | 0.2827 | 0.4571 | 0.3494 | 0.4903 |
|
62 |
+
| 1.1591 | 4.0 | 40 | 1.1134 | {'precision': 0.2775800711743772, 'recall': 0.4820766378244747, 'f1': 0.3523035230352303, 'number': 809} | {'precision': 0.27848101265822783, 'recall': 0.18487394957983194, 'f1': 0.2222222222222222, 'number': 119} | {'precision': 0.37922077922077924, 'recall': 0.5483568075117371, 'f1': 0.4483685220729367, 'number': 1065} | 0.3294 | 0.4997 | 0.3971 | 0.5555 |
|
63 |
+
| 1.0602 | 5.0 | 50 | 1.0998 | {'precision': 0.2914764079147641, 'recall': 0.47342398022249693, 'f1': 0.3608101742816769, 'number': 809} | {'precision': 0.3146067415730337, 'recall': 0.23529411764705882, 'f1': 0.2692307692307692, 'number': 119} | {'precision': 0.4076227390180879, 'recall': 0.5924882629107981, 'f1': 0.4829697665518562, 'number': 1065} | 0.3531 | 0.5228 | 0.4215 | 0.5676 |
|
64 |
+
| 0.9666 | 6.0 | 60 | 1.2008 | {'precision': 0.3184044786564031, 'recall': 0.5624227441285538, 'f1': 0.4066130473637176, 'number': 809} | {'precision': 0.36666666666666664, 'recall': 0.18487394957983194, 'f1': 0.24581005586592175, 'number': 119} | {'precision': 0.46556233653007845, 'recall': 0.5014084507042254, 'f1': 0.4828209764918625, 'number': 1065} | 0.3835 | 0.5073 | 0.4368 | 0.5518 |
|
65 |
+
| 0.9177 | 7.0 | 70 | 1.0682 | {'precision': 0.33756345177664976, 'recall': 0.4932014833127318, 'f1': 0.4008036162732296, 'number': 809} | {'precision': 0.2978723404255319, 'recall': 0.23529411764705882, 'f1': 0.2629107981220657, 'number': 119} | {'precision': 0.4583333333333333, 'recall': 0.5784037558685446, 'f1': 0.5114155251141553, 'number': 1065} | 0.3981 | 0.5233 | 0.4522 | 0.5949 |
|
66 |
+
| 0.8429 | 8.0 | 80 | 1.0318 | {'precision': 0.35264227642276424, 'recall': 0.4289245982694685, 'f1': 0.3870607919687674, 'number': 809} | {'precision': 0.2909090909090909, 'recall': 0.2689075630252101, 'f1': 0.2794759825327511, 'number': 119} | {'precision': 0.4475703324808184, 'recall': 0.6572769953051644, 'f1': 0.5325218714340054, 'number': 1065} | 0.4059 | 0.5414 | 0.4640 | 0.6117 |
|
67 |
+
| 0.8062 | 9.0 | 90 | 1.0339 | {'precision': 0.37058823529411766, 'recall': 0.4672435105067985, 'f1': 0.41334062329141613, 'number': 809} | {'precision': 0.275, 'recall': 0.2773109243697479, 'f1': 0.27615062761506276, 'number': 119} | {'precision': 0.4913728432108027, 'recall': 0.6150234741784038, 'f1': 0.5462885738115096, 'number': 1065} | 0.4311 | 0.5349 | 0.4774 | 0.6213 |
|
68 |
+
| 0.7862 | 10.0 | 100 | 1.0501 | {'precision': 0.35284552845528455, 'recall': 0.5364647713226205, 'f1': 0.42569887199607653, 'number': 809} | {'precision': 0.3048780487804878, 'recall': 0.21008403361344538, 'f1': 0.24875621890547264, 'number': 119} | {'precision': 0.4933852140077821, 'recall': 0.5953051643192488, 'f1': 0.5395744680851065, 'number': 1065} | 0.4209 | 0.5484 | 0.4763 | 0.6103 |
|
69 |
+
| 0.7206 | 11.0 | 110 | 1.0571 | {'precision': 0.3714020427112349, 'recall': 0.49443757725587145, 'f1': 0.4241781548250265, 'number': 809} | {'precision': 0.2962962962962963, 'recall': 0.2689075630252101, 'f1': 0.28193832599118945, 'number': 119} | {'precision': 0.5184893784421715, 'recall': 0.6187793427230047, 'f1': 0.5642123287671232, 'number': 1065} | 0.4442 | 0.5474 | 0.4904 | 0.6234 |
|
70 |
+
| 0.7242 | 12.0 | 120 | 1.0352 | {'precision': 0.3682771194165907, 'recall': 0.49938195302843014, 'f1': 0.4239244491080797, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.2689075630252101, 'f1': 0.29767441860465116, 'number': 119} | {'precision': 0.4966984592809978, 'recall': 0.6356807511737089, 'f1': 0.557660626029654, 'number': 1065} | 0.4354 | 0.5585 | 0.4893 | 0.6251 |
|
71 |
+
| 0.6858 | 13.0 | 130 | 1.0447 | {'precision': 0.37962962962962965, 'recall': 0.5067985166872683, 'f1': 0.4340921122286925, 'number': 809} | {'precision': 0.2672413793103448, 'recall': 0.2605042016806723, 'f1': 0.26382978723404255, 'number': 119} | {'precision': 0.5022058823529412, 'recall': 0.6413145539906103, 'f1': 0.5632989690721649, 'number': 1065} | 0.4397 | 0.5640 | 0.4942 | 0.6298 |
|
72 |
+
| 0.6549 | 14.0 | 140 | 1.0332 | {'precision': 0.3821892393320965, 'recall': 0.5092707045735476, 'f1': 0.43667196608373077, 'number': 809} | {'precision': 0.3263157894736842, 'recall': 0.2605042016806723, 'f1': 0.2897196261682243, 'number': 119} | {'precision': 0.5044843049327354, 'recall': 0.6338028169014085, 'f1': 0.5617977528089888, 'number': 1065} | 0.4452 | 0.5610 | 0.4964 | 0.6354 |
|
73 |
+
| 0.6462 | 15.0 | 150 | 1.0370 | {'precision': 0.39444995044598613, 'recall': 0.4919653893695921, 'f1': 0.43784378437843785, 'number': 809} | {'precision': 0.26548672566371684, 'recall': 0.25210084033613445, 'f1': 0.25862068965517243, 'number': 119} | {'precision': 0.5051546391752577, 'recall': 0.644131455399061, 'f1': 0.566240198101527, 'number': 1065} | 0.4492 | 0.5590 | 0.4981 | 0.6347 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.38.2
|
79 |
+
- Pytorch 2.2.1+cu121
|
80 |
+
- Datasets 2.18.0
|
81 |
+
- Tokenizers 0.15.2
|
logs/events.out.tfevents.1710902016.6e1e6ed48043.12592.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:a33a7bd831bf0cdba75a569d6353fe80f6a4dc7cc625b29ffc3a90842595d07f
|
3 |
+
size 15738
|
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:cdcdec7a2711b4f830f7c8efb018a82a0796bc43132f61110e550ef2106e35c4
|
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
|
|