End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1717252354.280ef54c6982.3413.0 +2 -2
- model.safetensors +1 -1
- preprocessor_config.json +25 -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: 0.7085
|
21 |
+
- Answer: {'precision': 0.721081081081081, 'recall': 0.8244746600741656, 'f1': 0.7693194925028833, 'number': 809}
|
22 |
+
- Header: {'precision': 0.3252032520325203, 'recall': 0.33613445378151263, 'f1': 0.3305785123966942, 'number': 119}
|
23 |
+
- Question: {'precision': 0.7871772039180766, 'recall': 0.8300469483568075, 'f1': 0.8080438756855575, 'number': 1065}
|
24 |
+
- Overall Precision: 0.7328
|
25 |
+
- Overall Recall: 0.7983
|
26 |
+
- Overall F1: 0.7642
|
27 |
+
- Overall Accuracy: 0.8112
|
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.792 | 1.0 | 10 | 1.5932 | {'precision': 0.03648648648648649, 'recall': 0.03337453646477132, 'f1': 0.034861200774693346, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.3541114058355438, 'recall': 0.2507042253521127, 'f1': 0.29356789444749865, 'number': 1065} | 0.1968 | 0.1475 | 0.1686 | 0.3760 |
|
60 |
+
| 1.4339 | 2.0 | 20 | 1.2410 | {'precision': 0.2177121771217712, 'recall': 0.21878862793572312, 'f1': 0.218249075215783, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.43688639551192143, 'recall': 0.5849765258215962, 'f1': 0.5002007226013649, 'number': 1065} | 0.3573 | 0.4014 | 0.3781 | 0.5877 |
|
61 |
+
| 1.0937 | 3.0 | 30 | 0.9505 | {'precision': 0.45005149330587024, 'recall': 0.5401730531520396, 'f1': 0.4910112359550562, 'number': 809} | {'precision': 0.045454545454545456, 'recall': 0.008403361344537815, 'f1': 0.014184397163120567, 'number': 119} | {'precision': 0.6046141607000796, 'recall': 0.7136150234741784, 'f1': 0.6546080964685616, 'number': 1065} | 0.5324 | 0.6011 | 0.5647 | 0.7057 |
|
62 |
+
| 0.835 | 4.0 | 40 | 0.7870 | {'precision': 0.6255274261603375, 'recall': 0.7330037082818294, 'f1': 0.6750142287990893, 'number': 809} | {'precision': 0.19298245614035087, 'recall': 0.09243697478991597, 'f1': 0.125, 'number': 119} | {'precision': 0.6779220779220779, 'recall': 0.7352112676056338, 'f1': 0.7054054054054054, 'number': 1065} | 0.6421 | 0.6959 | 0.6680 | 0.7601 |
|
63 |
+
| 0.6644 | 5.0 | 50 | 0.7063 | {'precision': 0.6771739130434783, 'recall': 0.7700865265760197, 'f1': 0.7206477732793521, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.2184873949579832, 'f1': 0.24761904761904763, 'number': 119} | {'precision': 0.6783161239078633, 'recall': 0.8018779342723005, 'f1': 0.7349397590361446, 'number': 1065} | 0.6621 | 0.7541 | 0.7051 | 0.7872 |
|
64 |
+
| 0.5612 | 6.0 | 60 | 0.6880 | {'precision': 0.6639593908629442, 'recall': 0.8084054388133498, 'f1': 0.7290969899665551, 'number': 809} | {'precision': 0.26262626262626265, 'recall': 0.2184873949579832, 'f1': 0.23853211009174313, 'number': 119} | {'precision': 0.7401229148375769, 'recall': 0.7915492957746478, 'f1': 0.76497277676951, 'number': 1065} | 0.6851 | 0.7642 | 0.7225 | 0.7937 |
|
65 |
+
| 0.4819 | 7.0 | 70 | 0.6610 | {'precision': 0.6937697993664202, 'recall': 0.8121137206427689, 'f1': 0.7482915717539863, 'number': 809} | {'precision': 0.30097087378640774, 'recall': 0.2605042016806723, 'f1': 0.27927927927927926, 'number': 119} | {'precision': 0.7568766637089619, 'recall': 0.8009389671361502, 'f1': 0.7782846715328468, 'number': 1065} | 0.7079 | 0.7732 | 0.7391 | 0.8034 |
|
66 |
+
| 0.4299 | 8.0 | 80 | 0.6725 | {'precision': 0.6850152905198776, 'recall': 0.830655129789864, 'f1': 0.7508379888268155, 'number': 809} | {'precision': 0.2803738317757009, 'recall': 0.25210084033613445, 'f1': 0.2654867256637167, 'number': 119} | {'precision': 0.7534364261168385, 'recall': 0.8234741784037559, 'f1': 0.7868999551368328, 'number': 1065} | 0.7012 | 0.7923 | 0.7439 | 0.7950 |
|
67 |
+
| 0.3801 | 9.0 | 90 | 0.6654 | {'precision': 0.7142857142857143, 'recall': 0.8158220024721878, 'f1': 0.7616849394114252, 'number': 809} | {'precision': 0.3047619047619048, 'recall': 0.2689075630252101, 'f1': 0.28571428571428575, 'number': 119} | {'precision': 0.7697715289982425, 'recall': 0.8225352112676056, 'f1': 0.7952791647753064, 'number': 1065} | 0.7236 | 0.7868 | 0.7538 | 0.8092 |
|
68 |
+
| 0.3757 | 10.0 | 100 | 0.6709 | {'precision': 0.7082452431289641, 'recall': 0.8281829419035847, 'f1': 0.7635327635327636, 'number': 809} | {'precision': 0.34, 'recall': 0.2857142857142857, 'f1': 0.31050228310502287, 'number': 119} | {'precision': 0.7769028871391076, 'recall': 0.8338028169014085, 'f1': 0.8043478260869565, 'number': 1065} | 0.7273 | 0.7988 | 0.7614 | 0.8145 |
|
69 |
+
| 0.3165 | 11.0 | 110 | 0.6781 | {'precision': 0.723726977248104, 'recall': 0.8257107540173053, 'f1': 0.7713625866050808, 'number': 809} | {'precision': 0.3046875, 'recall': 0.3277310924369748, 'f1': 0.31578947368421056, 'number': 119} | {'precision': 0.7736842105263158, 'recall': 0.828169014084507, 'f1': 0.7999999999999999, 'number': 1065} | 0.7252 | 0.7973 | 0.7596 | 0.8077 |
|
70 |
+
| 0.2993 | 12.0 | 120 | 0.6894 | {'precision': 0.71875, 'recall': 0.8244746600741656, 'f1': 0.7679907887161773, 'number': 809} | {'precision': 0.3247863247863248, 'recall': 0.31932773109243695, 'f1': 0.3220338983050848, 'number': 119} | {'precision': 0.7823008849557522, 'recall': 0.8300469483568075, 'f1': 0.8054669703872438, 'number': 1065} | 0.7306 | 0.7973 | 0.7625 | 0.8117 |
|
71 |
+
| 0.2822 | 13.0 | 130 | 0.7039 | {'precision': 0.7195652173913043, 'recall': 0.8182941903584673, 'f1': 0.7657605552342395, 'number': 809} | {'precision': 0.3125, 'recall': 0.33613445378151263, 'f1': 0.3238866396761134, 'number': 119} | {'precision': 0.7823008849557522, 'recall': 0.8300469483568075, 'f1': 0.8054669703872438, 'number': 1065} | 0.7282 | 0.7958 | 0.7605 | 0.8095 |
|
72 |
+
| 0.2595 | 14.0 | 140 | 0.7045 | {'precision': 0.72, 'recall': 0.823238566131026, 'f1': 0.7681660899653979, 'number': 809} | {'precision': 0.3418803418803419, 'recall': 0.33613445378151263, 'f1': 0.3389830508474576, 'number': 119} | {'precision': 0.7912578055307761, 'recall': 0.8328638497652582, 'f1': 0.8115279048490394, 'number': 1065} | 0.7365 | 0.7993 | 0.7666 | 0.8118 |
|
73 |
+
| 0.2617 | 15.0 | 150 | 0.7085 | {'precision': 0.721081081081081, 'recall': 0.8244746600741656, 'f1': 0.7693194925028833, 'number': 809} | {'precision': 0.3252032520325203, 'recall': 0.33613445378151263, 'f1': 0.3305785123966942, 'number': 119} | {'precision': 0.7871772039180766, 'recall': 0.8300469483568075, 'f1': 0.8080438756855575, 'number': 1065} | 0.7328 | 0.7983 | 0.7642 | 0.8112 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.41.1
|
79 |
+
- Pytorch 2.3.0+cu121
|
80 |
+
- Datasets 2.19.1
|
81 |
+
- Tokenizers 0.19.1
|
logs/events.out.tfevents.1717252354.280ef54c6982.3413.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:a74e8508c323a305f88b630103f0f8bb5325f66b6cf11a2672ed4ad22caa451c
|
3 |
+
size 15984
|
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:f03b481e0e06f709bac683bd14d245aa191fcf806704f56cf66d7eeb458f35f6
|
3 |
size 450558212
|
preprocessor_config.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_valid_processor_keys": [
|
3 |
+
"images",
|
4 |
+
"do_resize",
|
5 |
+
"size",
|
6 |
+
"resample",
|
7 |
+
"apply_ocr",
|
8 |
+
"ocr_lang",
|
9 |
+
"tesseract_config",
|
10 |
+
"return_tensors",
|
11 |
+
"data_format",
|
12 |
+
"input_data_format"
|
13 |
+
],
|
14 |
+
"apply_ocr": true,
|
15 |
+
"do_resize": true,
|
16 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
17 |
+
"ocr_lang": null,
|
18 |
+
"processor_class": "LayoutLMv2Processor",
|
19 |
+
"resample": 2,
|
20 |
+
"size": {
|
21 |
+
"height": 224,
|
22 |
+
"width": 224
|
23 |
+
},
|
24 |
+
"tesseract_config": ""
|
25 |
+
}
|
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
|
|