Training in progress, epoch 1
Browse files- README.md +81 -0
- logs/events.out.tfevents.1714564803.DESKTOP-3CFO1LV.1077.0 +2 -2
- logs/events.out.tfevents.1714565161.DESKTOP-3CFO1LV.2689.0 +3 -0
- 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-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: 0.6859
|
21 |
+
- Answer: {'precision': 0.7175572519083969, 'recall': 0.8133498145859085, 'f1': 0.7624565469293164, 'number': 809}
|
22 |
+
- Header: {'precision': 0.29411764705882354, 'recall': 0.33613445378151263, 'f1': 0.3137254901960785, 'number': 119}
|
23 |
+
- Question: {'precision': 0.7724867724867724, 'recall': 0.8225352112676056, 'f1': 0.7967257844474761, 'number': 1065}
|
24 |
+
- Overall Precision: 0.7197
|
25 |
+
- Overall Recall: 0.7898
|
26 |
+
- Overall F1: 0.7531
|
27 |
+
- Overall Accuracy: 0.8101
|
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.8268 | 1.0 | 10 | 1.5857 | {'precision': 0.015523932729624839, 'recall': 0.014833127317676144, 'f1': 0.015170670037926676, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.17011834319526628, 'recall': 0.107981220657277, 'f1': 0.1321079839172889, 'number': 1065} | 0.0876 | 0.0637 | 0.0738 | 0.3586 |
|
60 |
+
| 1.4514 | 2.0 | 20 | 1.2482 | {'precision': 0.28865979381443296, 'recall': 0.311495673671199, 'f1': 0.29964328180737215, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.38357142857142856, 'recall': 0.504225352112676, 'f1': 0.43569979716024343, 'number': 1065} | 0.3471 | 0.3959 | 0.3699 | 0.5859 |
|
61 |
+
| 1.1188 | 3.0 | 30 | 0.9477 | {'precision': 0.5157232704402516, 'recall': 0.6081582200247219, 'f1': 0.5581395348837209, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5390879478827362, 'recall': 0.6215962441314554, 'f1': 0.5774095071958134, 'number': 1065} | 0.5215 | 0.5790 | 0.5487 | 0.7076 |
|
62 |
+
| 0.8437 | 4.0 | 40 | 0.7798 | {'precision': 0.5986124876114965, 'recall': 0.7466007416563659, 'f1': 0.6644664466446645, 'number': 809} | {'precision': 0.1875, 'recall': 0.07563025210084033, 'f1': 0.10778443113772454, 'number': 119} | {'precision': 0.6486718080548415, 'recall': 0.7107981220657277, 'f1': 0.6783154121863798, 'number': 1065} | 0.6160 | 0.6874 | 0.6498 | 0.7580 |
|
63 |
+
| 0.6804 | 5.0 | 50 | 0.7073 | {'precision': 0.6413502109704642, 'recall': 0.7515451174289246, 'f1': 0.6920887877063175, 'number': 809} | {'precision': 0.3, 'recall': 0.17647058823529413, 'f1': 0.22222222222222224, 'number': 119} | {'precision': 0.6712662337662337, 'recall': 0.7765258215962442, 'f1': 0.7200696560731389, 'number': 1065} | 0.6471 | 0.7306 | 0.6863 | 0.7850 |
|
64 |
+
| 0.5726 | 6.0 | 60 | 0.6805 | {'precision': 0.643141153081511, 'recall': 0.799752781211372, 'f1': 0.7129476584022039, 'number': 809} | {'precision': 0.3142857142857143, 'recall': 0.18487394957983194, 'f1': 0.23280423280423282, 'number': 119} | {'precision': 0.709372312983663, 'recall': 0.7746478873239436, 'f1': 0.7405745062836624, 'number': 1065} | 0.6673 | 0.7496 | 0.7060 | 0.7854 |
|
65 |
+
| 0.5005 | 7.0 | 70 | 0.6536 | {'precision': 0.6701680672268907, 'recall': 0.788627935723115, 'f1': 0.7245883021010789, 'number': 809} | {'precision': 0.27450980392156865, 'recall': 0.23529411764705882, 'f1': 0.2533936651583711, 'number': 119} | {'precision': 0.743103448275862, 'recall': 0.8093896713615023, 'f1': 0.7748314606741572, 'number': 1065} | 0.6902 | 0.7667 | 0.7264 | 0.7982 |
|
66 |
+
| 0.444 | 8.0 | 80 | 0.6526 | {'precision': 0.6802935010482181, 'recall': 0.8022249690976514, 'f1': 0.7362450368689732, 'number': 809} | {'precision': 0.26956521739130435, 'recall': 0.2605042016806723, 'f1': 0.264957264957265, 'number': 119} | {'precision': 0.7400690846286702, 'recall': 0.8046948356807512, 'f1': 0.7710301394511921, 'number': 1065} | 0.6902 | 0.7712 | 0.7284 | 0.8022 |
|
67 |
+
| 0.3904 | 9.0 | 90 | 0.6549 | {'precision': 0.6905781584582441, 'recall': 0.7972805933250927, 'f1': 0.7401032702237521, 'number': 809} | {'precision': 0.26666666666666666, 'recall': 0.2689075630252101, 'f1': 0.26778242677824265, 'number': 119} | {'precision': 0.7554019014693172, 'recall': 0.8206572769953052, 'f1': 0.7866786678667866, 'number': 1065} | 0.7015 | 0.7782 | 0.7379 | 0.8073 |
|
68 |
+
| 0.3778 | 10.0 | 100 | 0.6593 | {'precision': 0.6996805111821086, 'recall': 0.8121137206427689, 'f1': 0.7517162471395881, 'number': 809} | {'precision': 0.3018867924528302, 'recall': 0.2689075630252101, 'f1': 0.28444444444444444, 'number': 119} | {'precision': 0.7707231040564374, 'recall': 0.8206572769953052, 'f1': 0.7949067758071852, 'number': 1065} | 0.7173 | 0.7842 | 0.7493 | 0.8096 |
|
69 |
+
| 0.3205 | 11.0 | 110 | 0.6673 | {'precision': 0.7185104052573932, 'recall': 0.8108776266996292, 'f1': 0.761904761904762, 'number': 809} | {'precision': 0.26277372262773724, 'recall': 0.3025210084033613, 'f1': 0.28125000000000006, 'number': 119} | {'precision': 0.7557643040136636, 'recall': 0.8309859154929577, 'f1': 0.7915921288014313, 'number': 1065} | 0.7100 | 0.7913 | 0.7485 | 0.8077 |
|
70 |
+
| 0.3107 | 12.0 | 120 | 0.6723 | {'precision': 0.7185104052573932, 'recall': 0.8108776266996292, 'f1': 0.761904761904762, 'number': 809} | {'precision': 0.2803030303030303, 'recall': 0.31092436974789917, 'f1': 0.29482071713147406, 'number': 119} | {'precision': 0.7740213523131673, 'recall': 0.8169014084507042, 'f1': 0.7948835084513477, 'number': 1065} | 0.7206 | 0.7842 | 0.7511 | 0.8102 |
|
71 |
+
| 0.2906 | 13.0 | 130 | 0.6774 | {'precision': 0.7175324675324676, 'recall': 0.8195302843016069, 'f1': 0.7651471436814773, 'number': 809} | {'precision': 0.2824427480916031, 'recall': 0.31092436974789917, 'f1': 0.29600000000000004, 'number': 119} | {'precision': 0.7678883071553229, 'recall': 0.8262910798122066, 'f1': 0.7960199004975125, 'number': 1065} | 0.7179 | 0.7928 | 0.7535 | 0.8111 |
|
72 |
+
| 0.2684 | 14.0 | 140 | 0.6829 | {'precision': 0.716304347826087, 'recall': 0.8145859085290482, 'f1': 0.7622903412377097, 'number': 809} | {'precision': 0.2900763358778626, 'recall': 0.31932773109243695, 'f1': 0.304, 'number': 119} | {'precision': 0.7742504409171076, 'recall': 0.8244131455399061, 'f1': 0.7985447930877672, 'number': 1065} | 0.7208 | 0.7903 | 0.7539 | 0.8115 |
|
73 |
+
| 0.2659 | 15.0 | 150 | 0.6859 | {'precision': 0.7175572519083969, 'recall': 0.8133498145859085, 'f1': 0.7624565469293164, 'number': 809} | {'precision': 0.29411764705882354, 'recall': 0.33613445378151263, 'f1': 0.3137254901960785, 'number': 119} | {'precision': 0.7724867724867724, 'recall': 0.8225352112676056, 'f1': 0.7967257844474761, 'number': 1065} | 0.7197 | 0.7898 | 0.7531 | 0.8101 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.40.1
|
79 |
+
- Pytorch 2.3.0+cu121
|
80 |
+
- Datasets 2.19.0
|
81 |
+
- Tokenizers 0.19.1
|
logs/events.out.tfevents.1714564803.DESKTOP-3CFO1LV.1077.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:a4cd4d041b6d9ee7d4fd8632ba4d82f4012706d70153d510e1cc28ce67d82b38
|
3 |
+
size 15846
|
logs/events.out.tfevents.1714565161.DESKTOP-3CFO1LV.2689.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:43675fc0236adfebe90d4bda91d13cafff6bd6c8b04fa60c712f6bc77ecfa56d
|
3 |
+
size 5625
|
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:f6b379d719ff7fac644bb4674b9a0c89cafc513151bf79cb49985fda865d974d
|
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": false,
|
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
|
|