crystalchen
commited on
End of training
Browse files- README.md +82 -0
- logs/events.out.tfevents.1733733906.f84a642f5617.878.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,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: mit
|
4 |
+
base_model: microsoft/layoutlm-base-uncased
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- funsd
|
9 |
+
model-index:
|
10 |
+
- name: layoutlm-funsd
|
11 |
+
results: []
|
12 |
+
---
|
13 |
+
|
14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
15 |
+
should probably proofread and complete it, then remove this comment. -->
|
16 |
+
|
17 |
+
# layoutlm-funsd
|
18 |
+
|
19 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
20 |
+
It achieves the following results on the evaluation set:
|
21 |
+
- Loss: 0.7276
|
22 |
+
- Answer: {'precision': 0.7205240174672489, 'recall': 0.8158220024721878, 'f1': 0.7652173913043478, 'number': 809}
|
23 |
+
- Header: {'precision': 0.2903225806451613, 'recall': 0.3025210084033613, 'f1': 0.2962962962962963, 'number': 119}
|
24 |
+
- Question: {'precision': 0.7903508771929825, 'recall': 0.8460093896713615, 'f1': 0.8172335600907029, 'number': 1065}
|
25 |
+
- Overall Precision: 0.7326
|
26 |
+
- Overall Recall: 0.8013
|
27 |
+
- Overall F1: 0.7654
|
28 |
+
- Overall Accuracy: 0.8111
|
29 |
+
|
30 |
+
## Model description
|
31 |
+
|
32 |
+
More information needed
|
33 |
+
|
34 |
+
## Intended uses & limitations
|
35 |
+
|
36 |
+
More information needed
|
37 |
+
|
38 |
+
## Training and evaluation data
|
39 |
+
|
40 |
+
More information needed
|
41 |
+
|
42 |
+
## Training procedure
|
43 |
+
|
44 |
+
### Training hyperparameters
|
45 |
+
|
46 |
+
The following hyperparameters were used during training:
|
47 |
+
- learning_rate: 3e-05
|
48 |
+
- train_batch_size: 16
|
49 |
+
- eval_batch_size: 8
|
50 |
+
- seed: 42
|
51 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
52 |
+
- lr_scheduler_type: linear
|
53 |
+
- num_epochs: 15
|
54 |
+
- mixed_precision_training: Native AMP
|
55 |
+
|
56 |
+
### Training results
|
57 |
+
|
58 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
59 |
+
|:-------------:|:-----:|:----:|:---------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
60 |
+
| 1.735 | 1.0 | 10 | 1.5211 | {'precision': 0.04572098475967175, 'recall': 0.048207663782447466, 'f1': 0.04693140794223826, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2578616352201258, 'recall': 0.26948356807511736, 'f1': 0.26354453627180896, 'number': 1065} | 0.1658 | 0.1636 | 0.1647 | 0.4315 |
|
61 |
+
| 1.353 | 2.0 | 20 | 1.1828 | {'precision': 0.18625954198473282, 'recall': 0.1508034610630408, 'f1': 0.16666666666666669, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.48657445077298617, 'recall': 0.5615023474178403, 'f1': 0.5213600697471664, 'number': 1065} | 0.3808 | 0.3613 | 0.3708 | 0.5930 |
|
62 |
+
| 1.027 | 3.0 | 30 | 0.9100 | {'precision': 0.53, 'recall': 0.5241038318912238, 'f1': 0.5270354257302672, 'number': 809} | {'precision': 0.16981132075471697, 'recall': 0.07563025210084033, 'f1': 0.10465116279069768, 'number': 119} | {'precision': 0.6330434782608696, 'recall': 0.6835680751173709, 'f1': 0.6573363431151242, 'number': 1065} | 0.5796 | 0.5825 | 0.5811 | 0.7286 |
|
63 |
+
| 0.7694 | 4.0 | 40 | 0.7622 | {'precision': 0.6295546558704453, 'recall': 0.7688504326328801, 'f1': 0.6922648859209795, 'number': 809} | {'precision': 0.22727272727272727, 'recall': 0.12605042016806722, 'f1': 0.16216216216216214, 'number': 119} | {'precision': 0.704, 'recall': 0.7436619718309859, 'f1': 0.7232876712328766, 'number': 1065} | 0.6558 | 0.7170 | 0.6850 | 0.7708 |
|
64 |
+
| 0.6233 | 5.0 | 50 | 0.7113 | {'precision': 0.6527196652719666, 'recall': 0.7713226205191595, 'f1': 0.7070821529745043, 'number': 809} | {'precision': 0.26136363636363635, 'recall': 0.19327731092436976, 'f1': 0.22222222222222224, 'number': 119} | {'precision': 0.6977309562398704, 'recall': 0.8084507042253521, 'f1': 0.7490213136146151, 'number': 1065} | 0.6620 | 0.7566 | 0.7062 | 0.7895 |
|
65 |
+
| 0.531 | 6.0 | 60 | 0.6976 | {'precision': 0.6386138613861386, 'recall': 0.7972805933250927, 'f1': 0.709180868609126, 'number': 809} | {'precision': 0.22972972972972974, 'recall': 0.14285714285714285, 'f1': 0.17616580310880825, 'number': 119} | {'precision': 0.7175572519083969, 'recall': 0.7943661971830986, 'f1': 0.7540106951871658, 'number': 1065} | 0.6664 | 0.7566 | 0.7086 | 0.7866 |
|
66 |
+
| 0.4577 | 7.0 | 70 | 0.6823 | {'precision': 0.675531914893617, 'recall': 0.7849196538936959, 'f1': 0.7261292166952545, 'number': 809} | {'precision': 0.21951219512195122, 'recall': 0.226890756302521, 'f1': 0.2231404958677686, 'number': 119} | {'precision': 0.7434819175777965, 'recall': 0.8300469483568075, 'f1': 0.7843833185448092, 'number': 1065} | 0.6865 | 0.7757 | 0.7284 | 0.8001 |
|
67 |
+
| 0.3982 | 8.0 | 80 | 0.6871 | {'precision': 0.6847710330138446, 'recall': 0.7948084054388134, 'f1': 0.7356979405034326, 'number': 809} | {'precision': 0.2621359223300971, 'recall': 0.226890756302521, 'f1': 0.24324324324324326, 'number': 119} | {'precision': 0.7569386038687973, 'recall': 0.8450704225352113, 'f1': 0.7985803016858917, 'number': 1065} | 0.7037 | 0.7878 | 0.7434 | 0.8091 |
|
68 |
+
| 0.3614 | 9.0 | 90 | 0.6850 | {'precision': 0.7039045553145337, 'recall': 0.8022249690976514, 'f1': 0.7498555748122473, 'number': 809} | {'precision': 0.2692307692307692, 'recall': 0.23529411764705882, 'f1': 0.25112107623318386, 'number': 119} | {'precision': 0.7635593220338983, 'recall': 0.8460093896713615, 'f1': 0.8026726057906458, 'number': 1065} | 0.7153 | 0.7918 | 0.7516 | 0.8101 |
|
69 |
+
| 0.354 | 10.0 | 100 | 0.6937 | {'precision': 0.7171270718232045, 'recall': 0.8022249690976514, 'f1': 0.7572928821470245, 'number': 809} | {'precision': 0.30275229357798167, 'recall': 0.2773109243697479, 'f1': 0.28947368421052627, 'number': 119} | {'precision': 0.7840616966580977, 'recall': 0.8591549295774648, 'f1': 0.8198924731182796, 'number': 1065} | 0.7322 | 0.8013 | 0.7652 | 0.8140 |
|
70 |
+
| 0.2994 | 11.0 | 110 | 0.7161 | {'precision': 0.7063236870310825, 'recall': 0.8145859085290482, 'f1': 0.7566016073478761, 'number': 809} | {'precision': 0.2631578947368421, 'recall': 0.29411764705882354, 'f1': 0.27777777777777773, 'number': 119} | {'precision': 0.7885816235504014, 'recall': 0.8300469483568075, 'f1': 0.808783165599268, 'number': 1065} | 0.7215 | 0.7918 | 0.7550 | 0.8067 |
|
71 |
+
| 0.2908 | 12.0 | 120 | 0.7068 | {'precision': 0.7208287895310797, 'recall': 0.8170580964153276, 'f1': 0.7659327925840093, 'number': 809} | {'precision': 0.3, 'recall': 0.2773109243697479, 'f1': 0.28820960698689957, 'number': 119} | {'precision': 0.7865266841644795, 'recall': 0.844131455399061, 'f1': 0.8143115942028986, 'number': 1065} | 0.7341 | 0.7993 | 0.7653 | 0.8134 |
|
72 |
+
| 0.2689 | 13.0 | 130 | 0.7206 | {'precision': 0.7186477644492911, 'recall': 0.8145859085290482, 'f1': 0.7636152954808806, 'number': 809} | {'precision': 0.272, 'recall': 0.2857142857142857, 'f1': 0.27868852459016397, 'number': 119} | {'precision': 0.7954345917471466, 'recall': 0.8507042253521127, 'f1': 0.822141560798548, 'number': 1065} | 0.7331 | 0.8023 | 0.7662 | 0.8120 |
|
73 |
+
| 0.2527 | 14.0 | 140 | 0.7260 | {'precision': 0.724972497249725, 'recall': 0.8145859085290482, 'f1': 0.7671711292200234, 'number': 809} | {'precision': 0.2892561983471074, 'recall': 0.29411764705882354, 'f1': 0.2916666666666667, 'number': 119} | {'precision': 0.7900696864111498, 'recall': 0.8516431924882629, 'f1': 0.8197017623136014, 'number': 1065} | 0.7351 | 0.8033 | 0.7677 | 0.8104 |
|
74 |
+
| 0.2511 | 15.0 | 150 | 0.7276 | {'precision': 0.7205240174672489, 'recall': 0.8158220024721878, 'f1': 0.7652173913043478, 'number': 809} | {'precision': 0.2903225806451613, 'recall': 0.3025210084033613, 'f1': 0.2962962962962963, 'number': 119} | {'precision': 0.7903508771929825, 'recall': 0.8460093896713615, 'f1': 0.8172335600907029, 'number': 1065} | 0.7326 | 0.8013 | 0.7654 | 0.8111 |
|
75 |
+
|
76 |
+
|
77 |
+
### Framework versions
|
78 |
+
|
79 |
+
- Transformers 4.46.3
|
80 |
+
- Pytorch 2.5.1+cu121
|
81 |
+
- Datasets 3.1.0
|
82 |
+
- Tokenizers 0.20.3
|
logs/events.out.tfevents.1733733906.f84a642f5617.878.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:dc578b185435847565f5d8ca36a265a6ba455373633758e88da34a2a409f3b49
|
3 |
+
size 16220
|
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:a0e3fda33fe94bdff2cd9b3683aba074c0a7a8b68e23fc05a1c5874fe6333f85
|
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": false,
|
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
|
|