pmorelr commited on
Commit
94da155
1 Parent(s): 744901e

End of training

Browse files
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - generated_from_trainer
4
+ datasets:
5
+ - funsd
6
+ model-index:
7
+ - name: layoutlm-funsd
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
+ should probably proofread and complete it, then remove this comment. -->
13
+
14
+ # layoutlm-funsd
15
+
16
+ This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Loss: 0.6650
19
+ - Answer: {'precision': 0.7158712541620422, 'recall': 0.7972805933250927, 'f1': 0.7543859649122808, 'number': 809}
20
+ - Header: {'precision': 0.2982456140350877, 'recall': 0.2857142857142857, 'f1': 0.2918454935622318, 'number': 119}
21
+ - Question: {'precision': 0.7667238421955404, 'recall': 0.8394366197183099, 'f1': 0.8014343343792021, 'number': 1065}
22
+ - Overall Precision: 0.7212
23
+ - Overall Recall: 0.7893
24
+ - Overall F1: 0.7537
25
+ - Overall Accuracy: 0.8191
26
+
27
+ ## Model description
28
+
29
+ More information needed
30
+
31
+ ## Intended uses & limitations
32
+
33
+ More information needed
34
+
35
+ ## Training and evaluation data
36
+
37
+ More information needed
38
+
39
+ ## Training procedure
40
+
41
+ ### Training hyperparameters
42
+
43
+ The following hyperparameters were used during training:
44
+ - learning_rate: 3e-05
45
+ - train_batch_size: 16
46
+ - eval_batch_size: 8
47
+ - seed: 42
48
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
49
+ - lr_scheduler_type: linear
50
+ - num_epochs: 15
51
+
52
+ ### Training results
53
+
54
+ | Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
55
+ |:-------------:|:-----:|:----:|:---------------:|:-----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
56
+ | 1.7902 | 1.0 | 10 | 1.6058 | {'precision': 0.0174496644295302, 'recall': 0.016069221260815822, 'f1': 0.01673101673101673, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.24484848484848484, 'recall': 0.18967136150234742, 'f1': 0.21375661375661376, 'number': 1065} | 0.1369 | 0.1079 | 0.1207 | 0.3425 |
57
+ | 1.4512 | 2.0 | 20 | 1.2477 | {'precision': 0.22826086956521738, 'recall': 0.23362175525339926, 'f1': 0.23091020158827122, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4611066559743384, 'recall': 0.539906103286385, 'f1': 0.49740484429065746, 'number': 1065} | 0.3680 | 0.3833 | 0.3755 | 0.5802 |
58
+ | 1.0772 | 3.0 | 30 | 0.9579 | {'precision': 0.47790055248618785, 'recall': 0.4276885043263288, 'f1': 0.45140247879973905, 'number': 809} | {'precision': 0.05555555555555555, 'recall': 0.01680672268907563, 'f1': 0.025806451612903226, 'number': 119} | {'precision': 0.6270125223613596, 'recall': 0.6582159624413145, 'f1': 0.6422354557947779, 'number': 1065} | 0.5586 | 0.5263 | 0.5420 | 0.6919 |
59
+ | 0.8282 | 4.0 | 40 | 0.7735 | {'precision': 0.6132368148914168, 'recall': 0.7330037082818294, 'f1': 0.6677927927927928, 'number': 809} | {'precision': 0.17647058823529413, 'recall': 0.10084033613445378, 'f1': 0.1283422459893048, 'number': 119} | {'precision': 0.6726649528706083, 'recall': 0.7370892018779343, 'f1': 0.703405017921147, 'number': 1065} | 0.6312 | 0.6974 | 0.6627 | 0.7621 |
60
+ | 0.6763 | 5.0 | 50 | 0.7086 | {'precision': 0.6333333333333333, 'recall': 0.7515451174289246, 'f1': 0.6873940079140758, 'number': 809} | {'precision': 0.325, 'recall': 0.2184873949579832, 'f1': 0.26130653266331655, 'number': 119} | {'precision': 0.6769731489015459, 'recall': 0.7812206572769953, 'f1': 0.7253705318221447, 'number': 1065} | 0.6461 | 0.7356 | 0.6879 | 0.7869 |
61
+ | 0.5577 | 6.0 | 60 | 0.6736 | {'precision': 0.6542155816435432, 'recall': 0.757725587144623, 'f1': 0.7021764032073311, 'number': 809} | {'precision': 0.32926829268292684, 'recall': 0.226890756302521, 'f1': 0.26865671641791045, 'number': 119} | {'precision': 0.6952822892498066, 'recall': 0.844131455399061, 'f1': 0.7625106022052586, 'number': 1065} | 0.6657 | 0.7722 | 0.7150 | 0.7955 |
62
+ | 0.4901 | 7.0 | 70 | 0.6510 | {'precision': 0.6706263498920086, 'recall': 0.7676143386897404, 'f1': 0.7158501440922191, 'number': 809} | {'precision': 0.27927927927927926, 'recall': 0.2605042016806723, 'f1': 0.26956521739130435, 'number': 119} | {'precision': 0.7412765957446809, 'recall': 0.8178403755868544, 'f1': 0.7776785714285714, 'number': 1065} | 0.6885 | 0.7642 | 0.7244 | 0.7998 |
63
+ | 0.4474 | 8.0 | 80 | 0.6389 | {'precision': 0.6828478964401294, 'recall': 0.7824474660074165, 'f1': 0.7292626728110598, 'number': 809} | {'precision': 0.3137254901960784, 'recall': 0.2689075630252101, 'f1': 0.2895927601809955, 'number': 119} | {'precision': 0.7523564695801199, 'recall': 0.8244131455399061, 'f1': 0.7867383512544801, 'number': 1065} | 0.7026 | 0.7742 | 0.7367 | 0.8049 |
64
+ | 0.4055 | 9.0 | 90 | 0.6371 | {'precision': 0.6855277475516867, 'recall': 0.7787391841779975, 'f1': 0.7291666666666666, 'number': 809} | {'precision': 0.288135593220339, 'recall': 0.2857142857142857, 'f1': 0.2869198312236287, 'number': 119} | {'precision': 0.7368852459016394, 'recall': 0.844131455399061, 'f1': 0.7868708971553611, 'number': 1065} | 0.6925 | 0.7842 | 0.7355 | 0.8111 |
65
+ | 0.3597 | 10.0 | 100 | 0.6547 | {'precision': 0.7027932960893855, 'recall': 0.7775030902348579, 'f1': 0.7382629107981221, 'number': 809} | {'precision': 0.25925925925925924, 'recall': 0.29411764705882354, 'f1': 0.2755905511811024, 'number': 119} | {'precision': 0.7463330457290768, 'recall': 0.812206572769953, 'f1': 0.7778776978417264, 'number': 1065} | 0.6985 | 0.7672 | 0.7312 | 0.8070 |
66
+ | 0.3295 | 11.0 | 110 | 0.6618 | {'precision': 0.709070796460177, 'recall': 0.792336217552534, 'f1': 0.7483946293053124, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.25210084033613445, 'f1': 0.28708133971291866, 'number': 119} | {'precision': 0.7857142857142857, 'recall': 0.8366197183098592, 'f1': 0.8103683492496588, 'number': 1065} | 0.7340 | 0.7837 | 0.7581 | 0.8106 |
67
+ | 0.3169 | 12.0 | 120 | 0.6639 | {'precision': 0.7094972067039106, 'recall': 0.7849196538936959, 'f1': 0.7453051643192488, 'number': 809} | {'precision': 0.3017241379310345, 'recall': 0.29411764705882354, 'f1': 0.29787234042553185, 'number': 119} | {'precision': 0.7582417582417582, 'recall': 0.8422535211267606, 'f1': 0.7980427046263344, 'number': 1065} | 0.7142 | 0.7863 | 0.7485 | 0.8152 |
68
+ | 0.2951 | 13.0 | 130 | 0.6653 | {'precision': 0.7094972067039106, 'recall': 0.7849196538936959, 'f1': 0.7453051643192488, 'number': 809} | {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119} | {'precision': 0.7784588441330998, 'recall': 0.8347417840375587, 'f1': 0.805618486633439, 'number': 1065} | 0.7253 | 0.7817 | 0.7525 | 0.8167 |
69
+ | 0.2872 | 14.0 | 140 | 0.6667 | {'precision': 0.7116022099447514, 'recall': 0.796044499381953, 'f1': 0.751458576429405, 'number': 809} | {'precision': 0.2982456140350877, 'recall': 0.2857142857142857, 'f1': 0.2918454935622318, 'number': 119} | {'precision': 0.7737162750217581, 'recall': 0.8347417840375587, 'f1': 0.803071364046974, 'number': 1065} | 0.7228 | 0.7863 | 0.7532 | 0.8179 |
70
+ | 0.2779 | 15.0 | 150 | 0.6650 | {'precision': 0.7158712541620422, 'recall': 0.7972805933250927, 'f1': 0.7543859649122808, 'number': 809} | {'precision': 0.2982456140350877, 'recall': 0.2857142857142857, 'f1': 0.2918454935622318, 'number': 119} | {'precision': 0.7667238421955404, 'recall': 0.8394366197183099, 'f1': 0.8014343343792021, 'number': 1065} | 0.7212 | 0.7893 | 0.7537 | 0.8191 |
71
+
72
+
73
+ ### Framework versions
74
+
75
+ - Transformers 4.25.1
76
+ - Pytorch 1.12.1
77
+ - Datasets 2.8.0
78
+ - Tokenizers 0.13.2
logs/events.out.tfevents.1673446845.Pedros-MacBook-Air.local.66883.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5b5e1ab94ae858a73d36d22eecf02ee127e384f7129d04eef56369e0dc5f1d7f
3
- size 13775
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37cb30b461302ad3441334babae5113d2a99cab97f7a72c9ef9e6f2cfcd8b9c2
3
+ size 14129
preprocessor_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "LayoutLMv2FeatureExtractor",
5
+ "image_processor_type": "LayoutLMv2ImageProcessor",
6
+ "ocr_lang": null,
7
+ "processor_class": "LayoutLMv2Processor",
8
+ "resample": 2,
9
+ "size": {
10
+ "height": 224,
11
+ "width": 224
12
+ },
13
+ "tesseract_config": ""
14
+ }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a767c2009fdd36c0d714cc55f034a42e256949962a472b26f027e0e04da969de
3
  size 450603685
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6aa4de81764d1adc25278007e1fe815f15a4c4242d610bbfe9f9101b9ec183f6
3
  size 450603685
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": null,
3
+ "apply_ocr": false,
4
+ "cls_token": "[CLS]",
5
+ "cls_token_box": [
6
+ 0,
7
+ 0,
8
+ 0,
9
+ 0
10
+ ],
11
+ "do_basic_tokenize": true,
12
+ "do_lower_case": true,
13
+ "mask_token": "[MASK]",
14
+ "model_max_length": 512,
15
+ "name_or_path": "microsoft/layoutlmv2-base-uncased",
16
+ "never_split": null,
17
+ "only_label_first_subword": true,
18
+ "pad_token": "[PAD]",
19
+ "pad_token_box": [
20
+ 0,
21
+ 0,
22
+ 0,
23
+ 0
24
+ ],
25
+ "pad_token_label": -100,
26
+ "processor_class": "LayoutLMv2Processor",
27
+ "sep_token": "[SEP]",
28
+ "sep_token_box": [
29
+ 1000,
30
+ 1000,
31
+ 1000,
32
+ 1000
33
+ ],
34
+ "special_tokens_map_file": null,
35
+ "strip_accents": null,
36
+ "tokenize_chinese_chars": true,
37
+ "tokenizer_class": "LayoutLMv2Tokenizer",
38
+ "unk_token": "[UNK]"
39
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff