richardsdexa
commited on
Commit
•
f8f0ccb
1
Parent(s):
10b6cef
Training in progress, epoch 1
Browse files- README.md +81 -0
- logs/events.out.tfevents.1711515807.DESKTOP-3M5IIL5 +2 -2
- logs/events.out.tfevents.1711516332.DESKTOP-3M5IIL5 +3 -0
- model.safetensors +1 -1
- preprocessor_config.json +14 -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.1153
|
21 |
+
- Answer: {'precision': 0.3834652594547054, 'recall': 0.5389369592088998, 'f1': 0.44809866392600206, 'number': 809}
|
22 |
+
- Header: {'precision': 0.29347826086956524, 'recall': 0.226890756302521, 'f1': 0.2559241706161137, 'number': 119}
|
23 |
+
- Question: {'precision': 0.5310457516339869, 'recall': 0.6103286384976526, 'f1': 0.5679335954565312, 'number': 1065}
|
24 |
+
- Overall Precision: 0.4537
|
25 |
+
- Overall Recall: 0.5585
|
26 |
+
- Overall F1: 0.5007
|
27 |
+
- Overall Accuracy: 0.6247
|
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.7836 | 1.0 | 10 | 1.5583 | {'precision': 0.03470919324577861, 'recall': 0.04573547589616811, 'f1': 0.039466666666666664, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.1947049089906233, 'recall': 0.3314553990610329, 'f1': 0.24530924252953445, 'number': 1065} | 0.1355 | 0.1957 | 0.1601 | 0.3600 |
|
60 |
+
| 1.4728 | 2.0 | 20 | 1.3281 | {'precision': 0.1966216216216216, 'recall': 0.35970333745364647, 'f1': 0.25425950196592395, 'number': 809} | {'precision': 0.017543859649122806, 'recall': 0.008403361344537815, 'f1': 0.011363636363636362, 'number': 119} | {'precision': 0.2851758793969849, 'recall': 0.4262910798122066, 'f1': 0.34173880316146027, 'number': 1065} | 0.2384 | 0.3743 | 0.2913 | 0.4276 |
|
61 |
+
| 1.2767 | 3.0 | 30 | 1.1812 | {'precision': 0.24393624393624394, 'recall': 0.43510506798516685, 'f1': 0.3126110124333925, 'number': 809} | {'precision': 0.21052631578947367, 'recall': 0.16806722689075632, 'f1': 0.1869158878504673, 'number': 119} | {'precision': 0.36664584634603375, 'recall': 0.5511737089201878, 'f1': 0.4403600900225056, 'number': 1065} | 0.3055 | 0.4812 | 0.3737 | 0.4924 |
|
62 |
+
| 1.1394 | 4.0 | 40 | 1.1120 | {'precision': 0.28407350689127103, 'recall': 0.45859085290482077, 'f1': 0.35082742316784865, 'number': 809} | {'precision': 0.24691358024691357, 'recall': 0.16806722689075632, 'f1': 0.2, 'number': 119} | {'precision': 0.47240802675585286, 'recall': 0.5305164319248826, 'f1': 0.4997788589119858, 'number': 1065} | 0.3701 | 0.4797 | 0.4178 | 0.5608 |
|
63 |
+
| 1.0619 | 5.0 | 50 | 1.1166 | {'precision': 0.29784454604833444, 'recall': 0.5636588380716935, 'f1': 0.38974358974358975, 'number': 809} | {'precision': 0.30303030303030304, 'recall': 0.16806722689075632, 'f1': 0.21621621621621626, 'number': 119} | {'precision': 0.4780621572212066, 'recall': 0.49107981220657276, 'f1': 0.4844835572024085, 'number': 1065} | 0.3712 | 0.5013 | 0.4266 | 0.5636 |
|
64 |
+
| 0.9741 | 6.0 | 60 | 1.0751 | {'precision': 0.33383010432190763, 'recall': 0.553770086526576, 'f1': 0.4165504416550442, 'number': 809} | {'precision': 0.2676056338028169, 'recall': 0.15966386554621848, 'f1': 0.19999999999999998, 'number': 119} | {'precision': 0.5021570319240725, 'recall': 0.5464788732394367, 'f1': 0.5233812949640289, 'number': 1065} | 0.4079 | 0.5263 | 0.4596 | 0.5844 |
|
65 |
+
| 0.907 | 7.0 | 70 | 1.0587 | {'precision': 0.3643835616438356, 'recall': 0.4932014833127318, 'f1': 0.41911764705882354, 'number': 809} | {'precision': 0.2125, 'recall': 0.14285714285714285, 'f1': 0.1708542713567839, 'number': 119} | {'precision': 0.5027624309392266, 'recall': 0.5981220657276995, 'f1': 0.5463121783876502, 'number': 1065} | 0.4312 | 0.5283 | 0.4749 | 0.6038 |
|
66 |
+
| 0.8469 | 8.0 | 80 | 1.1514 | {'precision': 0.365814696485623, 'recall': 0.5661310259579728, 'f1': 0.4444444444444444, 'number': 809} | {'precision': 0.25, 'recall': 0.16806722689075632, 'f1': 0.20100502512562815, 'number': 119} | {'precision': 0.5555555555555556, 'recall': 0.4788732394366197, 'f1': 0.5143721633888049, 'number': 1065} | 0.4391 | 0.4957 | 0.4657 | 0.5893 |
|
67 |
+
| 0.7877 | 9.0 | 90 | 1.0944 | {'precision': 0.37608318890814557, 'recall': 0.5364647713226205, 'f1': 0.44218033622007136, 'number': 809} | {'precision': 0.2558139534883721, 'recall': 0.18487394957983194, 'f1': 0.21463414634146344, 'number': 119} | {'precision': 0.531934306569343, 'recall': 0.5474178403755868, 'f1': 0.5395650161962054, 'number': 1065} | 0.4448 | 0.5213 | 0.4800 | 0.6101 |
|
68 |
+
| 0.7464 | 10.0 | 100 | 1.0861 | {'precision': 0.3794642857142857, 'recall': 0.5253399258343634, 'f1': 0.4406428201140487, 'number': 809} | {'precision': 0.24444444444444444, 'recall': 0.18487394957983194, 'f1': 0.21052631578947367, 'number': 119} | {'precision': 0.5038699690402477, 'recall': 0.6112676056338028, 'f1': 0.5523971149766653, 'number': 1065} | 0.4388 | 0.5509 | 0.4885 | 0.6188 |
|
69 |
+
| 0.7109 | 11.0 | 110 | 1.0985 | {'precision': 0.3770491803278688, 'recall': 0.5401730531520396, 'f1': 0.44410569105691056, 'number': 809} | {'precision': 0.30120481927710846, 'recall': 0.21008403361344538, 'f1': 0.24752475247524758, 'number': 119} | {'precision': 0.5317725752508361, 'recall': 0.5971830985915493, 'f1': 0.5625829279080052, 'number': 1065} | 0.4504 | 0.5509 | 0.4956 | 0.6204 |
|
70 |
+
| 0.6833 | 12.0 | 120 | 1.1252 | {'precision': 0.380327868852459, 'recall': 0.5735475896168108, 'f1': 0.45736816165598815, 'number': 809} | {'precision': 0.2967032967032967, 'recall': 0.226890756302521, 'f1': 0.2571428571428572, 'number': 119} | {'precision': 0.5510018214936248, 'recall': 0.568075117370892, 'f1': 0.559408229311142, 'number': 1065} | 0.4550 | 0.5499 | 0.4980 | 0.6213 |
|
71 |
+
| 0.6591 | 13.0 | 130 | 1.1009 | {'precision': 0.38546458141674333, 'recall': 0.5179233621755254, 'f1': 0.4419831223628692, 'number': 809} | {'precision': 0.25742574257425743, 'recall': 0.2184873949579832, 'f1': 0.23636363636363636, 'number': 119} | {'precision': 0.5226400613967767, 'recall': 0.6394366197183099, 'f1': 0.575168918918919, 'number': 1065} | 0.4520 | 0.5650 | 0.5022 | 0.6212 |
|
72 |
+
| 0.639 | 14.0 | 140 | 1.1190 | {'precision': 0.3828125, 'recall': 0.484548825710754, 'f1': 0.42771412984178947, 'number': 809} | {'precision': 0.2755102040816326, 'recall': 0.226890756302521, 'f1': 0.2488479262672811, 'number': 119} | {'precision': 0.5295527156549521, 'recall': 0.6225352112676056, 'f1': 0.5722917565817868, 'number': 1065} | 0.4558 | 0.5429 | 0.4955 | 0.6197 |
|
73 |
+
| 0.6544 | 15.0 | 150 | 1.1153 | {'precision': 0.3834652594547054, 'recall': 0.5389369592088998, 'f1': 0.44809866392600206, 'number': 809} | {'precision': 0.29347826086956524, 'recall': 0.226890756302521, 'f1': 0.2559241706161137, 'number': 119} | {'precision': 0.5310457516339869, 'recall': 0.6103286384976526, 'f1': 0.5679335954565312, 'number': 1065} | 0.4537 | 0.5585 | 0.5007 | 0.6247 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.36.2
|
79 |
+
- Pytorch 2.1.2+cu118
|
80 |
+
- Datasets 2.18.0
|
81 |
+
- Tokenizers 0.15.0
|
logs/events.out.tfevents.1711515807.DESKTOP-3M5IIL5
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:b7303cc18bc41955c6c87eca1e49c5ec9cc79b3d9e517507d9a052ce173e21e6
|
3 |
+
size 14681
|
logs/events.out.tfevents.1711516332.DESKTOP-3M5IIL5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:876ca6fdeb58824c75835144a30bf6272f72627f777ef3359e4351e9cf901044
|
3 |
+
size 4757
|
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:0daa5562b7f36a291a4a4b46c0359cc9317126800f9b771185e1dbef9ff64c6e
|
3 |
size 450558212
|
preprocessor_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"apply_ocr": true,
|
3 |
+
"do_resize": true,
|
4 |
+
"feature_extractor_type": "LayoutLMv2FeatureExtractor",
|
5 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
6 |
+
"ocr_lang": null,
|
7 |
+
"processor_class": "LayoutLMv2Processor",
|
8 |
+
"resample": 2,
|
9 |
+
"size": {
|
10 |
+
"height": 224,
|
11 |
+
"width": 224
|
12 |
+
},
|
13 |
+
"tesseract_config": ""
|
14 |
+
}
|
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
|
|