ritutweets46
commited on
Commit
•
a166494
1
Parent(s):
96afe61
End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1709647988.05d8ace24c34.1074.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.0745
|
21 |
+
- Answer: {'precision': 0.3554006968641115, 'recall': 0.5043263288009888, 'f1': 0.41696474195196725, 'number': 809}
|
22 |
+
- Header: {'precision': 0.3411764705882353, 'recall': 0.24369747899159663, 'f1': 0.28431372549019607, 'number': 119}
|
23 |
+
- Question: {'precision': 0.4910979228486647, 'recall': 0.6215962441314554, 'f1': 0.5486945710733527, 'number': 1065}
|
24 |
+
- Overall Precision: 0.4258
|
25 |
+
- Overall Recall: 0.5514
|
26 |
+
- Overall F1: 0.4805
|
27 |
+
- Overall Accuracy: 0.6117
|
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.7729 | 1.0 | 10 | 1.5447 | {'precision': 0.04415584415584416, 'recall': 0.042027194066749075, 'f1': 0.04306523115896137, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.22091584158415842, 'recall': 0.3352112676056338, 'f1': 0.26631853785900783, 'number': 1065} | 0.1639 | 0.1962 | 0.1786 | 0.3568 |
|
60 |
+
| 1.4627 | 2.0 | 20 | 1.3779 | {'precision': 0.12121212121212122, 'recall': 0.2373300370828183, 'f1': 0.16046803175929797, 'number': 809} | {'precision': 0.04081632653061224, 'recall': 0.01680672268907563, 'f1': 0.023809523809523808, 'number': 119} | {'precision': 0.23460246360582307, 'recall': 0.39342723004694835, 'f1': 0.293931953700456, 'number': 1065} | 0.1793 | 0.3076 | 0.2265 | 0.4108 |
|
61 |
+
| 1.2914 | 3.0 | 30 | 1.2345 | {'precision': 0.15814696485623003, 'recall': 0.24474660074165636, 'f1': 0.19213973799126638, 'number': 809} | {'precision': 0.15789473684210525, 'recall': 0.12605042016806722, 'f1': 0.14018691588785046, 'number': 119} | {'precision': 0.31094527363184077, 'recall': 0.5868544600938967, 'f1': 0.4065040650406504, 'number': 1065} | 0.2496 | 0.4205 | 0.3133 | 0.4524 |
|
62 |
+
| 1.1698 | 4.0 | 40 | 1.1615 | {'precision': 0.2040990606319385, 'recall': 0.2954264524103832, 'f1': 0.2414141414141414, 'number': 809} | {'precision': 0.19387755102040816, 'recall': 0.15966386554621848, 'f1': 0.17511520737327188, 'number': 119} | {'precision': 0.351129363449692, 'recall': 0.6422535211267606, 'f1': 0.4540325257218719, 'number': 1065} | 0.2928 | 0.4727 | 0.3616 | 0.4925 |
|
63 |
+
| 1.096 | 5.0 | 50 | 1.1141 | {'precision': 0.22423802612481858, 'recall': 0.3819530284301607, 'f1': 0.28257887517146774, 'number': 809} | {'precision': 0.2682926829268293, 'recall': 0.18487394957983194, 'f1': 0.21890547263681595, 'number': 119} | {'precision': 0.3757159221076747, 'recall': 0.615962441314554, 'f1': 0.4667378157239417, 'number': 1065} | 0.3079 | 0.4952 | 0.3797 | 0.5360 |
|
64 |
+
| 1.0157 | 6.0 | 60 | 1.0480 | {'precision': 0.27807900852052675, 'recall': 0.4437577255871446, 'f1': 0.34190476190476193, 'number': 809} | {'precision': 0.3013698630136986, 'recall': 0.18487394957983194, 'f1': 0.22916666666666669, 'number': 119} | {'precision': 0.45481049562682213, 'recall': 0.5859154929577465, 'f1': 0.512105047189167, 'number': 1065} | 0.3673 | 0.5043 | 0.4250 | 0.5881 |
|
65 |
+
| 0.9412 | 7.0 | 70 | 1.0314 | {'precision': 0.29177057356608477, 'recall': 0.4338689740420272, 'f1': 0.34890656063618286, 'number': 809} | {'precision': 0.2926829268292683, 'recall': 0.20168067226890757, 'f1': 0.23880597014925373, 'number': 119} | {'precision': 0.45625451916124365, 'recall': 0.5924882629107981, 'f1': 0.5155228758169934, 'number': 1065} | 0.3771 | 0.5048 | 0.4317 | 0.5961 |
|
66 |
+
| 0.8828 | 8.0 | 80 | 1.0804 | {'precision': 0.3174061433447099, 'recall': 0.45982694684796044, 'f1': 0.37556789500252397, 'number': 809} | {'precision': 0.2828282828282828, 'recall': 0.23529411764705882, 'f1': 0.25688073394495414, 'number': 119} | {'precision': 0.46117804551539493, 'recall': 0.6469483568075117, 'f1': 0.5384915982805784, 'number': 1065} | 0.3939 | 0.5464 | 0.4578 | 0.5872 |
|
67 |
+
| 0.8304 | 9.0 | 90 | 1.0436 | {'precision': 0.3404255319148936, 'recall': 0.49443757725587145, 'f1': 0.40322580645161293, 'number': 809} | {'precision': 0.36363636363636365, 'recall': 0.23529411764705882, 'f1': 0.2857142857142857, 'number': 119} | {'precision': 0.4878765613519471, 'recall': 0.6234741784037559, 'f1': 0.5474031327287716, 'number': 1065} | 0.4179 | 0.5479 | 0.4742 | 0.6095 |
|
68 |
+
| 0.814 | 10.0 | 100 | 1.0871 | {'precision': 0.3464391691394659, 'recall': 0.5772558714462299, 'f1': 0.4330088085303662, 'number': 809} | {'precision': 0.4166666666666667, 'recall': 0.25210084033613445, 'f1': 0.31413612565445026, 'number': 119} | {'precision': 0.5084294587400178, 'recall': 0.5380281690140845, 'f1': 0.5228102189781022, 'number': 1065} | 0.4201 | 0.5369 | 0.4714 | 0.5989 |
|
69 |
+
| 0.7273 | 11.0 | 110 | 1.0650 | {'precision': 0.3483348334833483, 'recall': 0.4783683559950556, 'f1': 0.40312499999999996, 'number': 809} | {'precision': 0.30434782608695654, 'recall': 0.23529411764705882, 'f1': 0.2654028436018957, 'number': 119} | {'precision': 0.4900953778429934, 'recall': 0.6272300469483568, 'f1': 0.5502471169686985, 'number': 1065} | 0.4221 | 0.5434 | 0.4751 | 0.6139 |
|
70 |
+
| 0.7257 | 12.0 | 120 | 1.1221 | {'precision': 0.34212629896083135, 'recall': 0.5290482076637825, 'f1': 0.41553398058252433, 'number': 809} | {'precision': 0.38666666666666666, 'recall': 0.24369747899159663, 'f1': 0.29896907216494845, 'number': 119} | {'precision': 0.48787878787878786, 'recall': 0.6046948356807512, 'f1': 0.5400419287211741, 'number': 1065} | 0.4161 | 0.5524 | 0.4747 | 0.6032 |
|
71 |
+
| 0.694 | 13.0 | 130 | 1.0688 | {'precision': 0.3702451394759087, 'recall': 0.5414091470951793, 'f1': 0.43975903614457834, 'number': 809} | {'precision': 0.345679012345679, 'recall': 0.23529411764705882, 'f1': 0.27999999999999997, 'number': 119} | {'precision': 0.5052041633306645, 'recall': 0.5924882629107981, 'f1': 0.5453759723422645, 'number': 1065} | 0.4365 | 0.5504 | 0.4869 | 0.6148 |
|
72 |
+
| 0.6617 | 14.0 | 140 | 1.0465 | {'precision': 0.3598901098901099, 'recall': 0.4857849196538937, 'f1': 0.41346659652814305, 'number': 809} | {'precision': 0.3411764705882353, 'recall': 0.24369747899159663, 'f1': 0.28431372549019607, 'number': 119} | {'precision': 0.48916184971098264, 'recall': 0.6356807511737089, 'f1': 0.5528787260106166, 'number': 1065} | 0.4291 | 0.5514 | 0.4827 | 0.6191 |
|
73 |
+
| 0.6536 | 15.0 | 150 | 1.0745 | {'precision': 0.3554006968641115, 'recall': 0.5043263288009888, 'f1': 0.41696474195196725, 'number': 809} | {'precision': 0.3411764705882353, 'recall': 0.24369747899159663, 'f1': 0.28431372549019607, 'number': 119} | {'precision': 0.4910979228486647, 'recall': 0.6215962441314554, 'f1': 0.5486945710733527, 'number': 1065} | 0.4258 | 0.5514 | 0.4805 | 0.6117 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.38.2
|
79 |
+
- Pytorch 2.1.0+cu121
|
80 |
+
- Datasets 2.18.0
|
81 |
+
- Tokenizers 0.15.2
|
logs/events.out.tfevents.1709647988.05d8ace24c34.1074.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:e79f9aae5a0bf0684f01e536a7ac5e06bb47328ea7679ff34df8fb7b88439a75
|
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:44bf6b7f6c1a397fc20e2ce394c8c44a7ea9d3fbe29f9428b222a38521b2f0bc
|
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
|
|