Commit
•
6345ff0
1
Parent(s):
9295ec7
End of training
Browse files- README.md +68 -0
- logs/events.out.tfevents.1678372194.d32b24cc545c.19924.0 +2 -2
- preprocessor_config.json +14 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +39 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- generated_from_trainer
|
4 |
+
datasets:
|
5 |
+
- funsd
|
6 |
+
model-index:
|
7 |
+
- name: layoutlm-funsd
|
8 |
+
results: []
|
9 |
+
---
|
10 |
+
|
11 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
12 |
+
should probably proofread and complete it, then remove this comment. -->
|
13 |
+
|
14 |
+
# layoutlm-funsd
|
15 |
+
|
16 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
17 |
+
It achieves the following results on the evaluation set:
|
18 |
+
- Loss: 0.6178
|
19 |
+
- Answer: {'precision': 0.6652719665271967, 'recall': 0.7861557478368356, 'f1': 0.7206798866855525, 'number': 809}
|
20 |
+
- Header: {'precision': 0.29133858267716534, 'recall': 0.31092436974789917, 'f1': 0.3008130081300813, 'number': 119}
|
21 |
+
- Question: {'precision': 0.7537248028045574, 'recall': 0.8075117370892019, 'f1': 0.7796917497733454, 'number': 1065}
|
22 |
+
- Overall Precision: 0.6893
|
23 |
+
- Overall Recall: 0.7692
|
24 |
+
- Overall F1: 0.7271
|
25 |
+
- Overall Accuracy: 0.8014
|
26 |
+
|
27 |
+
## Model description
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Intended uses & limitations
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training and evaluation data
|
36 |
+
|
37 |
+
More information needed
|
38 |
+
|
39 |
+
## Training procedure
|
40 |
+
|
41 |
+
### Training hyperparameters
|
42 |
+
|
43 |
+
The following hyperparameters were used during training:
|
44 |
+
- learning_rate: 3e-05
|
45 |
+
- train_batch_size: 4
|
46 |
+
- eval_batch_size: 4
|
47 |
+
- seed: 42
|
48 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
49 |
+
- lr_scheduler_type: linear
|
50 |
+
- num_epochs: 5
|
51 |
+
|
52 |
+
### Training results
|
53 |
+
|
54 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
55 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
56 |
+
| 1.5284 | 1.0 | 38 | 1.0167 | {'precision': 0.3938144329896907, 'recall': 0.4721878862793572, 'f1': 0.4294547498594716, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5845528455284553, 'recall': 0.6751173708920187, 'f1': 0.6265795206971678, 'number': 1065} | 0.4959 | 0.5524 | 0.5227 | 0.6689 |
|
57 |
+
| 0.8661 | 2.0 | 76 | 0.7179 | {'precision': 0.630346232179226, 'recall': 0.765142150803461, 'f1': 0.6912339475153545, 'number': 809} | {'precision': 0.2087912087912088, 'recall': 0.15966386554621848, 'f1': 0.18095238095238092, 'number': 119} | {'precision': 0.7058823529411765, 'recall': 0.7436619718309859, 'f1': 0.7242798353909465, 'number': 1065} | 0.6515 | 0.7175 | 0.6829 | 0.7596 |
|
58 |
+
| 0.6265 | 3.0 | 114 | 0.6470 | {'precision': 0.6458546571136131, 'recall': 0.7799752781211372, 'f1': 0.7066069428891377, 'number': 809} | {'precision': 0.2972972972972973, 'recall': 0.2773109243697479, 'f1': 0.28695652173913044, 'number': 119} | {'precision': 0.7359649122807017, 'recall': 0.787793427230047, 'f1': 0.7609977324263038, 'number': 1065} | 0.6746 | 0.7541 | 0.7122 | 0.7879 |
|
59 |
+
| 0.5076 | 4.0 | 152 | 0.6207 | {'precision': 0.6680851063829787, 'recall': 0.7762669962917181, 'f1': 0.7181246426529445, 'number': 809} | {'precision': 0.28, 'recall': 0.29411764705882354, 'f1': 0.28688524590163933, 'number': 119} | {'precision': 0.7368421052631579, 'recall': 0.828169014084507, 'f1': 0.7798408488063661, 'number': 1065} | 0.6830 | 0.7752 | 0.7262 | 0.8003 |
|
60 |
+
| 0.4471 | 5.0 | 190 | 0.6178 | {'precision': 0.6652719665271967, 'recall': 0.7861557478368356, 'f1': 0.7206798866855525, 'number': 809} | {'precision': 0.29133858267716534, 'recall': 0.31092436974789917, 'f1': 0.3008130081300813, 'number': 119} | {'precision': 0.7537248028045574, 'recall': 0.8075117370892019, 'f1': 0.7796917497733454, 'number': 1065} | 0.6893 | 0.7692 | 0.7271 | 0.8014 |
|
61 |
+
|
62 |
+
|
63 |
+
### Framework versions
|
64 |
+
|
65 |
+
- Transformers 4.26.1
|
66 |
+
- Pytorch 1.13.1+cu116
|
67 |
+
- Datasets 2.10.1
|
68 |
+
- Tokenizers 0.13.2
|
logs/events.out.tfevents.1678372194.d32b24cc545c.19924.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:ce4b624816d1162f4ee2b8944049e4badaa006c3c0139dcdf05bc6182bf0f4f8
|
3 |
+
size 7714
|
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,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": null,
|
3 |
+
"apply_ocr": false,
|
4 |
+
"cls_token": "[CLS]",
|
5 |
+
"cls_token_box": [
|
6 |
+
0,
|
7 |
+
0,
|
8 |
+
0,
|
9 |
+
0
|
10 |
+
],
|
11 |
+
"do_basic_tokenize": true,
|
12 |
+
"do_lower_case": true,
|
13 |
+
"mask_token": "[MASK]",
|
14 |
+
"model_max_length": 512,
|
15 |
+
"name_or_path": "microsoft/layoutlmv2-base-uncased",
|
16 |
+
"never_split": null,
|
17 |
+
"only_label_first_subword": true,
|
18 |
+
"pad_token": "[PAD]",
|
19 |
+
"pad_token_box": [
|
20 |
+
0,
|
21 |
+
0,
|
22 |
+
0,
|
23 |
+
0
|
24 |
+
],
|
25 |
+
"pad_token_label": -100,
|
26 |
+
"processor_class": "LayoutLMv2Processor",
|
27 |
+
"sep_token": "[SEP]",
|
28 |
+
"sep_token_box": [
|
29 |
+
1000,
|
30 |
+
1000,
|
31 |
+
1000,
|
32 |
+
1000
|
33 |
+
],
|
34 |
+
"special_tokens_map_file": null,
|
35 |
+
"strip_accents": null,
|
36 |
+
"tokenize_chinese_chars": true,
|
37 |
+
"tokenizer_class": "LayoutLMv2Tokenizer",
|
38 |
+
"unk_token": "[UNK]"
|
39 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|