End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1712841890.90d122649371.3714.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.0554
|
21 |
+
- Answer: {'precision': 0.4105691056910569, 'recall': 0.49938195302843014, 'f1': 0.45064138315672064, 'number': 809}
|
22 |
+
- Header: {'precision': 0.36470588235294116, 'recall': 0.2605042016806723, 'f1': 0.30392156862745096, 'number': 119}
|
23 |
+
- Question: {'precision': 0.48371104815864024, 'recall': 0.6413145539906103, 'f1': 0.551473556721841, 'number': 1065}
|
24 |
+
- Overall Precision: 0.4506
|
25 |
+
- Overall Recall: 0.5610
|
26 |
+
- Overall F1: 0.4998
|
27 |
+
- Overall Accuracy: 0.6149
|
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.7702 | 1.0 | 10 | 1.5768 | {'precision': 0.040923399790136414, 'recall': 0.048207663782447466, 'f1': 0.04426787741203178, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.38510301109350237, 'recall': 0.22816901408450704, 'f1': 0.28655660377358494, 'number': 1065} | 0.1780 | 0.1415 | 0.1577 | 0.3540 |
|
60 |
+
| 1.4963 | 2.0 | 20 | 1.4062 | {'precision': 0.1941294196130754, 'recall': 0.35970333745364647, 'f1': 0.2521663778162912, 'number': 809} | {'precision': 0.03571428571428571, 'recall': 0.01680672268907563, 'f1': 0.022857142857142857, 'number': 119} | {'precision': 0.28505291005291006, 'recall': 0.40469483568075115, 'f1': 0.33449747768723326, 'number': 1065} | 0.2361 | 0.3633 | 0.2862 | 0.4204 |
|
61 |
+
| 1.2983 | 3.0 | 30 | 1.2020 | {'precision': 0.23365122615803816, 'recall': 0.42398022249690975, 'f1': 0.3012736056214317, 'number': 809} | {'precision': 0.13846153846153847, 'recall': 0.07563025210084033, 'f1': 0.09782608695652173, 'number': 119} | {'precision': 0.3307776560788609, 'recall': 0.5671361502347417, 'f1': 0.4178484953303355, 'number': 1065} | 0.2846 | 0.4797 | 0.3572 | 0.4806 |
|
62 |
+
| 1.1603 | 4.0 | 40 | 1.1227 | {'precision': 0.2243436754176611, 'recall': 0.34857849196538937, 'f1': 0.2729912875121007, 'number': 809} | {'precision': 0.2222222222222222, 'recall': 0.18487394957983194, 'f1': 0.2018348623853211, 'number': 119} | {'precision': 0.35071846726982436, 'recall': 0.6187793427230047, 'f1': 0.4476902173913044, 'number': 1065} | 0.2977 | 0.4832 | 0.3684 | 0.5265 |
|
63 |
+
| 1.0771 | 5.0 | 50 | 1.0953 | {'precision': 0.2655198204936425, 'recall': 0.4388133498145859, 'f1': 0.33084808946877914, 'number': 809} | {'precision': 0.26666666666666666, 'recall': 0.20168067226890757, 'f1': 0.22966507177033493, 'number': 119} | {'precision': 0.3632745878339966, 'recall': 0.6, 'f1': 0.45254957507082155, 'number': 1065} | 0.3195 | 0.5108 | 0.3931 | 0.5453 |
|
64 |
+
| 1.0102 | 6.0 | 60 | 1.0388 | {'precision': 0.30492285084496695, 'recall': 0.5129789864029666, 'f1': 0.3824884792626728, 'number': 809} | {'precision': 0.3283582089552239, 'recall': 0.18487394957983194, 'f1': 0.2365591397849462, 'number': 119} | {'precision': 0.4519543973941368, 'recall': 0.5211267605633803, 'f1': 0.4840819886611426, 'number': 1065} | 0.3735 | 0.4977 | 0.4268 | 0.5839 |
|
65 |
+
| 0.9312 | 7.0 | 70 | 1.0265 | {'precision': 0.32556131260794474, 'recall': 0.46600741656365885, 'f1': 0.3833248601931876, 'number': 809} | {'precision': 0.2828282828282828, 'recall': 0.23529411764705882, 'f1': 0.25688073394495414, 'number': 119} | {'precision': 0.47326007326007324, 'recall': 0.6065727699530516, 'f1': 0.5316872427983539, 'number': 1065} | 0.4008 | 0.5273 | 0.4555 | 0.5969 |
|
66 |
+
| 0.8732 | 8.0 | 80 | 1.0508 | {'precision': 0.33681073025335323, 'recall': 0.5587144622991347, 'f1': 0.4202696420269642, 'number': 809} | {'precision': 0.3561643835616438, 'recall': 0.2184873949579832, 'f1': 0.2708333333333333, 'number': 119} | {'precision': 0.4556126192223037, 'recall': 0.5830985915492958, 'f1': 0.5115321252059308, 'number': 1065} | 0.3956 | 0.5514 | 0.4607 | 0.5947 |
|
67 |
+
| 0.808 | 9.0 | 90 | 1.0282 | {'precision': 0.36807511737089205, 'recall': 0.484548825710754, 'f1': 0.41835645677694777, 'number': 809} | {'precision': 0.3058823529411765, 'recall': 0.2184873949579832, 'f1': 0.2549019607843137, 'number': 119} | {'precision': 0.46965317919075145, 'recall': 0.6103286384976526, 'f1': 0.5308289097590853, 'number': 1065} | 0.4215 | 0.5359 | 0.4718 | 0.6085 |
|
68 |
+
| 0.7928 | 10.0 | 100 | 1.0475 | {'precision': 0.38683498647430115, 'recall': 0.5302843016069221, 'f1': 0.44734098018769547, 'number': 809} | {'precision': 0.36363636363636365, 'recall': 0.23529411764705882, 'f1': 0.2857142857142857, 'number': 119} | {'precision': 0.49149922720247297, 'recall': 0.5971830985915493, 'f1': 0.5392115303094531, 'number': 1065} | 0.4407 | 0.5484 | 0.4887 | 0.6054 |
|
69 |
+
| 0.7164 | 11.0 | 110 | 1.0310 | {'precision': 0.38894472361809046, 'recall': 0.4783683559950556, 'f1': 0.4290465631929047, 'number': 809} | {'precision': 0.38961038961038963, 'recall': 0.25210084033613445, 'f1': 0.30612244897959184, 'number': 119} | {'precision': 0.4831223628691983, 'recall': 0.6450704225352113, 'f1': 0.5524728588661038, 'number': 1065} | 0.4427 | 0.5539 | 0.4921 | 0.6149 |
|
70 |
+
| 0.707 | 12.0 | 120 | 1.0295 | {'precision': 0.40441176470588236, 'recall': 0.4758961681087763, 'f1': 0.43725156161272005, 'number': 809} | {'precision': 0.3655913978494624, 'recall': 0.2857142857142857, 'f1': 0.32075471698113206, 'number': 119} | {'precision': 0.4713031735313977, 'recall': 0.6553990610328638, 'f1': 0.5483110761979575, 'number': 1065} | 0.4422 | 0.5605 | 0.4944 | 0.6172 |
|
71 |
+
| 0.6765 | 13.0 | 130 | 1.0494 | {'precision': 0.4107485604606526, 'recall': 0.5290482076637825, 'f1': 0.46245272825499734, 'number': 809} | {'precision': 0.4305555555555556, 'recall': 0.2605042016806723, 'f1': 0.324607329842932, 'number': 119} | {'precision': 0.4879825200291333, 'recall': 0.6291079812206573, 'f1': 0.5496308449548811, 'number': 1065} | 0.4540 | 0.5665 | 0.5040 | 0.6156 |
|
72 |
+
| 0.6489 | 14.0 | 140 | 1.0557 | {'precision': 0.4165009940357853, 'recall': 0.5179233621755254, 'f1': 0.4617079889807163, 'number': 809} | {'precision': 0.4, 'recall': 0.2689075630252101, 'f1': 0.32160804020100503, 'number': 119} | {'precision': 0.4891304347826087, 'recall': 0.6338028169014085, 'f1': 0.5521472392638037, 'number': 1065} | 0.4566 | 0.5650 | 0.5050 | 0.6142 |
|
73 |
+
| 0.6397 | 15.0 | 150 | 1.0554 | {'precision': 0.4105691056910569, 'recall': 0.49938195302843014, 'f1': 0.45064138315672064, 'number': 809} | {'precision': 0.36470588235294116, 'recall': 0.2605042016806723, 'f1': 0.30392156862745096, 'number': 119} | {'precision': 0.48371104815864024, 'recall': 0.6413145539906103, 'f1': 0.551473556721841, 'number': 1065} | 0.4506 | 0.5610 | 0.4998 | 0.6149 |
|
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.1712841890.90d122649371.3714.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:f72555491522d4f791bb8101103326c531ff05895cfc113bb398cd0691dd574e
|
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:ac859c177696aeecbaea07e47159cab740ee378589c0474f201fce6cfc79bcb8
|
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
|
|