MouadUser commited on
Commit
15484d7
1 Parent(s): 4df1345

End of training

Browse files
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.7271
21
+ - Answer: {'precision': 0.7216157205240175, 'recall': 0.8170580964153276, 'f1': 0.766376811594203, 'number': 809}
22
+ - Header: {'precision': 0.3046875, 'recall': 0.3277310924369748, 'f1': 0.31578947368421056, 'number': 119}
23
+ - Question: {'precision': 0.7844905320108205, 'recall': 0.8169014084507042, 'f1': 0.8003679852805888, 'number': 1065}
24
+ - Overall Precision: 0.7292
25
+ - Overall Recall: 0.7878
26
+ - Overall F1: 0.7574
27
+ - Overall Accuracy: 0.8010
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.7704 | 1.0 | 10 | 1.5853 | {'precision': 0.0226628895184136, 'recall': 0.019777503090234856, 'f1': 0.02112211221122112, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.26928471248246844, 'recall': 0.18028169014084508, 'f1': 0.2159730033745782, 'number': 1065} | 0.1466 | 0.1044 | 0.1219 | 0.3606 |
60
+ | 1.4598 | 2.0 | 20 | 1.2597 | {'precision': 0.14809384164222875, 'recall': 0.12484548825710753, 'f1': 0.13547954393024816, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.3946969696969697, 'recall': 0.4892018779342723, 'f1': 0.4368972746331237, 'number': 1065} | 0.3107 | 0.3121 | 0.3114 | 0.5801 |
61
+ | 1.1343 | 3.0 | 30 | 0.9794 | {'precision': 0.45892018779342725, 'recall': 0.48331273176761436, 'f1': 0.47080072245635163, 'number': 809} | {'precision': 0.09523809523809523, 'recall': 0.01680672268907563, 'f1': 0.02857142857142857, 'number': 119} | {'precision': 0.578684429641965, 'recall': 0.6525821596244131, 'f1': 0.6134157105030891, 'number': 1065} | 0.5246 | 0.5459 | 0.5350 | 0.7059 |
62
+ | 0.8715 | 4.0 | 40 | 0.8169 | {'precision': 0.5791245791245792, 'recall': 0.6378244746600742, 'f1': 0.6070588235294119, 'number': 809} | {'precision': 0.20833333333333334, 'recall': 0.08403361344537816, 'f1': 0.11976047904191618, 'number': 119} | {'precision': 0.6848816029143898, 'recall': 0.7061032863849765, 'f1': 0.6953305594082293, 'number': 1065} | 0.6274 | 0.6412 | 0.6342 | 0.7404 |
63
+ | 0.6755 | 5.0 | 50 | 0.7034 | {'precision': 0.6616541353383458, 'recall': 0.761433868974042, 'f1': 0.7080459770114943, 'number': 809} | {'precision': 0.2, 'recall': 0.14285714285714285, 'f1': 0.16666666666666666, 'number': 119} | {'precision': 0.6862745098039216, 'recall': 0.7887323943661971, 'f1': 0.7339449541284403, 'number': 1065} | 0.6576 | 0.7391 | 0.6960 | 0.7888 |
64
+ | 0.563 | 6.0 | 60 | 0.6924 | {'precision': 0.6618998978549541, 'recall': 0.8009888751545118, 'f1': 0.7248322147651008, 'number': 809} | {'precision': 0.2191780821917808, 'recall': 0.13445378151260504, 'f1': 0.16666666666666669, 'number': 119} | {'precision': 0.7177489177489178, 'recall': 0.7784037558685446, 'f1': 0.7468468468468469, 'number': 1065} | 0.6765 | 0.7491 | 0.7110 | 0.7869 |
65
+ | 0.4764 | 7.0 | 70 | 0.6676 | {'precision': 0.7162011173184357, 'recall': 0.792336217552534, 'f1': 0.7523474178403756, 'number': 809} | {'precision': 0.26126126126126126, 'recall': 0.24369747899159663, 'f1': 0.25217391304347825, 'number': 119} | {'precision': 0.7538726333907056, 'recall': 0.8225352112676056, 'f1': 0.7867085765603951, 'number': 1065} | 0.7131 | 0.7757 | 0.7431 | 0.8032 |
66
+ | 0.4205 | 8.0 | 80 | 0.6759 | {'precision': 0.7108953613807982, 'recall': 0.8145859085290482, 'f1': 0.7592165898617511, 'number': 809} | {'precision': 0.2564102564102564, 'recall': 0.25210084033613445, 'f1': 0.2542372881355932, 'number': 119} | {'precision': 0.7594501718213058, 'recall': 0.8300469483568075, 'f1': 0.7931807985643785, 'number': 1065} | 0.7124 | 0.7893 | 0.7489 | 0.8005 |
67
+ | 0.3675 | 9.0 | 90 | 0.6917 | {'precision': 0.7132034632034632, 'recall': 0.8145859085290482, 'f1': 0.7605308713214081, 'number': 809} | {'precision': 0.25984251968503935, 'recall': 0.2773109243697479, 'f1': 0.2682926829268293, 'number': 119} | {'precision': 0.7740213523131673, 'recall': 0.8169014084507042, 'f1': 0.7948835084513477, 'number': 1065} | 0.7182 | 0.7837 | 0.7495 | 0.7982 |
68
+ | 0.3596 | 10.0 | 100 | 0.6906 | {'precision': 0.7193932827735645, 'recall': 0.8207663782447466, 'f1': 0.766743648960739, 'number': 809} | {'precision': 0.3, 'recall': 0.2773109243697479, 'f1': 0.28820960698689957, 'number': 119} | {'precision': 0.7866786678667866, 'recall': 0.8206572769953052, 'f1': 0.8033088235294117, 'number': 1065} | 0.7327 | 0.7883 | 0.7595 | 0.8061 |
69
+ | 0.3121 | 11.0 | 110 | 0.6999 | {'precision': 0.7300884955752213, 'recall': 0.8158220024721878, 'f1': 0.7705779334500875, 'number': 809} | {'precision': 0.3082706766917293, 'recall': 0.3445378151260504, 'f1': 0.3253968253968254, 'number': 119} | {'precision': 0.7694974003466204, 'recall': 0.8338028169014085, 'f1': 0.8003605227579991, 'number': 1065} | 0.7252 | 0.7973 | 0.7596 | 0.8035 |
70
+ | 0.2902 | 12.0 | 120 | 0.7153 | {'precision': 0.7124183006535948, 'recall': 0.8084054388133498, 'f1': 0.7573827446438912, 'number': 809} | {'precision': 0.3185840707964602, 'recall': 0.3025210084033613, 'f1': 0.3103448275862069, 'number': 119} | {'precision': 0.7887067395264117, 'recall': 0.8131455399061033, 'f1': 0.8007397133610726, 'number': 1065} | 0.7309 | 0.7807 | 0.7550 | 0.8029 |
71
+ | 0.2776 | 13.0 | 130 | 0.7184 | {'precision': 0.728587319243604, 'recall': 0.8096415327564895, 'f1': 0.7669789227166277, 'number': 809} | {'precision': 0.3, 'recall': 0.3277310924369748, 'f1': 0.3132530120481928, 'number': 119} | {'precision': 0.7759226713532513, 'recall': 0.8291079812206573, 'f1': 0.8016341352700863, 'number': 1065} | 0.7277 | 0.7913 | 0.7582 | 0.8015 |
72
+ | 0.2604 | 14.0 | 140 | 0.7218 | {'precision': 0.7272727272727273, 'recall': 0.8108776266996292, 'f1': 0.766803039158387, 'number': 809} | {'precision': 0.31746031746031744, 'recall': 0.33613445378151263, 'f1': 0.32653061224489793, 'number': 119} | {'precision': 0.7809439002671416, 'recall': 0.8234741784037559, 'f1': 0.8016453382084096, 'number': 1065} | 0.7313 | 0.7893 | 0.7592 | 0.8021 |
73
+ | 0.2644 | 15.0 | 150 | 0.7271 | {'precision': 0.7216157205240175, 'recall': 0.8170580964153276, 'f1': 0.766376811594203, 'number': 809} | {'precision': 0.3046875, 'recall': 0.3277310924369748, 'f1': 0.31578947368421056, 'number': 119} | {'precision': 0.7844905320108205, 'recall': 0.8169014084507042, 'f1': 0.8003679852805888, 'number': 1065} | 0.7292 | 0.7878 | 0.7574 | 0.8010 |
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.1717411881.bebcc25fea4f.10131.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:776028ac5996418272c10362b02f84c077a09613fd4f25d8e3b2b113cbceb436
3
- size 15630
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:337d37fe25b67df811af5e2cdad13192717e5081faefcf4c867a549024a96027
3
+ size 15984
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:78970c1e46e352641d548eabe5306f7f76fb2689a0147f74a02b39dd76199301
3
  size 450558212
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03c2b5f053a6a776a12968c4141e8046f54c5390736d7346e38a0d404eaf842c
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