Benedict-L
commited on
Commit
•
41ab1f5
1
Parent(s):
ac659cf
End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1718873965.HCIDC-SV-DMZ-ORC-NODE02.3913563.1 +2 -2
- model.safetensors +1 -1
- preprocessor_config.json +25 -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-funsd2
|
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-funsd2
|
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: 0.6965
|
21 |
+
- Answer: {'precision': 0.7010869565217391, 'recall': 0.7972805933250927, 'f1': 0.746096009253904, 'number': 809}
|
22 |
+
- Header: {'precision': 0.3305785123966942, 'recall': 0.33613445378151263, 'f1': 0.33333333333333337, 'number': 119}
|
23 |
+
- Question: {'precision': 0.7692307692307693, 'recall': 0.8262910798122066, 'f1': 0.7967406066093254, 'number': 1065}
|
24 |
+
- Overall Precision: 0.7162
|
25 |
+
- Overall Recall: 0.7852
|
26 |
+
- Overall F1: 0.7492
|
27 |
+
- Overall Accuracy: 0.8006
|
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.8343 | 1.0 | 10 | 1.5921 | {'precision': 0.006666666666666667, 'recall': 0.006180469715698393, 'f1': 0.006414368184733804, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.22067901234567902, 'recall': 0.13427230046948357, 'f1': 0.166958552247519, 'number': 1065} | 0.1059 | 0.0743 | 0.0873 | 0.3510 |
|
60 |
+
| 1.4828 | 2.0 | 20 | 1.2849 | {'precision': 0.2738799661876585, 'recall': 0.4004944375772559, 'f1': 0.32530120481927705, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.38058114812189936, 'recall': 0.504225352112676, 'f1': 0.43376413570274636, 'number': 1065} | 0.3314 | 0.4320 | 0.3751 | 0.5951 |
|
61 |
+
| 1.1444 | 3.0 | 30 | 0.9563 | {'precision': 0.4725897920604915, 'recall': 0.6180469715698393, 'f1': 0.5356186395286556, 'number': 809} | {'precision': 0.041666666666666664, 'recall': 0.01680672268907563, 'f1': 0.02395209580838323, 'number': 119} | {'precision': 0.5378020265003897, 'recall': 0.647887323943662, 'f1': 0.5877342419080069, 'number': 1065} | 0.4990 | 0.5981 | 0.5440 | 0.6955 |
|
62 |
+
| 0.8658 | 4.0 | 40 | 0.7885 | {'precision': 0.5757009345794393, 'recall': 0.761433868974042, 'f1': 0.6556679084619478, 'number': 809} | {'precision': 0.1388888888888889, 'recall': 0.08403361344537816, 'f1': 0.10471204188481677, 'number': 119} | {'precision': 0.6567299006323396, 'recall': 0.6826291079812207, 'f1': 0.6694290976058932, 'number': 1065} | 0.6016 | 0.6789 | 0.6379 | 0.7601 |
|
63 |
+
| 0.6833 | 5.0 | 50 | 0.7124 | {'precision': 0.64375, 'recall': 0.7639060568603214, 'f1': 0.6986998304126625, 'number': 809} | {'precision': 0.35, 'recall': 0.23529411764705882, 'f1': 0.28140703517587945, 'number': 119} | {'precision': 0.6729354047424366, 'recall': 0.7727699530516432, 'f1': 0.7194055944055944, 'number': 1065} | 0.6491 | 0.7371 | 0.6903 | 0.7810 |
|
64 |
+
| 0.5898 | 6.0 | 60 | 0.6874 | {'precision': 0.6227141482194418, 'recall': 0.799752781211372, 'f1': 0.7002164502164502, 'number': 809} | {'precision': 0.3411764705882353, 'recall': 0.24369747899159663, 'f1': 0.28431372549019607, 'number': 119} | {'precision': 0.7236492471213464, 'recall': 0.7671361502347418, 'f1': 0.7447584320875114, 'number': 1065} | 0.6627 | 0.7491 | 0.7033 | 0.7851 |
|
65 |
+
| 0.5126 | 7.0 | 70 | 0.6599 | {'precision': 0.6705632306057385, 'recall': 0.7799752781211372, 'f1': 0.7211428571428572, 'number': 809} | {'precision': 0.32673267326732675, 'recall': 0.2773109243697479, 'f1': 0.30000000000000004, 'number': 119} | {'precision': 0.7427821522309711, 'recall': 0.7971830985915493, 'f1': 0.7690217391304347, 'number': 1065} | 0.6924 | 0.7592 | 0.7243 | 0.7963 |
|
66 |
+
| 0.4534 | 8.0 | 80 | 0.6562 | {'precision': 0.670490093847758, 'recall': 0.7948084054388134, 'f1': 0.7273755656108597, 'number': 809} | {'precision': 0.2966101694915254, 'recall': 0.29411764705882354, 'f1': 0.2953586497890296, 'number': 119} | {'precision': 0.7476475620188195, 'recall': 0.8206572769953052, 'f1': 0.7824529991047449, 'number': 1065} | 0.6910 | 0.7787 | 0.7322 | 0.7954 |
|
67 |
+
| 0.3984 | 9.0 | 90 | 0.6561 | {'precision': 0.6838709677419355, 'recall': 0.7861557478368356, 'f1': 0.7314548591144335, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.3025210084033613, 'f1': 0.3171806167400881, 'number': 119} | {'precision': 0.7555555555555555, 'recall': 0.8300469483568075, 'f1': 0.7910514541387024, 'number': 1065} | 0.7047 | 0.7807 | 0.7408 | 0.7986 |
|
68 |
+
| 0.3865 | 10.0 | 100 | 0.6673 | {'precision': 0.6877005347593583, 'recall': 0.7948084054388134, 'f1': 0.7373853211009175, 'number': 809} | {'precision': 0.31666666666666665, 'recall': 0.31932773109243695, 'f1': 0.3179916317991632, 'number': 119} | {'precision': 0.7613240418118467, 'recall': 0.8206572769953052, 'f1': 0.7898779936737461, 'number': 1065} | 0.7059 | 0.7802 | 0.7412 | 0.8019 |
|
69 |
+
| 0.3343 | 11.0 | 110 | 0.6761 | {'precision': 0.6853220696937699, 'recall': 0.8022249690976514, 'f1': 0.7391799544419134, 'number': 809} | {'precision': 0.336283185840708, 'recall': 0.31932773109243695, 'f1': 0.32758620689655166, 'number': 119} | {'precision': 0.7692307692307693, 'recall': 0.8262910798122066, 'f1': 0.7967406066093254, 'number': 1065} | 0.7110 | 0.7863 | 0.7467 | 0.7998 |
|
70 |
+
| 0.314 | 12.0 | 120 | 0.6772 | {'precision': 0.6989130434782609, 'recall': 0.7948084054388134, 'f1': 0.7437825332562175, 'number': 809} | {'precision': 0.34545454545454546, 'recall': 0.31932773109243695, 'f1': 0.3318777292576419, 'number': 119} | {'precision': 0.7698343504795118, 'recall': 0.8291079812206573, 'f1': 0.7983725135623869, 'number': 1065} | 0.7184 | 0.7847 | 0.7501 | 0.8053 |
|
71 |
+
| 0.3008 | 13.0 | 130 | 0.6878 | {'precision': 0.7048648648648649, 'recall': 0.8059332509270705, 'f1': 0.7520184544405998, 'number': 809} | {'precision': 0.33620689655172414, 'recall': 0.3277310924369748, 'f1': 0.33191489361702126, 'number': 119} | {'precision': 0.7689594356261023, 'recall': 0.8187793427230047, 'f1': 0.793087767166894, 'number': 1065} | 0.7186 | 0.7842 | 0.75 | 0.8033 |
|
72 |
+
| 0.2797 | 14.0 | 140 | 0.6948 | {'precision': 0.7027322404371584, 'recall': 0.7948084054388134, 'f1': 0.7459396751740139, 'number': 809} | {'precision': 0.31746031746031744, 'recall': 0.33613445378151263, 'f1': 0.32653061224489793, 'number': 119} | {'precision': 0.7661996497373029, 'recall': 0.8215962441314554, 'f1': 0.7929315813321249, 'number': 1065} | 0.7137 | 0.7817 | 0.7462 | 0.8017 |
|
73 |
+
| 0.2722 | 15.0 | 150 | 0.6965 | {'precision': 0.7010869565217391, 'recall': 0.7972805933250927, 'f1': 0.746096009253904, 'number': 809} | {'precision': 0.3305785123966942, 'recall': 0.33613445378151263, 'f1': 0.33333333333333337, 'number': 119} | {'precision': 0.7692307692307693, 'recall': 0.8262910798122066, 'f1': 0.7967406066093254, 'number': 1065} | 0.7162 | 0.7852 | 0.7492 | 0.8006 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.41.2
|
79 |
+
- Pytorch 2.3.1+cu121
|
80 |
+
- Datasets 2.19.2
|
81 |
+
- Tokenizers 0.19.1
|
logs/events.out.tfevents.1718873965.HCIDC-SV-DMZ-ORC-NODE02.3913563.1
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:27dc2284c7758dd061d2cbe32c1fc02f7f4e32c33b389eb435e6646b0c4deeab
|
3 |
+
size 15988
|
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:407269bdfb61d5284f437311ec92ed06d968ffc4785fba24f120193f68a95329
|
3 |
size 450558212
|
preprocessor_config.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_valid_processor_keys": [
|
3 |
+
"images",
|
4 |
+
"do_resize",
|
5 |
+
"size",
|
6 |
+
"resample",
|
7 |
+
"apply_ocr",
|
8 |
+
"ocr_lang",
|
9 |
+
"tesseract_config",
|
10 |
+
"return_tensors",
|
11 |
+
"data_format",
|
12 |
+
"input_data_format"
|
13 |
+
],
|
14 |
+
"apply_ocr": true,
|
15 |
+
"do_resize": true,
|
16 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
17 |
+
"ocr_lang": null,
|
18 |
+
"processor_class": "LayoutLMv2Processor",
|
19 |
+
"resample": 2,
|
20 |
+
"size": {
|
21 |
+
"height": 224,
|
22 |
+
"width": 224
|
23 |
+
},
|
24 |
+
"tesseract_config": ""
|
25 |
+
}
|
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
|
|