End of training
Browse files- README.md +82 -0
- logs/events.out.tfevents.1735195853.c33e6a290e06.456.0 +2 -2
- preprocessor_config.json +13 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +81 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: mit
|
| 4 |
+
base_model: microsoft/layoutlm-base-uncased
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
datasets:
|
| 8 |
+
- funsd
|
| 9 |
+
model-index:
|
| 10 |
+
- name: layoutlm-funsd
|
| 11 |
+
results: []
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
+
|
| 17 |
+
# layoutlm-funsd
|
| 18 |
+
|
| 19 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
| 20 |
+
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 0.6896
|
| 22 |
+
- Answer: {'precision': 0.7152245345016429, 'recall': 0.8071693448702101, 'f1': 0.7584204413472706, 'number': 809}
|
| 23 |
+
- Header: {'precision': 0.3697478991596639, 'recall': 0.3697478991596639, 'f1': 0.3697478991596639, 'number': 119}
|
| 24 |
+
- Question: {'precision': 0.7833333333333333, 'recall': 0.8384976525821596, 'f1': 0.8099773242630386, 'number': 1065}
|
| 25 |
+
- Overall Precision: 0.7320
|
| 26 |
+
- Overall Recall: 0.7978
|
| 27 |
+
- Overall F1: 0.7635
|
| 28 |
+
- Overall Accuracy: 0.8098
|
| 29 |
+
|
| 30 |
+
## Model description
|
| 31 |
+
|
| 32 |
+
More information needed
|
| 33 |
+
|
| 34 |
+
## Intended uses & limitations
|
| 35 |
+
|
| 36 |
+
More information needed
|
| 37 |
+
|
| 38 |
+
## Training and evaluation data
|
| 39 |
+
|
| 40 |
+
More information needed
|
| 41 |
+
|
| 42 |
+
## Training procedure
|
| 43 |
+
|
| 44 |
+
### Training hyperparameters
|
| 45 |
+
|
| 46 |
+
The following hyperparameters were used during training:
|
| 47 |
+
- learning_rate: 3e-05
|
| 48 |
+
- train_batch_size: 16
|
| 49 |
+
- eval_batch_size: 8
|
| 50 |
+
- seed: 42
|
| 51 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 52 |
+
- lr_scheduler_type: linear
|
| 53 |
+
- num_epochs: 15
|
| 54 |
+
- mixed_precision_training: Native AMP
|
| 55 |
+
|
| 56 |
+
### Training results
|
| 57 |
+
|
| 58 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
| 59 |
+
|:-------------:|:-----:|:----:|:---------------:|:-------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
| 60 |
+
| 1.7932 | 1.0 | 10 | 1.6151 | {'precision': 0.013916500994035786, 'recall': 0.00865265760197775, 'f1': 0.010670731707317074, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.24816176470588236, 'recall': 0.1267605633802817, 'f1': 0.1678060907395898, 'number': 1065} | 0.1356 | 0.0712 | 0.0934 | 0.3264 |
|
| 61 |
+
| 1.4724 | 2.0 | 20 | 1.2863 | {'precision': 0.11666666666666667, 'recall': 0.1211372064276885, 'f1': 0.11885991510006065, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.3751733703190014, 'recall': 0.507981220657277, 'f1': 0.43159154367770247, 'number': 1065} | 0.2800 | 0.3206 | 0.2989 | 0.5749 |
|
| 62 |
+
| 1.1346 | 3.0 | 30 | 0.9582 | {'precision': 0.44279176201373, 'recall': 0.4783683559950556, 'f1': 0.45989304812834225, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5849647611589663, 'recall': 0.7014084507042253, 'f1': 0.6379163108454312, 'number': 1065} | 0.5202 | 0.5690 | 0.5435 | 0.7037 |
|
| 63 |
+
| 0.8689 | 4.0 | 40 | 0.7730 | {'precision': 0.6069182389937107, 'recall': 0.715698393077874, 'f1': 0.6568349404424276, 'number': 809} | {'precision': 0.15384615384615385, 'recall': 0.06722689075630252, 'f1': 0.0935672514619883, 'number': 119} | {'precision': 0.6672519754170325, 'recall': 0.7136150234741784, 'f1': 0.6896551724137931, 'number': 1065} | 0.6280 | 0.6759 | 0.6510 | 0.7590 |
|
| 64 |
+
| 0.6834 | 5.0 | 50 | 0.6983 | {'precision': 0.6349206349206349, 'recall': 0.7416563658838071, 'f1': 0.6841505131128848, 'number': 809} | {'precision': 0.273972602739726, 'recall': 0.16806722689075632, 'f1': 0.20833333333333331, 'number': 119} | {'precision': 0.6741214057507987, 'recall': 0.7924882629107981, 'f1': 0.7285282693137678, 'number': 1065} | 0.6449 | 0.7346 | 0.6868 | 0.7813 |
|
| 65 |
+
| 0.5771 | 6.0 | 60 | 0.6775 | {'precision': 0.6438631790744467, 'recall': 0.7911001236093943, 'f1': 0.7099278979478648, 'number': 809} | {'precision': 0.3424657534246575, 'recall': 0.21008403361344538, 'f1': 0.2604166666666667, 'number': 119} | {'precision': 0.7335640138408305, 'recall': 0.7962441314553991, 'f1': 0.7636199909950472, 'number': 1065} | 0.6806 | 0.7592 | 0.7177 | 0.7871 |
|
| 66 |
+
| 0.5055 | 7.0 | 70 | 0.6602 | {'precision': 0.6920529801324503, 'recall': 0.7750309023485785, 'f1': 0.7311953352769679, 'number': 809} | {'precision': 0.3069306930693069, 'recall': 0.2605042016806723, 'f1': 0.28181818181818186, 'number': 119} | {'precision': 0.7590788308237378, 'recall': 0.8046948356807512, 'f1': 0.781221513217867, 'number': 1065} | 0.7093 | 0.7602 | 0.7338 | 0.7950 |
|
| 67 |
+
| 0.4549 | 8.0 | 80 | 0.6456 | {'precision': 0.6804670912951167, 'recall': 0.792336217552534, 'f1': 0.7321530553969159, 'number': 809} | {'precision': 0.2831858407079646, 'recall': 0.2689075630252101, 'f1': 0.27586206896551724, 'number': 119} | {'precision': 0.7497865072587532, 'recall': 0.8244131455399061, 'f1': 0.7853309481216457, 'number': 1065} | 0.6968 | 0.7782 | 0.7352 | 0.8069 |
|
| 68 |
+
| 0.3945 | 9.0 | 90 | 0.6484 | {'precision': 0.6906552094522019, 'recall': 0.7948084054388134, 'f1': 0.7390804597701149, 'number': 809} | {'precision': 0.30833333333333335, 'recall': 0.31092436974789917, 'f1': 0.3096234309623431, 'number': 119} | {'precision': 0.7660869565217391, 'recall': 0.8272300469483568, 'f1': 0.7954853273137698, 'number': 1065} | 0.7092 | 0.7832 | 0.7444 | 0.8067 |
|
| 69 |
+
| 0.3887 | 10.0 | 100 | 0.6674 | {'precision': 0.6968085106382979, 'recall': 0.8096415327564895, 'f1': 0.7489994282447112, 'number': 809} | {'precision': 0.31, 'recall': 0.2605042016806723, 'f1': 0.2831050228310502, 'number': 119} | {'precision': 0.790990990990991, 'recall': 0.8244131455399061, 'f1': 0.8073563218390805, 'number': 1065} | 0.7274 | 0.7847 | 0.7550 | 0.8115 |
|
| 70 |
+
| 0.3299 | 11.0 | 110 | 0.6748 | {'precision': 0.7125550660792952, 'recall': 0.799752781211372, 'f1': 0.7536400698893418, 'number': 809} | {'precision': 0.3305785123966942, 'recall': 0.33613445378151263, 'f1': 0.33333333333333337, 'number': 119} | {'precision': 0.7663230240549829, 'recall': 0.8375586854460094, 'f1': 0.800358905338717, 'number': 1065} | 0.7200 | 0.7923 | 0.7544 | 0.8053 |
|
| 71 |
+
| 0.3088 | 12.0 | 120 | 0.6757 | {'precision': 0.7155361050328227, 'recall': 0.8084054388133498, 'f1': 0.759141033081834, 'number': 809} | {'precision': 0.3904761904761905, 'recall': 0.3445378151260504, 'f1': 0.36607142857142855, 'number': 119} | {'precision': 0.7783641160949868, 'recall': 0.8309859154929577, 'f1': 0.8038147138964576, 'number': 1065} | 0.7328 | 0.7928 | 0.7616 | 0.8076 |
|
| 72 |
+
| 0.2922 | 13.0 | 130 | 0.6892 | {'precision': 0.7142857142857143, 'recall': 0.8096415327564895, 'f1': 0.7589803012746235, 'number': 809} | {'precision': 0.38461538461538464, 'recall': 0.37815126050420167, 'f1': 0.38135593220338987, 'number': 119} | {'precision': 0.7850133809099019, 'recall': 0.8262910798122066, 'f1': 0.8051235132662397, 'number': 1065} | 0.7332 | 0.7928 | 0.7618 | 0.8076 |
|
| 73 |
+
| 0.2692 | 14.0 | 140 | 0.6906 | {'precision': 0.7212389380530974, 'recall': 0.8059332509270705, 'f1': 0.7612375948628138, 'number': 809} | {'precision': 0.375, 'recall': 0.37815126050420167, 'f1': 0.37656903765690375, 'number': 119} | {'precision': 0.7841409691629956, 'recall': 0.8356807511737089, 'f1': 0.8090909090909091, 'number': 1065} | 0.7351 | 0.7963 | 0.7645 | 0.8087 |
|
| 74 |
+
| 0.2735 | 15.0 | 150 | 0.6896 | {'precision': 0.7152245345016429, 'recall': 0.8071693448702101, 'f1': 0.7584204413472706, 'number': 809} | {'precision': 0.3697478991596639, 'recall': 0.3697478991596639, 'f1': 0.3697478991596639, 'number': 119} | {'precision': 0.7833333333333333, 'recall': 0.8384976525821596, 'f1': 0.8099773242630386, 'number': 1065} | 0.7320 | 0.7978 | 0.7635 | 0.8098 |
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
### Framework versions
|
| 78 |
+
|
| 79 |
+
- Transformers 4.47.1
|
| 80 |
+
- Pytorch 2.5.1+cu121
|
| 81 |
+
- Datasets 3.2.0
|
| 82 |
+
- Tokenizers 0.21.0
|
logs/events.out.tfevents.1735195853.c33e6a290e06.456.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:13264bb1cf797b5be128bb7c9b71ac33ad5363189fba5f20d8ea205fe81502cc
|
| 3 |
+
size 16219
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"apply_ocr": true,
|
| 3 |
+
"do_resize": true,
|
| 4 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
| 5 |
+
"ocr_lang": null,
|
| 6 |
+
"processor_class": "LayoutLMv2Processor",
|
| 7 |
+
"resample": 2,
|
| 8 |
+
"size": {
|
| 9 |
+
"height": 224,
|
| 10 |
+
"width": 224
|
| 11 |
+
},
|
| 12 |
+
"tesseract_config": ""
|
| 13 |
+
}
|
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,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": false,
|
| 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 |
+
"extra_special_tokens": {},
|
| 57 |
+
"mask_token": "[MASK]",
|
| 58 |
+
"model_max_length": 512,
|
| 59 |
+
"never_split": null,
|
| 60 |
+
"only_label_first_subword": true,
|
| 61 |
+
"pad_token": "[PAD]",
|
| 62 |
+
"pad_token_box": [
|
| 63 |
+
0,
|
| 64 |
+
0,
|
| 65 |
+
0,
|
| 66 |
+
0
|
| 67 |
+
],
|
| 68 |
+
"pad_token_label": -100,
|
| 69 |
+
"processor_class": "LayoutLMv2Processor",
|
| 70 |
+
"sep_token": "[SEP]",
|
| 71 |
+
"sep_token_box": [
|
| 72 |
+
1000,
|
| 73 |
+
1000,
|
| 74 |
+
1000,
|
| 75 |
+
1000
|
| 76 |
+
],
|
| 77 |
+
"strip_accents": null,
|
| 78 |
+
"tokenize_chinese_chars": true,
|
| 79 |
+
"tokenizer_class": "LayoutLMv2Tokenizer",
|
| 80 |
+
"unk_token": "[UNK]"
|
| 81 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|