mouadhamri
commited on
Commit
•
1415140
1
Parent(s):
e1dcf45
End of training
Browse files- README.md +79 -0
- 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 |
+
base_model: microsoft/layoutlm-base-uncased
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- funsd
|
7 |
+
model-index:
|
8 |
+
- name: layoutlm-funsd
|
9 |
+
results: []
|
10 |
+
---
|
11 |
+
|
12 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
+
should probably proofread and complete it, then remove this comment. -->
|
14 |
+
|
15 |
+
# layoutlm-funsd
|
16 |
+
|
17 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
18 |
+
It achieves the following results on the evaluation set:
|
19 |
+
- Loss: 0.7011
|
20 |
+
- Answer: {'precision': 0.7142857142857143, 'recall': 0.8096415327564895, 'f1': 0.7589803012746235, 'number': 809}
|
21 |
+
- Header: {'precision': 0.2962962962962963, 'recall': 0.33613445378151263, 'f1': 0.31496062992125984, 'number': 119}
|
22 |
+
- Question: {'precision': 0.7859712230215827, 'recall': 0.8206572769953052, 'f1': 0.8029398254478639, 'number': 1065}
|
23 |
+
- Overall Precision: 0.7250
|
24 |
+
- Overall Recall: 0.7873
|
25 |
+
- Overall F1: 0.7549
|
26 |
+
- Overall Accuracy: 0.8102
|
27 |
+
|
28 |
+
## Model description
|
29 |
+
|
30 |
+
More information needed
|
31 |
+
|
32 |
+
## Intended uses & limitations
|
33 |
+
|
34 |
+
More information needed
|
35 |
+
|
36 |
+
## Training and evaluation data
|
37 |
+
|
38 |
+
More information needed
|
39 |
+
|
40 |
+
## Training procedure
|
41 |
+
|
42 |
+
### Training hyperparameters
|
43 |
+
|
44 |
+
The following hyperparameters were used during training:
|
45 |
+
- learning_rate: 3e-05
|
46 |
+
- train_batch_size: 16
|
47 |
+
- eval_batch_size: 8
|
48 |
+
- seed: 42
|
49 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
50 |
+
- lr_scheduler_type: linear
|
51 |
+
- num_epochs: 15
|
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.7566 | 1.0 | 10 | 1.5349 | {'precision': 0.03646308113035551, 'recall': 0.049443757725587144, 'f1': 0.04197271773347323, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.16700819672131148, 'recall': 0.15305164319248826, 'f1': 0.15972562469377757, 'number': 1065} | 0.0979 | 0.1019 | 0.0999 | 0.4336 |
|
58 |
+
| 1.4057 | 2.0 | 20 | 1.1865 | {'precision': 0.17656500802568217, 'recall': 0.13597033374536466, 'f1': 0.15363128491620115, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.471847739888977, 'recall': 0.5586854460093896, 'f1': 0.5116079105760963, 'number': 1065} | 0.3742 | 0.3537 | 0.3637 | 0.6016 |
|
59 |
+
| 1.0729 | 3.0 | 30 | 0.9241 | {'precision': 0.49693251533742333, 'recall': 0.5006180469715699, 'f1': 0.4987684729064039, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.6378708551483421, 'recall': 0.6863849765258216, 'f1': 0.6612392582541836, 'number': 1065} | 0.5691 | 0.5700 | 0.5696 | 0.7181 |
|
60 |
+
| 0.8134 | 4.0 | 40 | 0.7831 | {'precision': 0.6211640211640211, 'recall': 0.7255871446229913, 'f1': 0.669327251995439, 'number': 809} | {'precision': 0.09375, 'recall': 0.05042016806722689, 'f1': 0.0655737704918033, 'number': 119} | {'precision': 0.6889081455805892, 'recall': 0.7464788732394366, 'f1': 0.7165389815232085, 'number': 1065} | 0.6417 | 0.6964 | 0.6679 | 0.7640 |
|
61 |
+
| 0.6582 | 5.0 | 50 | 0.7298 | {'precision': 0.6422018348623854, 'recall': 0.7787391841779975, 'f1': 0.7039106145251396, 'number': 809} | {'precision': 0.2361111111111111, 'recall': 0.14285714285714285, 'f1': 0.17801047120418848, 'number': 119} | {'precision': 0.7311233885819521, 'recall': 0.7455399061032864, 'f1': 0.7382612738261274, 'number': 1065} | 0.6737 | 0.7230 | 0.6975 | 0.7761 |
|
62 |
+
| 0.553 | 6.0 | 60 | 0.6763 | {'precision': 0.6673532440782698, 'recall': 0.8009888751545118, 'f1': 0.7280898876404494, 'number': 809} | {'precision': 0.25806451612903225, 'recall': 0.20168067226890757, 'f1': 0.22641509433962265, 'number': 119} | {'precision': 0.735445205479452, 'recall': 0.8065727699530516, 'f1': 0.7693685624720108, 'number': 1065} | 0.6859 | 0.7682 | 0.7247 | 0.7962 |
|
63 |
+
| 0.4805 | 7.0 | 70 | 0.6797 | {'precision': 0.6904255319148936, 'recall': 0.8022249690976514, 'f1': 0.7421383647798742, 'number': 809} | {'precision': 0.25925925925925924, 'recall': 0.23529411764705882, 'f1': 0.24669603524229072, 'number': 119} | {'precision': 0.7363945578231292, 'recall': 0.8131455399061033, 'f1': 0.7728692547969657, 'number': 1065} | 0.6938 | 0.7742 | 0.7318 | 0.7970 |
|
64 |
+
| 0.4259 | 8.0 | 80 | 0.6726 | {'precision': 0.689401888772298, 'recall': 0.8121137206427689, 'f1': 0.7457434733257663, 'number': 809} | {'precision': 0.24786324786324787, 'recall': 0.24369747899159663, 'f1': 0.24576271186440676, 'number': 119} | {'precision': 0.7463581833761782, 'recall': 0.8178403755868544, 'f1': 0.7804659498207885, 'number': 1065} | 0.6960 | 0.7812 | 0.7362 | 0.8020 |
|
65 |
+
| 0.3787 | 9.0 | 90 | 0.6784 | {'precision': 0.7043956043956044, 'recall': 0.792336217552534, 'f1': 0.7457824316463061, 'number': 809} | {'precision': 0.26229508196721313, 'recall': 0.2689075630252101, 'f1': 0.26556016597510373, 'number': 119} | {'precision': 0.779707495429616, 'recall': 0.8009389671361502, 'f1': 0.7901806391848076, 'number': 1065} | 0.7178 | 0.7657 | 0.7410 | 0.8026 |
|
66 |
+
| 0.3411 | 10.0 | 100 | 0.6821 | {'precision': 0.7015086206896551, 'recall': 0.8046971569839307, 'f1': 0.7495682210708117, 'number': 809} | {'precision': 0.2708333333333333, 'recall': 0.3277310924369748, 'f1': 0.2965779467680608, 'number': 119} | {'precision': 0.775200713648528, 'recall': 0.815962441314554, 'f1': 0.7950594693504116, 'number': 1065} | 0.7109 | 0.7822 | 0.7449 | 0.8047 |
|
67 |
+
| 0.313 | 11.0 | 110 | 0.7129 | {'precision': 0.7111111111111111, 'recall': 0.7911001236093943, 'f1': 0.7489760093622002, 'number': 809} | {'precision': 0.2835820895522388, 'recall': 0.31932773109243695, 'f1': 0.30039525691699603, 'number': 119} | {'precision': 0.7816711590296496, 'recall': 0.8169014084507042, 'f1': 0.7988980716253444, 'number': 1065} | 0.7210 | 0.7767 | 0.7478 | 0.7994 |
|
68 |
+
| 0.297 | 12.0 | 120 | 0.6955 | {'precision': 0.708779443254818, 'recall': 0.8182941903584673, 'f1': 0.759609868043603, 'number': 809} | {'precision': 0.291044776119403, 'recall': 0.3277310924369748, 'f1': 0.308300395256917, 'number': 119} | {'precision': 0.783978397839784, 'recall': 0.8178403755868544, 'f1': 0.8005514705882352, 'number': 1065} | 0.7214 | 0.7888 | 0.7536 | 0.8103 |
|
69 |
+
| 0.2907 | 13.0 | 130 | 0.7098 | {'precision': 0.7092511013215859, 'recall': 0.796044499381953, 'f1': 0.7501456027955737, 'number': 809} | {'precision': 0.3142857142857143, 'recall': 0.3697478991596639, 'f1': 0.33976833976833976, 'number': 119} | {'precision': 0.7896678966789668, 'recall': 0.8037558685446009, 'f1': 0.796649604467194, 'number': 1065} | 0.7242 | 0.7747 | 0.7486 | 0.8052 |
|
70 |
+
| 0.2701 | 14.0 | 140 | 0.7006 | {'precision': 0.7133479212253829, 'recall': 0.8059332509270705, 'f1': 0.7568195008705745, 'number': 809} | {'precision': 0.3037037037037037, 'recall': 0.3445378151260504, 'f1': 0.3228346456692913, 'number': 119} | {'precision': 0.7894736842105263, 'recall': 0.8169014084507042, 'f1': 0.8029533917858791, 'number': 1065} | 0.7266 | 0.7842 | 0.7543 | 0.8091 |
|
71 |
+
| 0.2649 | 15.0 | 150 | 0.7011 | {'precision': 0.7142857142857143, 'recall': 0.8096415327564895, 'f1': 0.7589803012746235, 'number': 809} | {'precision': 0.2962962962962963, 'recall': 0.33613445378151263, 'f1': 0.31496062992125984, 'number': 119} | {'precision': 0.7859712230215827, 'recall': 0.8206572769953052, 'f1': 0.8029398254478639, 'number': 1065} | 0.7250 | 0.7873 | 0.7549 | 0.8102 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.32.0
|
77 |
+
- Pytorch 2.0.1+cu118
|
78 |
+
- Datasets 2.14.4
|
79 |
+
- Tokenizers 0.13.3
|
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 450603969
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:073ece5b4990116f91de6ced14685a8bb00af0f17fa77679c8cfcf015309bf93
|
3 |
size 450603969
|
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
|
|