apatel001 commited on
Commit
db3a82f
1 Parent(s): 939e144

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.7099
21
+ - Answer: {'precision': 0.7126948775055679, 'recall': 0.7911001236093943, 'f1': 0.7498535442296427, 'number': 809}
22
+ - Header: {'precision': 0.3793103448275862, 'recall': 0.3697478991596639, 'f1': 0.374468085106383, 'number': 119}
23
+ - Question: {'precision': 0.7863397548161121, 'recall': 0.8431924882629108, 'f1': 0.813774354327141, 'number': 1065}
24
+ - Overall Precision: 0.7338
25
+ - Overall Recall: 0.7938
26
+ - Overall F1: 0.7626
27
+ - Overall Accuracy: 0.8008
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.8413 | 1.0 | 10 | 1.6504 | {'precision': 0.011467889908256881, 'recall': 0.006180469715698393, 'f1': 0.008032128514056226, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2831168831168831, 'recall': 0.10234741784037558, 'f1': 0.15034482758620688, 'number': 1065} | 0.1389 | 0.0572 | 0.0810 | 0.3247 |
60
+ | 1.5029 | 2.0 | 20 | 1.3220 | {'precision': 0.1353811149032992, 'recall': 0.14709517923362175, 'f1': 0.1409952606635071, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.40875370919881304, 'recall': 0.5173708920187794, 'f1': 0.4566929133858268, 'number': 1065} | 0.3009 | 0.3362 | 0.3175 | 0.5584 |
61
+ | 1.1608 | 3.0 | 30 | 1.0033 | {'precision': 0.4221267454350161, 'recall': 0.4857849196538937, 'f1': 0.45172413793103444, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5333333333333333, 'recall': 0.6910798122065728, 'f1': 0.6020449897750512, 'number': 1065} | 0.4871 | 0.5665 | 0.5238 | 0.6833 |
62
+ | 0.9008 | 4.0 | 40 | 0.8415 | {'precision': 0.5449101796407185, 'recall': 0.6749072929542645, 'f1': 0.6029817780231916, 'number': 809} | {'precision': 0.11904761904761904, 'recall': 0.04201680672268908, 'f1': 0.06211180124223603, 'number': 119} | {'precision': 0.6373355263157895, 'recall': 0.7276995305164319, 'f1': 0.6795265234546252, 'number': 1065} | 0.5867 | 0.6653 | 0.6236 | 0.7396 |
63
+ | 0.7085 | 5.0 | 50 | 0.7531 | {'precision': 0.6281628162816282, 'recall': 0.7058096415327565, 'f1': 0.6647264260768335, 'number': 809} | {'precision': 0.16, 'recall': 0.10084033613445378, 'f1': 0.12371134020618556, 'number': 119} | {'precision': 0.6728110599078341, 'recall': 0.8225352112676056, 'f1': 0.7401774397972117, 'number': 1065} | 0.6382 | 0.7321 | 0.6819 | 0.7708 |
64
+ | 0.6016 | 6.0 | 60 | 0.7178 | {'precision': 0.6607515657620042, 'recall': 0.7824474660074165, 'f1': 0.7164685908319186, 'number': 809} | {'precision': 0.2235294117647059, 'recall': 0.15966386554621848, 'f1': 0.18627450980392157, 'number': 119} | {'precision': 0.7422145328719724, 'recall': 0.8056338028169014, 'f1': 0.7726249437190456, 'number': 1065} | 0.6867 | 0.7577 | 0.7204 | 0.7819 |
65
+ | 0.5255 | 7.0 | 70 | 0.6773 | {'precision': 0.6886688668866887, 'recall': 0.7737948084054388, 'f1': 0.7287543655413271, 'number': 809} | {'precision': 0.3235294117647059, 'recall': 0.2773109243697479, 'f1': 0.2986425339366516, 'number': 119} | {'precision': 0.748932536293766, 'recall': 0.8234741784037559, 'f1': 0.7844364937388193, 'number': 1065} | 0.7039 | 0.7707 | 0.7358 | 0.7985 |
66
+ | 0.4664 | 8.0 | 80 | 0.6865 | {'precision': 0.6846652267818575, 'recall': 0.7836835599505563, 'f1': 0.730835734870317, 'number': 809} | {'precision': 0.24299065420560748, 'recall': 0.2184873949579832, 'f1': 0.2300884955752212, 'number': 119} | {'precision': 0.7593397046046916, 'recall': 0.8206572769953052, 'f1': 0.7888086642599278, 'number': 1065} | 0.7024 | 0.7697 | 0.7345 | 0.7950 |
67
+ | 0.4092 | 9.0 | 90 | 0.6843 | {'precision': 0.6929046563192904, 'recall': 0.7725587144622992, 'f1': 0.7305669199298657, 'number': 809} | {'precision': 0.3050847457627119, 'recall': 0.3025210084033613, 'f1': 0.3037974683544304, 'number': 119} | {'precision': 0.7587085811384877, 'recall': 0.8384976525821596, 'f1': 0.7966101694915255, 'number': 1065} | 0.7073 | 0.7797 | 0.7418 | 0.8013 |
68
+ | 0.4007 | 10.0 | 100 | 0.6826 | {'precision': 0.6887921653971708, 'recall': 0.7824474660074165, 'f1': 0.7326388888888888, 'number': 809} | {'precision': 0.3142857142857143, 'recall': 0.2773109243697479, 'f1': 0.29464285714285715, 'number': 119} | {'precision': 0.7761578044596913, 'recall': 0.8497652582159625, 'f1': 0.811295383236217, 'number': 1065} | 0.7174 | 0.7883 | 0.7511 | 0.8001 |
69
+ | 0.3396 | 11.0 | 110 | 0.6904 | {'precision': 0.6922246220302376, 'recall': 0.792336217552534, 'f1': 0.7389048991354467, 'number': 809} | {'precision': 0.32231404958677684, 'recall': 0.3277310924369748, 'f1': 0.32499999999999996, 'number': 119} | {'precision': 0.7778745644599303, 'recall': 0.8384976525821596, 'f1': 0.8070492544057841, 'number': 1065} | 0.7166 | 0.7893 | 0.7512 | 0.8036 |
70
+ | 0.3223 | 12.0 | 120 | 0.7032 | {'precision': 0.7138084632516704, 'recall': 0.792336217552534, 'f1': 0.7510251903925014, 'number': 809} | {'precision': 0.3669724770642202, 'recall': 0.33613445378151263, 'f1': 0.3508771929824562, 'number': 119} | {'precision': 0.788546255506608, 'recall': 0.8403755868544601, 'f1': 0.8136363636363636, 'number': 1065} | 0.7358 | 0.7908 | 0.7623 | 0.8012 |
71
+ | 0.3079 | 13.0 | 130 | 0.7098 | {'precision': 0.6950431034482759, 'recall': 0.7972805933250927, 'f1': 0.7426597582037997, 'number': 809} | {'precision': 0.3652173913043478, 'recall': 0.35294117647058826, 'f1': 0.35897435897435903, 'number': 119} | {'precision': 0.7906360424028268, 'recall': 0.8403755868544601, 'f1': 0.81474738279472, 'number': 1065} | 0.7274 | 0.7938 | 0.7591 | 0.8027 |
72
+ | 0.2866 | 14.0 | 140 | 0.7096 | {'precision': 0.7103218645948945, 'recall': 0.7911001236093943, 'f1': 0.7485380116959064, 'number': 809} | {'precision': 0.36065573770491804, 'recall': 0.3697478991596639, 'f1': 0.36514522821576767, 'number': 119} | {'precision': 0.787719298245614, 'recall': 0.8431924882629108, 'f1': 0.8145124716553288, 'number': 1065} | 0.7314 | 0.7938 | 0.7613 | 0.8007 |
73
+ | 0.2847 | 15.0 | 150 | 0.7099 | {'precision': 0.7126948775055679, 'recall': 0.7911001236093943, 'f1': 0.7498535442296427, 'number': 809} | {'precision': 0.3793103448275862, 'recall': 0.3697478991596639, 'f1': 0.374468085106383, 'number': 119} | {'precision': 0.7863397548161121, 'recall': 0.8431924882629108, 'f1': 0.813774354327141, 'number': 1065} | 0.7338 | 0.7938 | 0.7626 | 0.8008 |
74
+
75
+
76
+ ### Framework versions
77
+
78
+ - Transformers 4.41.2
79
+ - Pytorch 2.3.0+cu121
80
+ - Datasets 2.20.0
81
+ - Tokenizers 0.19.1
logs/events.out.tfevents.1718679389.c91a556e3293.1476.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:32b8305f1665668de0070c74f3d23a270f545603337acc9b146c4e7357ce22cc
3
- size 14915
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0c73473b0378f3d32bc273962a92d2607e40add63b7a179db9ce7924165c568
3
+ size 15984
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5deeb5e7b7cc95dccea2d07d76707947c4dbc47bf7dc996a2d62bb2602fd6d51
3
  size 450558212
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7a4f61553495655d3cc50cc7c5b4c4b4c4343c1961d322d6c23c1388c78e02e
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