alexneakameni
commited on
Commit
·
7104f0c
1
Parent(s):
602f3e9
End of training
Browse files- README.md +79 -0
- logs/events.out.tfevents.1681859094.eak.29506.0 +2 -2
- preprocessor_config.json +14 -0
- pytorch_model.bin +1 -1
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +38 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.7960
|
19 |
+
- Answer: {'precision': 0.7169603524229075, 'recall': 0.8046971569839307, 'f1': 0.7582993593476993, 'number': 809}
|
20 |
+
- Header: {'precision': 0.36619718309859156, 'recall': 0.4369747899159664, 'f1': 0.39846743295019166, 'number': 119}
|
21 |
+
- Question: {'precision': 0.7883408071748879, 'recall': 0.8253521126760563, 'f1': 0.8064220183486238, 'number': 1065}
|
22 |
+
- Overall Precision: 0.7307
|
23 |
+
- Overall Recall: 0.7938
|
24 |
+
- Overall F1: 0.7609
|
25 |
+
- Overall Accuracy: 0.8081
|
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: 6
|
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: 15
|
51 |
+
- mixed_precision_training: Native AMP
|
52 |
+
|
53 |
+
### Training results
|
54 |
+
|
55 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
56 |
+
|:-------------:|:-----:|:----:|:---------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
57 |
+
| 1.6386 | 1.0 | 25 | 1.2949 | {'precision': 0.08352668213457076, 'recall': 0.08899876390605686, 'f1': 0.08617594254937162, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.36874571624400276, 'recall': 0.5051643192488263, 'f1': 0.42630744849445323, 'number': 1065} | 0.2628 | 0.3061 | 0.2828 | 0.5116 |
|
58 |
+
| 1.0433 | 2.0 | 50 | 0.8005 | {'precision': 0.5965447154471545, 'recall': 0.7255871446229913, 'f1': 0.6547685443390964, 'number': 809} | {'precision': 0.1111111111111111, 'recall': 0.058823529411764705, 'f1': 0.07692307692307691, 'number': 119} | {'precision': 0.6574487065120428, 'recall': 0.692018779342723, 'f1': 0.6742909423604757, 'number': 1065} | 0.6139 | 0.6678 | 0.6398 | 0.7293 |
|
59 |
+
| 0.6891 | 3.0 | 75 | 0.6695 | {'precision': 0.6335650446871897, 'recall': 0.788627935723115, 'f1': 0.7026431718061674, 'number': 809} | {'precision': 0.3246753246753247, 'recall': 0.21008403361344538, 'f1': 0.25510204081632654, 'number': 119} | {'precision': 0.7085862966175195, 'recall': 0.7671361502347418, 'f1': 0.7366997294860236, 'number': 1065} | 0.6616 | 0.7426 | 0.6998 | 0.7752 |
|
60 |
+
| 0.532 | 4.0 | 100 | 0.6270 | {'precision': 0.6573787409700722, 'recall': 0.7873918417799752, 'f1': 0.7165354330708661, 'number': 809} | {'precision': 0.2361111111111111, 'recall': 0.2857142857142857, 'f1': 0.25855513307984795, 'number': 119} | {'precision': 0.7153284671532847, 'recall': 0.828169014084507, 'f1': 0.7676240208877285, 'number': 1065} | 0.6620 | 0.7792 | 0.7158 | 0.7961 |
|
61 |
+
| 0.4184 | 5.0 | 125 | 0.6174 | {'precision': 0.6837160751565762, 'recall': 0.8096415327564895, 'f1': 0.7413695529145445, 'number': 809} | {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119} | {'precision': 0.7734657039711191, 'recall': 0.8046948356807512, 'f1': 0.7887712839392544, 'number': 1065} | 0.7102 | 0.7757 | 0.7415 | 0.8025 |
|
62 |
+
| 0.3264 | 6.0 | 150 | 0.6493 | {'precision': 0.6905537459283387, 'recall': 0.7861557478368356, 'f1': 0.7352601156069365, 'number': 809} | {'precision': 0.310126582278481, 'recall': 0.4117647058823529, 'f1': 0.35379061371841153, 'number': 119} | {'precision': 0.7713523131672598, 'recall': 0.8140845070422535, 'f1': 0.7921425308359983, 'number': 1065} | 0.7045 | 0.7787 | 0.7398 | 0.8008 |
|
63 |
+
| 0.2661 | 7.0 | 175 | 0.6587 | {'precision': 0.6857440166493236, 'recall': 0.8145859085290482, 'f1': 0.7446327683615819, 'number': 809} | {'precision': 0.32575757575757575, 'recall': 0.36134453781512604, 'f1': 0.3426294820717131, 'number': 119} | {'precision': 0.7720970537261699, 'recall': 0.8366197183098592, 'f1': 0.8030644434429923, 'number': 1065} | 0.7089 | 0.7993 | 0.7514 | 0.8038 |
|
64 |
+
| 0.2246 | 8.0 | 200 | 0.7115 | {'precision': 0.7111356119073869, 'recall': 0.7972805933250927, 'f1': 0.7517482517482517, 'number': 809} | {'precision': 0.2983425414364641, 'recall': 0.453781512605042, 'f1': 0.36, 'number': 119} | {'precision': 0.7891402714932126, 'recall': 0.8187793427230047, 'f1': 0.8036866359447005, 'number': 1065} | 0.7164 | 0.7883 | 0.7506 | 0.8074 |
|
65 |
+
| 0.1928 | 9.0 | 225 | 0.7130 | {'precision': 0.7094668117519043, 'recall': 0.8059332509270705, 'f1': 0.7546296296296295, 'number': 809} | {'precision': 0.3178294573643411, 'recall': 0.3445378151260504, 'f1': 0.33064516129032256, 'number': 119} | {'precision': 0.7908025247971145, 'recall': 0.8234741784037559, 'f1': 0.8068077276908925, 'number': 1065} | 0.7279 | 0.7878 | 0.7566 | 0.8042 |
|
66 |
+
| 0.1598 | 10.0 | 250 | 0.7375 | {'precision': 0.7242937853107345, 'recall': 0.792336217552534, 'f1': 0.756788665879575, 'number': 809} | {'precision': 0.375, 'recall': 0.42857142857142855, 'f1': 0.39999999999999997, 'number': 119} | {'precision': 0.788858939802336, 'recall': 0.8244131455399061, 'f1': 0.8062442607897153, 'number': 1065} | 0.7357 | 0.7878 | 0.7608 | 0.8099 |
|
67 |
+
| 0.1444 | 11.0 | 275 | 0.7719 | {'precision': 0.7027896995708155, 'recall': 0.8096415327564895, 'f1': 0.7524411257897761, 'number': 809} | {'precision': 0.34814814814814815, 'recall': 0.3949579831932773, 'f1': 0.3700787401574803, 'number': 119} | {'precision': 0.7825311942959001, 'recall': 0.8244131455399061, 'f1': 0.8029263831732967, 'number': 1065} | 0.7218 | 0.7928 | 0.7556 | 0.8008 |
|
68 |
+
| 0.1251 | 12.0 | 300 | 0.7758 | {'precision': 0.7133479212253829, 'recall': 0.8059332509270705, 'f1': 0.7568195008705745, 'number': 809} | {'precision': 0.38095238095238093, 'recall': 0.40336134453781514, 'f1': 0.39183673469387753, 'number': 119} | {'precision': 0.7880434782608695, 'recall': 0.8169014084507042, 'f1': 0.8022130013831259, 'number': 1065} | 0.7323 | 0.7878 | 0.7590 | 0.8077 |
|
69 |
+
| 0.1124 | 13.0 | 325 | 0.7878 | {'precision': 0.7150776053215078, 'recall': 0.7972805933250927, 'f1': 0.7539450613676213, 'number': 809} | {'precision': 0.38848920863309355, 'recall': 0.453781512605042, 'f1': 0.4186046511627907, 'number': 119} | {'precision': 0.7922312556458898, 'recall': 0.8234741784037559, 'f1': 0.8075506445672191, 'number': 1065} | 0.7337 | 0.7908 | 0.7612 | 0.8094 |
|
70 |
+
| 0.1077 | 14.0 | 350 | 0.7945 | {'precision': 0.7136612021857923, 'recall': 0.8071693448702101, 'f1': 0.7575406032482598, 'number': 809} | {'precision': 0.36619718309859156, 'recall': 0.4369747899159664, 'f1': 0.39846743295019166, 'number': 119} | {'precision': 0.7887197851387645, 'recall': 0.8272300469483568, 'f1': 0.8075160403299725, 'number': 1065} | 0.7295 | 0.7958 | 0.7612 | 0.8098 |
|
71 |
+
| 0.1001 | 15.0 | 375 | 0.7960 | {'precision': 0.7169603524229075, 'recall': 0.8046971569839307, 'f1': 0.7582993593476993, 'number': 809} | {'precision': 0.36619718309859156, 'recall': 0.4369747899159664, 'f1': 0.39846743295019166, 'number': 119} | {'precision': 0.7883408071748879, 'recall': 0.8253521126760563, 'f1': 0.8064220183486238, 'number': 1065} | 0.7307 | 0.7938 | 0.7609 | 0.8081 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.28.1
|
77 |
+
- Pytorch 2.0.0+cu117
|
78 |
+
- Datasets 2.11.0
|
79 |
+
- Tokenizers 0.13.3
|
logs/events.out.tfevents.1681859094.eak.29506.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:5f1f7505f6149ed140df0192472cc1603c70baa236e588b1cc056a3d651ebee1
|
3 |
+
size 14455
|
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 |
+
}
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 450608389
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fcd706ab0aa533531ef17e8bf33db9b2a5c986de7f0fac0536ee99606e95cab1
|
3 |
size 450608389
|
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,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": null,
|
3 |
+
"apply_ocr": false,
|
4 |
+
"clean_up_tokenization_spaces": true,
|
5 |
+
"cls_token": "[CLS]",
|
6 |
+
"cls_token_box": [
|
7 |
+
0,
|
8 |
+
0,
|
9 |
+
0,
|
10 |
+
0
|
11 |
+
],
|
12 |
+
"do_basic_tokenize": true,
|
13 |
+
"do_lower_case": true,
|
14 |
+
"mask_token": "[MASK]",
|
15 |
+
"model_max_length": 512,
|
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 |
+
"strip_accents": null,
|
35 |
+
"tokenize_chinese_chars": true,
|
36 |
+
"tokenizer_class": "LayoutLMv2Tokenizer",
|
37 |
+
"unk_token": "[UNK]"
|
38 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|