End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1718013889.4a153d784002.1470.0 +2 -2
- 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.7045
|
21 |
+
- Answer: {'precision': 0.7013274336283186, 'recall': 0.7836835599505563, 'f1': 0.7402218330414477, 'number': 809}
|
22 |
+
- Header: {'precision': 0.3111111111111111, 'recall': 0.35294117647058826, 'f1': 0.33070866141732286, 'number': 119}
|
23 |
+
- Question: {'precision': 0.773936170212766, 'recall': 0.819718309859155, 'f1': 0.796169630642955, 'number': 1065}
|
24 |
+
- Overall Precision: 0.7148
|
25 |
+
- Overall Recall: 0.7772
|
26 |
+
- Overall F1: 0.7447
|
27 |
+
- Overall Accuracy: 0.8045
|
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.8311 | 1.0 | 10 | 1.5893 | {'precision': 0.01643192488262911, 'recall': 0.0173053152039555, 'f1': 0.016857314870559904, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.23476005188067445, 'recall': 0.1699530516431925, 'f1': 0.19716775599128541, 'number': 1065} | 0.1201 | 0.0978 | 0.1079 | 0.3735 |
|
60 |
+
| 1.453 | 2.0 | 20 | 1.2320 | {'precision': 0.16265750286368844, 'recall': 0.17552533992583436, 'f1': 0.16884661117717004, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.43330980945659847, 'recall': 0.5765258215962441, 'f1': 0.49476228847703463, 'number': 1065} | 0.3301 | 0.3793 | 0.3530 | 0.5937 |
|
61 |
+
| 1.0885 | 3.0 | 30 | 0.9242 | {'precision': 0.4983991462113127, 'recall': 0.5772558714462299, 'f1': 0.5349369988545246, 'number': 809} | {'precision': 0.05263157894736842, 'recall': 0.008403361344537815, 'f1': 0.014492753623188406, 'number': 119} | {'precision': 0.556745182012848, 'recall': 0.7323943661971831, 'f1': 0.632603406326034, 'number': 1065} | 0.5295 | 0.6262 | 0.5738 | 0.7132 |
|
62 |
+
| 0.8351 | 4.0 | 40 | 0.7984 | {'precision': 0.5991902834008097, 'recall': 0.7317676143386898, 'f1': 0.6588759042849194, 'number': 809} | {'precision': 0.16, 'recall': 0.06722689075630252, 'f1': 0.09467455621301775, 'number': 119} | {'precision': 0.6562763268744735, 'recall': 0.7314553990610329, 'f1': 0.691829484902309, 'number': 1065} | 0.6198 | 0.6919 | 0.6539 | 0.7574 |
|
63 |
+
| 0.6746 | 5.0 | 50 | 0.7364 | {'precision': 0.6524663677130045, 'recall': 0.7194066749072929, 'f1': 0.6843033509700176, 'number': 809} | {'precision': 0.21951219512195122, 'recall': 0.15126050420168066, 'f1': 0.1791044776119403, 'number': 119} | {'precision': 0.6493212669683258, 'recall': 0.8084507042253521, 'f1': 0.7202007528230866, 'number': 1065} | 0.6352 | 0.7331 | 0.6806 | 0.7789 |
|
64 |
+
| 0.5833 | 6.0 | 60 | 0.7065 | {'precision': 0.6387487386478304, 'recall': 0.7824474660074165, 'f1': 0.7033333333333333, 'number': 809} | {'precision': 0.25333333333333335, 'recall': 0.15966386554621848, 'f1': 0.1958762886597938, 'number': 119} | {'precision': 0.7177489177489178, 'recall': 0.7784037558685446, 'f1': 0.7468468468468469, 'number': 1065} | 0.6668 | 0.7431 | 0.7029 | 0.7837 |
|
65 |
+
| 0.5101 | 7.0 | 70 | 0.6765 | {'precision': 0.6811751904243744, 'recall': 0.7737948084054388, 'f1': 0.724537037037037, 'number': 809} | {'precision': 0.2564102564102564, 'recall': 0.25210084033613445, 'f1': 0.2542372881355932, 'number': 119} | {'precision': 0.7319762510602206, 'recall': 0.8103286384976526, 'f1': 0.7691622103386809, 'number': 1065} | 0.6858 | 0.7622 | 0.7220 | 0.7972 |
|
66 |
+
| 0.4538 | 8.0 | 80 | 0.6643 | {'precision': 0.6775210084033614, 'recall': 0.7972805933250927, 'f1': 0.7325383304940376, 'number': 809} | {'precision': 0.23893805309734514, 'recall': 0.226890756302521, 'f1': 0.2327586206896552, 'number': 119} | {'precision': 0.7389830508474576, 'recall': 0.8187793427230047, 'f1': 0.7768374164810691, 'number': 1065} | 0.6878 | 0.7747 | 0.7286 | 0.8014 |
|
67 |
+
| 0.3958 | 9.0 | 90 | 0.6724 | {'precision': 0.7022222222222222, 'recall': 0.7812113720642769, 'f1': 0.7396138092451726, 'number': 809} | {'precision': 0.25757575757575757, 'recall': 0.2857142857142857, 'f1': 0.27091633466135456, 'number': 119} | {'precision': 0.7319932998324958, 'recall': 0.8206572769953052, 'f1': 0.7737937140327579, 'number': 1065} | 0.6918 | 0.7727 | 0.7300 | 0.7994 |
|
68 |
+
| 0.3902 | 10.0 | 100 | 0.6726 | {'precision': 0.6846071044133477, 'recall': 0.7861557478368356, 'f1': 0.7318757192174913, 'number': 809} | {'precision': 0.288135593220339, 'recall': 0.2857142857142857, 'f1': 0.2869198312236287, 'number': 119} | {'precision': 0.7652790079716564, 'recall': 0.8112676056338028, 'f1': 0.7876025524156791, 'number': 1065} | 0.7050 | 0.7697 | 0.7359 | 0.8080 |
|
69 |
+
| 0.3294 | 11.0 | 110 | 0.6827 | {'precision': 0.7018701870187019, 'recall': 0.788627935723115, 'f1': 0.7427240977881256, 'number': 809} | {'precision': 0.28888888888888886, 'recall': 0.3277310924369748, 'f1': 0.3070866141732283, 'number': 119} | {'precision': 0.7508561643835616, 'recall': 0.8234741784037559, 'f1': 0.7854903716972683, 'number': 1065} | 0.7025 | 0.7797 | 0.7391 | 0.8032 |
|
70 |
+
| 0.3124 | 12.0 | 120 | 0.6909 | {'precision': 0.6974697469746974, 'recall': 0.7836835599505563, 'f1': 0.7380675203725262, 'number': 809} | {'precision': 0.3125, 'recall': 0.33613445378151263, 'f1': 0.3238866396761134, 'number': 119} | {'precision': 0.771960958296362, 'recall': 0.8169014084507042, 'f1': 0.7937956204379562, 'number': 1065} | 0.7135 | 0.7747 | 0.7428 | 0.8047 |
|
71 |
+
| 0.2965 | 13.0 | 130 | 0.6986 | {'precision': 0.7002212389380531, 'recall': 0.7824474660074165, 'f1': 0.7390542907180385, 'number': 809} | {'precision': 0.3230769230769231, 'recall': 0.35294117647058826, 'f1': 0.3373493975903615, 'number': 119} | {'precision': 0.7712014134275619, 'recall': 0.819718309859155, 'f1': 0.7947200728265817, 'number': 1065} | 0.7147 | 0.7767 | 0.7444 | 0.8040 |
|
72 |
+
| 0.2676 | 14.0 | 140 | 0.7010 | {'precision': 0.7028824833702882, 'recall': 0.7836835599505563, 'f1': 0.7410870835768557, 'number': 809} | {'precision': 0.32575757575757575, 'recall': 0.36134453781512604, 'f1': 0.3426294820717131, 'number': 119} | {'precision': 0.7768888888888889, 'recall': 0.8206572769953052, 'f1': 0.7981735159817351, 'number': 1065} | 0.7184 | 0.7782 | 0.7471 | 0.8060 |
|
73 |
+
| 0.2747 | 15.0 | 150 | 0.7045 | {'precision': 0.7013274336283186, 'recall': 0.7836835599505563, 'f1': 0.7402218330414477, 'number': 809} | {'precision': 0.3111111111111111, 'recall': 0.35294117647058826, 'f1': 0.33070866141732286, 'number': 119} | {'precision': 0.773936170212766, 'recall': 0.819718309859155, 'f1': 0.796169630642955, 'number': 1065} | 0.7148 | 0.7772 | 0.7447 | 0.8045 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.41.2
|
79 |
+
- Pytorch 2.3.0+cu121
|
80 |
+
- Datasets 2.19.2
|
81 |
+
- Tokenizers 0.19.1
|
logs/events.out.tfevents.1718013889.4a153d784002.1470.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:a1eba50279738ee8aabb9c981224233c895999f62b55d9c19f002aefadef0074
|
3 |
+
size 15984
|
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
|
|