End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1709773612.360e1c85cbe7.2486.0 +2 -2
- 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.1695
|
21 |
+
- Answer: {'precision': 0.35993485342019543, 'recall': 0.546353522867738, 'f1': 0.4339715267550319, 'number': 809}
|
22 |
+
- Header: {'precision': 0.3488372093023256, 'recall': 0.25210084033613445, 'f1': 0.2926829268292683, 'number': 119}
|
23 |
+
- Question: {'precision': 0.5217762596071733, 'recall': 0.5737089201877934, 'f1': 0.5465116279069767, 'number': 1065}
|
24 |
+
- Overall Precision: 0.4358
|
25 |
+
- Overall Recall: 0.5434
|
26 |
+
- Overall F1: 0.4837
|
27 |
+
- Overall Accuracy: 0.5907
|
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.7983 | 1.0 | 10 | 1.5799 | {'precision': 0.02035830618892508, 'recall': 0.030902348578491966, 'f1': 0.024545900834560624, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.19827586206896552, 'recall': 0.1295774647887324, 'f1': 0.15672913117546847, 'number': 1065} | 0.0847 | 0.0818 | 0.0832 | 0.3629 |
|
60 |
+
| 1.5573 | 2.0 | 20 | 1.4500 | {'precision': 0.11375661375661375, 'recall': 0.2126081582200247, 'f1': 0.14821197759586383, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.21101928374655649, 'recall': 0.3596244131455399, 'f1': 0.2659722222222222, 'number': 1065} | 0.1668 | 0.2785 | 0.2086 | 0.4045 |
|
61 |
+
| 1.3717 | 3.0 | 30 | 1.2959 | {'precision': 0.16349108789182545, 'recall': 0.3288009888751545, 'f1': 0.21839080459770116, 'number': 809} | {'precision': 0.061224489795918366, 'recall': 0.025210084033613446, 'f1': 0.03571428571428571, 'number': 119} | {'precision': 0.2739408009286129, 'recall': 0.4431924882629108, 'f1': 0.3385939741750359, 'number': 1065} | 0.2180 | 0.3718 | 0.2749 | 0.4466 |
|
62 |
+
| 1.2568 | 4.0 | 40 | 1.2032 | {'precision': 0.20166898470097358, 'recall': 0.3584672435105068, 'f1': 0.258121940364931, 'number': 809} | {'precision': 0.23809523809523808, 'recall': 0.16806722689075632, 'f1': 0.19704433497536947, 'number': 119} | {'precision': 0.3354214123006834, 'recall': 0.5530516431924882, 'f1': 0.4175824175824176, 'number': 1065} | 0.2743 | 0.4511 | 0.3411 | 0.4942 |
|
63 |
+
| 1.1591 | 5.0 | 50 | 1.1897 | {'precision': 0.23584277148567623, 'recall': 0.43757725587144625, 'f1': 0.30649350649350654, 'number': 809} | {'precision': 0.27848101265822783, 'recall': 0.18487394957983194, 'f1': 0.2222222222222222, 'number': 119} | {'precision': 0.36172765446910615, 'recall': 0.5661971830985916, 'f1': 0.44143484626647145, 'number': 1065} | 0.3015 | 0.4912 | 0.3737 | 0.5069 |
|
64 |
+
| 1.075 | 6.0 | 60 | 1.1092 | {'precision': 0.2832044975404076, 'recall': 0.49814585908529047, 'f1': 0.36111111111111116, 'number': 809} | {'precision': 0.34375, 'recall': 0.18487394957983194, 'f1': 0.24043715846994534, 'number': 119} | {'precision': 0.4609571788413098, 'recall': 0.5154929577464789, 'f1': 0.48670212765957444, 'number': 1065} | 0.3637 | 0.4887 | 0.4170 | 0.5650 |
|
65 |
+
| 1.0011 | 7.0 | 70 | 1.0638 | {'precision': 0.30843373493975906, 'recall': 0.4746600741656366, 'f1': 0.3739045764362221, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.19327731092436976, 'f1': 0.24468085106382975, 'number': 119} | {'precision': 0.47068021892103207, 'recall': 0.5652582159624413, 'f1': 0.5136518771331057, 'number': 1065} | 0.3891 | 0.5063 | 0.4400 | 0.5852 |
|
66 |
+
| 0.9357 | 8.0 | 80 | 1.1937 | {'precision': 0.3132867132867133, 'recall': 0.553770086526576, 'f1': 0.4001786511835641, 'number': 809} | {'precision': 0.2987012987012987, 'recall': 0.19327731092436976, 'f1': 0.23469387755102045, 'number': 119} | {'precision': 0.48117839607201307, 'recall': 0.5521126760563381, 'f1': 0.5142107564494972, 'number': 1065} | 0.3881 | 0.5314 | 0.4485 | 0.5559 |
|
67 |
+
| 0.8751 | 9.0 | 90 | 1.0553 | {'precision': 0.3413173652694611, 'recall': 0.4932014833127318, 'f1': 0.40343781597573314, 'number': 809} | {'precision': 0.29577464788732394, 'recall': 0.17647058823529413, 'f1': 0.2210526315789474, 'number': 119} | {'precision': 0.47987851176917234, 'recall': 0.5934272300469483, 'f1': 0.5306465155331653, 'number': 1065} | 0.4114 | 0.5278 | 0.4624 | 0.5986 |
|
68 |
+
| 0.8585 | 10.0 | 100 | 1.1844 | {'precision': 0.33745454545454545, 'recall': 0.5735475896168108, 'f1': 0.4249084249084249, 'number': 809} | {'precision': 0.37333333333333335, 'recall': 0.23529411764705882, 'f1': 0.28865979381443296, 'number': 119} | {'precision': 0.5013333333333333, 'recall': 0.5295774647887324, 'f1': 0.5150684931506849, 'number': 1065} | 0.4101 | 0.5299 | 0.4623 | 0.5706 |
|
69 |
+
| 0.7894 | 11.0 | 110 | 1.1752 | {'precision': 0.3395311236863379, 'recall': 0.519159456118665, 'f1': 0.41055718475073316, 'number': 809} | {'precision': 0.4, 'recall': 0.23529411764705882, 'f1': 0.29629629629629634, 'number': 119} | {'precision': 0.5020885547201337, 'recall': 0.564319248826291, 'f1': 0.5313881520778072, 'number': 1065} | 0.4189 | 0.5263 | 0.4665 | 0.5781 |
|
70 |
+
| 0.7809 | 12.0 | 120 | 1.2025 | {'precision': 0.34820031298904536, 'recall': 0.5500618046971569, 'f1': 0.4264494489698131, 'number': 809} | {'precision': 0.37037037037037035, 'recall': 0.25210084033613445, 'f1': 0.3, 'number': 119} | {'precision': 0.5093062605752962, 'recall': 0.5652582159624413, 'f1': 0.5358255451713396, 'number': 1065} | 0.4238 | 0.5404 | 0.4751 | 0.5800 |
|
71 |
+
| 0.7452 | 13.0 | 130 | 1.1974 | {'precision': 0.3550436854646545, 'recall': 0.5525339925834364, 'f1': 0.4323017408123791, 'number': 809} | {'precision': 0.358974358974359, 'recall': 0.23529411764705882, 'f1': 0.28426395939086296, 'number': 119} | {'precision': 0.5247787610619469, 'recall': 0.5568075117370892, 'f1': 0.5403189066059226, 'number': 1065} | 0.4329 | 0.5359 | 0.4789 | 0.5830 |
|
72 |
+
| 0.7108 | 14.0 | 140 | 1.1267 | {'precision': 0.373015873015873, 'recall': 0.522867737948084, 'f1': 0.43540916109109623, 'number': 809} | {'precision': 0.3448275862068966, 'recall': 0.25210084033613445, 'f1': 0.2912621359223301, 'number': 119} | {'precision': 0.5193548387096775, 'recall': 0.6046948356807512, 'f1': 0.5587852494577007, 'number': 1065} | 0.4458 | 0.5504 | 0.4926 | 0.6044 |
|
73 |
+
| 0.702 | 15.0 | 150 | 1.1695 | {'precision': 0.35993485342019543, 'recall': 0.546353522867738, 'f1': 0.4339715267550319, 'number': 809} | {'precision': 0.3488372093023256, 'recall': 0.25210084033613445, 'f1': 0.2926829268292683, 'number': 119} | {'precision': 0.5217762596071733, 'recall': 0.5737089201877934, 'f1': 0.5465116279069767, 'number': 1065} | 0.4358 | 0.5434 | 0.4837 | 0.5907 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.38.2
|
79 |
+
- Pytorch 2.1.0+cu121
|
80 |
+
- Datasets 2.18.0
|
81 |
+
- Tokenizers 0.15.2
|
logs/events.out.tfevents.1709773612.360e1c85cbe7.2486.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:4c691dd480d2f8968ccb627ce0fd066f41028e53eab0e0e7a8152fa2e4cae86c
|
3 |
+
size 15738
|
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
|
|