RakhissBouchra
commited on
Commit
•
53165c9
1
Parent(s):
bfd4283
End of training
Browse files- README.md +80 -0
- logs/events.out.tfevents.1714647793.DESKTOP-GACPI3E.7908.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,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.6573
|
21 |
+
- Answer: {'precision': 0.7060773480662983, 'recall': 0.7898640296662547, 'f1': 0.7456242707117853, 'number': 809}
|
22 |
+
- Header: {'precision': 0.3333333333333333, 'recall': 0.3697478991596639, 'f1': 0.350597609561753, 'number': 119}
|
23 |
+
- Question: {'precision': 0.7687661777394306, 'recall': 0.8366197183098592, 'f1': 0.8012589928057554, 'number': 1065}
|
24 |
+
- Overall Precision: 0.7168
|
25 |
+
- Overall Recall: 0.7898
|
26 |
+
- Overall F1: 0.7515
|
27 |
+
- Overall Accuracy: 0.8172
|
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 |
+
|
54 |
+
### Training results
|
55 |
+
|
56 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
57 |
+
|:-------------:|:-----:|:----:|:---------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
58 |
+
| 1.7999 | 1.0 | 10 | 1.5802 | {'precision': 0.008905852417302799, 'recall': 0.00865265760197775, 'f1': 0.00877742946708464, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.1717325227963526, 'recall': 0.10610328638497653, 'f1': 0.13116656993615786, 'number': 1065} | 0.0831 | 0.0602 | 0.0698 | 0.3604 |
|
59 |
+
| 1.4567 | 2.0 | 20 | 1.2493 | {'precision': 0.18839103869653767, 'recall': 0.22867737948084055, 'f1': 0.20658849804578447, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.45693950177935944, 'recall': 0.6028169014084507, 'f1': 0.5198380566801619, 'number': 1065} | 0.3465 | 0.4150 | 0.3776 | 0.5986 |
|
60 |
+
| 1.114 | 3.0 | 30 | 0.9406 | {'precision': 0.43853820598006643, 'recall': 0.4894932014833127, 'f1': 0.46261682242990654, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5861538461538461, 'recall': 0.7154929577464789, 'f1': 0.6443974630021141, 'number': 1065} | 0.5237 | 0.5810 | 0.5509 | 0.7001 |
|
61 |
+
| 0.8434 | 4.0 | 40 | 0.7906 | {'precision': 0.5922836287799792, 'recall': 0.7021013597033374, 'f1': 0.6425339366515838, 'number': 809} | {'precision': 0.1111111111111111, 'recall': 0.04201680672268908, 'f1': 0.06097560975609755, 'number': 119} | {'precision': 0.6526994359387591, 'recall': 0.7605633802816901, 'f1': 0.7025151777970512, 'number': 1065} | 0.6160 | 0.6939 | 0.6527 | 0.7541 |
|
62 |
+
| 0.6817 | 5.0 | 50 | 0.7106 | {'precision': 0.6502192982456141, 'recall': 0.7330037082818294, 'f1': 0.6891342242882045, 'number': 809} | {'precision': 0.25301204819277107, 'recall': 0.17647058823529413, 'f1': 0.20792079207920794, 'number': 119} | {'precision': 0.683921568627451, 'recall': 0.8187793427230047, 'f1': 0.7452991452991454, 'number': 1065} | 0.6546 | 0.7456 | 0.6972 | 0.7854 |
|
63 |
+
| 0.5737 | 6.0 | 60 | 0.6807 | {'precision': 0.6482617586912065, 'recall': 0.7836835599505563, 'f1': 0.7095691102406267, 'number': 809} | {'precision': 0.273972602739726, 'recall': 0.16806722689075632, 'f1': 0.20833333333333331, 'number': 119} | {'precision': 0.717206132879046, 'recall': 0.7906103286384977, 'f1': 0.7521214828048235, 'number': 1065} | 0.6724 | 0.7506 | 0.7093 | 0.7898 |
|
64 |
+
| 0.5058 | 7.0 | 70 | 0.6538 | {'precision': 0.6564102564102564, 'recall': 0.7911001236093943, 'f1': 0.7174887892376681, 'number': 809} | {'precision': 0.3048780487804878, 'recall': 0.21008403361344538, 'f1': 0.24875621890547264, 'number': 119} | {'precision': 0.7324894514767932, 'recall': 0.8150234741784037, 'f1': 0.7715555555555556, 'number': 1065} | 0.6838 | 0.7692 | 0.7240 | 0.7996 |
|
65 |
+
| 0.4425 | 8.0 | 80 | 0.6574 | {'precision': 0.6625766871165644, 'recall': 0.8009888751545118, 'f1': 0.7252378287632905, 'number': 809} | {'precision': 0.3055555555555556, 'recall': 0.2773109243697479, 'f1': 0.2907488986784141, 'number': 119} | {'precision': 0.7365771812080537, 'recall': 0.8244131455399061, 'f1': 0.7780239255649092, 'number': 1065} | 0.6844 | 0.7822 | 0.7300 | 0.7999 |
|
66 |
+
| 0.3932 | 9.0 | 90 | 0.6375 | {'precision': 0.6876971608832808, 'recall': 0.8084054388133498, 'f1': 0.7431818181818182, 'number': 809} | {'precision': 0.3645833333333333, 'recall': 0.29411764705882354, 'f1': 0.3255813953488372, 'number': 119} | {'precision': 0.752129471890971, 'recall': 0.8291079812206573, 'f1': 0.7887449754354622, 'number': 1065} | 0.7078 | 0.7888 | 0.7461 | 0.8087 |
|
67 |
+
| 0.3798 | 10.0 | 100 | 0.6437 | {'precision': 0.6981541802388708, 'recall': 0.7948084054388134, 'f1': 0.7433526011560695, 'number': 809} | {'precision': 0.325, 'recall': 0.3277310924369748, 'f1': 0.3263598326359833, 'number': 119} | {'precision': 0.7665505226480837, 'recall': 0.8262910798122066, 'f1': 0.7953004970628107, 'number': 1065} | 0.7136 | 0.7837 | 0.7470 | 0.8098 |
|
68 |
+
| 0.3225 | 11.0 | 110 | 0.6566 | {'precision': 0.6817226890756303, 'recall': 0.8022249690976514, 'f1': 0.7370812038614423, 'number': 809} | {'precision': 0.336, 'recall': 0.35294117647058826, 'f1': 0.3442622950819672, 'number': 119} | {'precision': 0.7593856655290102, 'recall': 0.8356807511737089, 'f1': 0.7957085382208315, 'number': 1065} | 0.7030 | 0.7933 | 0.7454 | 0.8038 |
|
69 |
+
| 0.3097 | 12.0 | 120 | 0.6421 | {'precision': 0.6957928802588996, 'recall': 0.7972805933250927, 'f1': 0.7430875576036866, 'number': 809} | {'precision': 0.35, 'recall': 0.35294117647058826, 'f1': 0.35146443514644354, 'number': 119} | {'precision': 0.7692307692307693, 'recall': 0.8356807511737089, 'f1': 0.8010801080108011, 'number': 1065} | 0.7155 | 0.7913 | 0.7515 | 0.8177 |
|
70 |
+
| 0.2916 | 13.0 | 130 | 0.6515 | {'precision': 0.7035010940919038, 'recall': 0.7948084054388134, 'f1': 0.7463726059199072, 'number': 809} | {'precision': 0.33076923076923076, 'recall': 0.36134453781512604, 'f1': 0.34538152610441764, 'number': 119} | {'precision': 0.7649092480553155, 'recall': 0.8309859154929577, 'f1': 0.7965796579657966, 'number': 1065} | 0.7138 | 0.7883 | 0.7492 | 0.8154 |
|
71 |
+
| 0.2707 | 14.0 | 140 | 0.6557 | {'precision': 0.7016393442622951, 'recall': 0.7935723114956736, 'f1': 0.7447795823665894, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.36134453781512604, 'f1': 0.34677419354838707, 'number': 119} | {'precision': 0.7688966116420504, 'recall': 0.8309859154929577, 'f1': 0.7987364620938627, 'number': 1065} | 0.7153 | 0.7878 | 0.7498 | 0.8146 |
|
72 |
+
| 0.2729 | 15.0 | 150 | 0.6573 | {'precision': 0.7060773480662983, 'recall': 0.7898640296662547, 'f1': 0.7456242707117853, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.3697478991596639, 'f1': 0.350597609561753, 'number': 119} | {'precision': 0.7687661777394306, 'recall': 0.8366197183098592, 'f1': 0.8012589928057554, 'number': 1065} | 0.7168 | 0.7898 | 0.7515 | 0.8172 |
|
73 |
+
|
74 |
+
|
75 |
+
### Framework versions
|
76 |
+
|
77 |
+
- Transformers 4.40.1
|
78 |
+
- Pytorch 2.3.0+cpu
|
79 |
+
- Datasets 2.19.0
|
80 |
+
- Tokenizers 0.19.1
|
logs/events.out.tfevents.1714647793.DESKTOP-GACPI3E.7908.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:a17c53b3225bb4455586b756cd0053f1c1c12586803589fbcef845ad6ac6f04d
|
3 |
+
size 15847
|
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:716b488e39de928ec2ecf6a4eb49093472ac1dd34f36eb2520b06ac9d511ae0f
|
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
|
|