End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1713844881.68f7178e41ab.5967.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.6739
|
21 |
+
- Answer: {'precision': 0.7077087794432548, 'recall': 0.8170580964153276, 'f1': 0.7584624211130234, 'number': 809}
|
22 |
+
- Header: {'precision': 0.30656934306569344, 'recall': 0.35294117647058826, 'f1': 0.32812500000000006, 'number': 119}
|
23 |
+
- Question: {'precision': 0.7837354781054513, 'recall': 0.8234741784037559, 'f1': 0.8031135531135531, 'number': 1065}
|
24 |
+
- Overall Precision: 0.7215
|
25 |
+
- Overall Recall: 0.7928
|
26 |
+
- Overall F1: 0.7554
|
27 |
+
- Overall Accuracy: 0.8075
|
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.7578 | 1.0 | 10 | 1.5659 | {'precision': 0.020053475935828877, 'recall': 0.018541409147095178, 'f1': 0.01926782273603083, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.311886586695747, 'recall': 0.26854460093896715, 'f1': 0.2885973763874874, 'number': 1065} | 0.1808 | 0.1510 | 0.1646 | 0.3760 |
|
60 |
+
| 1.409 | 2.0 | 20 | 1.2205 | {'precision': 0.220795892169448, 'recall': 0.2126081582200247, 'f1': 0.21662468513853905, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.43257184966838613, 'recall': 0.5511737089201878, 'f1': 0.4847233691164327, 'number': 1065} | 0.3553 | 0.3808 | 0.3676 | 0.5932 |
|
61 |
+
| 1.0728 | 3.0 | 30 | 0.9396 | {'precision': 0.5072765072765073, 'recall': 0.6032138442521632, 'f1': 0.5511010728402033, 'number': 809} | {'precision': 0.02702702702702703, 'recall': 0.008403361344537815, 'f1': 0.01282051282051282, 'number': 119} | {'precision': 0.5947242206235012, 'recall': 0.6985915492957746, 'f1': 0.6424870466321244, 'number': 1065} | 0.548 | 0.6187 | 0.5812 | 0.7236 |
|
62 |
+
| 0.8188 | 4.0 | 40 | 0.7725 | {'precision': 0.6076845298281092, 'recall': 0.7428924598269468, 'f1': 0.6685205784204672, 'number': 809} | {'precision': 0.18, 'recall': 0.07563025210084033, 'f1': 0.10650887573964496, 'number': 119} | {'precision': 0.6797608881298036, 'recall': 0.7474178403755869, 'f1': 0.7119856887298748, 'number': 1065} | 0.6362 | 0.7055 | 0.6690 | 0.7680 |
|
63 |
+
| 0.6647 | 5.0 | 50 | 0.7205 | {'precision': 0.6301806588735388, 'recall': 0.7330037082818294, 'f1': 0.6777142857142857, 'number': 809} | {'precision': 0.22093023255813954, 'recall': 0.15966386554621848, 'f1': 0.18536585365853656, 'number': 119} | {'precision': 0.6648731744811683, 'recall': 0.812206572769953, 'f1': 0.7311918850380389, 'number': 1065} | 0.6345 | 0.7411 | 0.6836 | 0.7775 |
|
64 |
+
| 0.5719 | 6.0 | 60 | 0.6793 | {'precision': 0.6366336633663366, 'recall': 0.7948084054388134, 'f1': 0.7069818581638262, 'number': 809} | {'precision': 0.25301204819277107, 'recall': 0.17647058823529413, 'f1': 0.20792079207920794, 'number': 119} | {'precision': 0.7342342342342343, 'recall': 0.7652582159624414, 'f1': 0.749425287356322, 'number': 1065} | 0.6714 | 0.7421 | 0.7050 | 0.7826 |
|
65 |
+
| 0.5011 | 7.0 | 70 | 0.6617 | {'precision': 0.6697819314641744, 'recall': 0.7972805933250927, 'f1': 0.7279909706546276, 'number': 809} | {'precision': 0.24347826086956523, 'recall': 0.23529411764705882, 'f1': 0.23931623931623933, 'number': 119} | {'precision': 0.7497773820124666, 'recall': 0.7906103286384977, 'f1': 0.7696526508226691, 'number': 1065} | 0.6883 | 0.7602 | 0.7225 | 0.7929 |
|
66 |
+
| 0.4478 | 8.0 | 80 | 0.6529 | {'precision': 0.6725755995828988, 'recall': 0.7972805933250927, 'f1': 0.7296380090497737, 'number': 809} | {'precision': 0.23577235772357724, 'recall': 0.24369747899159663, 'f1': 0.23966942148760334, 'number': 119} | {'precision': 0.7578397212543554, 'recall': 0.8169014084507042, 'f1': 0.7862629914143697, 'number': 1065} | 0.6924 | 0.7747 | 0.7312 | 0.8001 |
|
67 |
+
| 0.3901 | 9.0 | 90 | 0.6513 | {'precision': 0.6936353829557713, 'recall': 0.7948084054388134, 'f1': 0.7407834101382489, 'number': 809} | {'precision': 0.27906976744186046, 'recall': 0.3025210084033613, 'f1': 0.29032258064516125, 'number': 119} | {'precision': 0.7517123287671232, 'recall': 0.8244131455399061, 'f1': 0.7863860277653381, 'number': 1065} | 0.7001 | 0.7812 | 0.7384 | 0.8034 |
|
68 |
+
| 0.3881 | 10.0 | 100 | 0.6564 | {'precision': 0.685890834191555, 'recall': 0.823238566131026, 'f1': 0.7483146067415729, 'number': 809} | {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119} | {'precision': 0.7702582368655387, 'recall': 0.812206572769953, 'f1': 0.7906764168190127, 'number': 1065} | 0.7098 | 0.7852 | 0.7456 | 0.8075 |
|
69 |
+
| 0.3249 | 11.0 | 110 | 0.6580 | {'precision': 0.7036247334754797, 'recall': 0.8158220024721878, 'f1': 0.755580995993131, 'number': 809} | {'precision': 0.31007751937984496, 'recall': 0.33613445378151263, 'f1': 0.3225806451612903, 'number': 119} | {'precision': 0.7693646649260226, 'recall': 0.8300469483568075, 'f1': 0.7985546522131888, 'number': 1065} | 0.7148 | 0.7948 | 0.7527 | 0.8088 |
|
70 |
+
| 0.3099 | 12.0 | 120 | 0.6646 | {'precision': 0.7090909090909091, 'recall': 0.8195302843016069, 'f1': 0.7603211009174312, 'number': 809} | {'precision': 0.29411764705882354, 'recall': 0.33613445378151263, 'f1': 0.3137254901960785, 'number': 119} | {'precision': 0.7797672336615935, 'recall': 0.8178403755868544, 'f1': 0.7983501374885427, 'number': 1065} | 0.7194 | 0.7898 | 0.7529 | 0.8098 |
|
71 |
+
| 0.2907 | 13.0 | 130 | 0.6653 | {'precision': 0.7141316073354909, 'recall': 0.8182941903584673, 'f1': 0.7626728110599078, 'number': 809} | {'precision': 0.3125, 'recall': 0.33613445378151263, 'f1': 0.3238866396761134, 'number': 119} | {'precision': 0.7902790279027903, 'recall': 0.8244131455399061, 'f1': 0.806985294117647, 'number': 1065} | 0.7295 | 0.7928 | 0.7598 | 0.8104 |
|
72 |
+
| 0.2715 | 14.0 | 140 | 0.6720 | {'precision': 0.71259418729817, 'recall': 0.8182941903584673, 'f1': 0.761795166858458, 'number': 809} | {'precision': 0.31343283582089554, 'recall': 0.35294117647058826, 'f1': 0.3320158102766798, 'number': 119} | {'precision': 0.7867383512544803, 'recall': 0.8244131455399061, 'f1': 0.8051352590554791, 'number': 1065} | 0.7260 | 0.7938 | 0.7584 | 0.8078 |
|
73 |
+
| 0.2743 | 15.0 | 150 | 0.6739 | {'precision': 0.7077087794432548, 'recall': 0.8170580964153276, 'f1': 0.7584624211130234, 'number': 809} | {'precision': 0.30656934306569344, 'recall': 0.35294117647058826, 'f1': 0.32812500000000006, 'number': 119} | {'precision': 0.7837354781054513, 'recall': 0.8234741784037559, 'f1': 0.8031135531135531, 'number': 1065} | 0.7215 | 0.7928 | 0.7554 | 0.8075 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.40.0
|
79 |
+
- Pytorch 2.2.1+cu121
|
80 |
+
- Datasets 2.19.0
|
81 |
+
- Tokenizers 0.19.1
|
logs/events.out.tfevents.1713844881.68f7178e41ab.5967.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:5ae21ac2db26f5b1a7993e153bf1a2b02c194a2c2ef762de048c4a6f26ec805f
|
3 |
+
size 15846
|
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:9f92776a80d4d5db0c3f1841666355a6d8026694d88f4f4e10beb880ffc16ec8
|
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
|
|