End of training
Browse files- README.md +82 -0
- logs/events.out.tfevents.1746776911.b973bfb48075.5661.1 +2 -2
- logs/events.out.tfevents.1746777533.b973bfb48075.5661.2 +3 -0
- 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.7039
|
| 22 |
+
- Answer: {'precision': 0.7083333333333334, 'recall': 0.7985166872682324, 'f1': 0.7507263219058687, 'number': 809}
|
| 23 |
+
- Header: {'precision': 0.336, 'recall': 0.35294117647058826, 'f1': 0.3442622950819672, 'number': 119}
|
| 24 |
+
- Question: {'precision': 0.7771929824561403, 'recall': 0.831924882629108, 'f1': 0.8036281179138323, 'number': 1065}
|
| 25 |
+
- Overall Precision: 0.7230
|
| 26 |
+
- Overall Recall: 0.7898
|
| 27 |
+
- Overall F1: 0.7549
|
| 28 |
+
- Overall Accuracy: 0.8028
|
| 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 OptimizerNames.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.8301 | 1.0 | 10 | 1.5849 | {'precision': 0.008086253369272238, 'recall': 0.007416563658838072, 'f1': 0.007736943907156674, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.22358346094946402, 'recall': 0.13708920187793427, 'f1': 0.16996507566938301, 'number': 1065} | 0.1090 | 0.0763 | 0.0897 | 0.3514 |
|
| 61 |
+
| 1.4704 | 2.0 | 20 | 1.2710 | {'precision': 0.2843881856540084, 'recall': 0.41656365883807167, 'f1': 0.3380140421263791, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.3906474820143885, 'recall': 0.5098591549295775, 'f1': 0.44236252545824845, 'number': 1065} | 0.3408 | 0.4415 | 0.3847 | 0.6020 |
|
| 62 |
+
| 1.1259 | 3.0 | 30 | 0.9451 | {'precision': 0.47373447946513847, 'recall': 0.6131025957972805, 'f1': 0.5344827586206896, 'number': 809} | {'precision': 0.0625, 'recall': 0.025210084033613446, 'f1': 0.035928143712574856, 'number': 119} | {'precision': 0.5223654283548143, 'recall': 0.6469483568075117, 'f1': 0.5780201342281879, 'number': 1065} | 0.4921 | 0.5961 | 0.5391 | 0.7000 |
|
| 63 |
+
| 0.8549 | 4.0 | 40 | 0.7891 | {'precision': 0.5652985074626866, 'recall': 0.7490729295426453, 'f1': 0.6443381180223287, 'number': 809} | {'precision': 0.20833333333333334, 'recall': 0.12605042016806722, 'f1': 0.15706806282722513, 'number': 119} | {'precision': 0.6485013623978202, 'recall': 0.6704225352112676, 'f1': 0.6592797783933518, 'number': 1065} | 0.5947 | 0.6698 | 0.6300 | 0.7562 |
|
| 64 |
+
| 0.6872 | 5.0 | 50 | 0.7203 | {'precision': 0.6393617021276595, 'recall': 0.7428924598269468, 'f1': 0.6872498570611778, 'number': 809} | {'precision': 0.358974358974359, 'recall': 0.23529411764705882, 'f1': 0.28426395939086296, 'number': 119} | {'precision': 0.6650563607085346, 'recall': 0.7755868544600939, 'f1': 0.716081491114001, 'number': 1065} | 0.6438 | 0.7301 | 0.6842 | 0.7798 |
|
| 65 |
+
| 0.5872 | 6.0 | 60 | 0.6889 | {'precision': 0.6236559139784946, 'recall': 0.788627935723115, 'f1': 0.6965065502183407, 'number': 809} | {'precision': 0.35802469135802467, 'recall': 0.24369747899159663, 'f1': 0.29000000000000004, 'number': 119} | {'precision': 0.7190517998244074, 'recall': 0.7690140845070422, 'f1': 0.7431941923774955, 'number': 1065} | 0.6625 | 0.7456 | 0.7016 | 0.7797 |
|
| 66 |
+
| 0.5065 | 7.0 | 70 | 0.6618 | {'precision': 0.681283422459893, 'recall': 0.7873918417799752, 'f1': 0.7305045871559632, 'number': 809} | {'precision': 0.336734693877551, 'recall': 0.2773109243697479, 'f1': 0.30414746543778803, 'number': 119} | {'precision': 0.748471615720524, 'recall': 0.8046948356807512, 'f1': 0.7755656108597285, 'number': 1065} | 0.7011 | 0.7662 | 0.7322 | 0.7934 |
|
| 67 |
+
| 0.4527 | 8.0 | 80 | 0.6639 | {'precision': 0.671161825726141, 'recall': 0.799752781211372, 'f1': 0.7298364354201917, 'number': 809} | {'precision': 0.3170731707317073, 'recall': 0.3277310924369748, 'f1': 0.32231404958677684, 'number': 119} | {'precision': 0.7473867595818815, 'recall': 0.8056338028169014, 'f1': 0.7754179846362403, 'number': 1065} | 0.6908 | 0.7747 | 0.7304 | 0.7955 |
|
| 68 |
+
| 0.3952 | 9.0 | 90 | 0.6666 | {'precision': 0.686358754027927, 'recall': 0.7898640296662547, 'f1': 0.7344827586206897, 'number': 809} | {'precision': 0.3523809523809524, 'recall': 0.31092436974789917, 'f1': 0.33035714285714285, 'number': 119} | {'precision': 0.7519247219846023, 'recall': 0.8253521126760563, 'f1': 0.7869292748433303, 'number': 1065} | 0.7052 | 0.7802 | 0.7408 | 0.7969 |
|
| 69 |
+
| 0.3863 | 10.0 | 100 | 0.6806 | {'precision': 0.6849894291754757, 'recall': 0.8009888751545118, 'f1': 0.7384615384615385, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.31932773109243695, 'f1': 0.3261802575107296, 'number': 119} | {'precision': 0.7670157068062827, 'recall': 0.8253521126760563, 'f1': 0.7951153324287653, 'number': 1065} | 0.7094 | 0.7852 | 0.7454 | 0.7985 |
|
| 70 |
+
| 0.3307 | 11.0 | 110 | 0.6859 | {'precision': 0.6938775510204082, 'recall': 0.7985166872682324, 'f1': 0.7425287356321839, 'number': 809} | {'precision': 0.3416666666666667, 'recall': 0.3445378151260504, 'f1': 0.34309623430962344, 'number': 119} | {'precision': 0.764402407566638, 'recall': 0.8347417840375587, 'f1': 0.7980251346499103, 'number': 1065} | 0.7118 | 0.7908 | 0.7492 | 0.8004 |
|
| 71 |
+
| 0.3126 | 12.0 | 120 | 0.6896 | {'precision': 0.697198275862069, 'recall': 0.799752781211372, 'f1': 0.7449625791594704, 'number': 809} | {'precision': 0.36283185840707965, 'recall': 0.3445378151260504, 'f1': 0.35344827586206895, 'number': 119} | {'precision': 0.7788632326820604, 'recall': 0.8234741784037559, 'f1': 0.8005476951163851, 'number': 1065} | 0.7222 | 0.7852 | 0.7524 | 0.8012 |
|
| 72 |
+
| 0.2979 | 13.0 | 130 | 0.6997 | {'precision': 0.6992399565689468, 'recall': 0.796044499381953, 'f1': 0.7445086705202313, 'number': 809} | {'precision': 0.3416666666666667, 'recall': 0.3445378151260504, 'f1': 0.34309623430962344, 'number': 119} | {'precision': 0.7763157894736842, 'recall': 0.8309859154929577, 'f1': 0.802721088435374, 'number': 1065} | 0.7199 | 0.7878 | 0.7523 | 0.8007 |
|
| 73 |
+
| 0.2712 | 14.0 | 140 | 0.7039 | {'precision': 0.7083333333333334, 'recall': 0.7985166872682324, 'f1': 0.7507263219058687, 'number': 809} | {'precision': 0.336, 'recall': 0.35294117647058826, 'f1': 0.3442622950819672, 'number': 119} | {'precision': 0.7771929824561403, 'recall': 0.831924882629108, 'f1': 0.8036281179138323, 'number': 1065} | 0.7230 | 0.7898 | 0.7549 | 0.8028 |
|
| 74 |
+
| 0.2738 | 15.0 | 150 | 0.7055 | {'precision': 0.7035830618892508, 'recall': 0.8009888751545118, 'f1': 0.7491329479768787, 'number': 809} | {'precision': 0.34146341463414637, 'recall': 0.35294117647058826, 'f1': 0.34710743801652894, 'number': 119} | {'precision': 0.7775816416593115, 'recall': 0.8272300469483568, 'f1': 0.8016378525932666, 'number': 1065} | 0.7216 | 0.7883 | 0.7535 | 0.8028 |
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
### Framework versions
|
| 78 |
+
|
| 79 |
+
- Transformers 4.51.3
|
| 80 |
+
- Pytorch 2.6.0+cu124
|
| 81 |
+
- Datasets 3.6.0
|
| 82 |
+
- Tokenizers 0.21.1
|
logs/events.out.tfevents.1746776911.b973bfb48075.5661.1
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:70a22e3b3ac16de7cbe4b207e2e492089d3ec2b602e47de66b5e309a7d81ba53
|
| 3 |
+
size 16122
|
logs/events.out.tfevents.1746777533.b973bfb48075.5661.2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:307802fe31ba8f2e6daae5a45e56be5f156bfdf04a56f0e595e68389212fd75b
|
| 3 |
+
size 592
|
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
|
|
|