metadata
license: mit
base_model: microsoft/layoutlm-base-uncased
tags:
- generated_from_trainer
datasets:
- funsd
model-index:
- name: layoutlm-funsd
results: []
layoutlm-funsd
This model is a fine-tuned version of microsoft/layoutlm-base-uncased on the funsd dataset. It achieves the following results on the evaluation set:
- Loss: 1.1237
- Answer: {'precision': 0.38014311270125223, 'recall': 0.5253399258343634, 'f1': 0.44110015568240785, 'number': 809}
- Header: {'precision': 0.32608695652173914, 'recall': 0.25210084033613445, 'f1': 0.2843601895734597, 'number': 119}
- Question: {'precision': 0.5316760224538893, 'recall': 0.6225352112676056, 'f1': 0.5735294117647058, 'number': 1065}
- Overall Precision: 0.4550
- Overall Recall: 0.5610
- Overall F1: 0.5025
- Overall Accuracy: 0.6009
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 15
- mixed_precision_training: Native AMP
Training results
Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
---|---|---|---|---|---|---|---|---|---|---|
1.7571 | 1.0 | 10 | 1.5578 | {'precision': 0.03216374269005848, 'recall': 0.027194066749072928, 'f1': 0.029470864032150032, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.24550898203592814, 'recall': 0.1539906103286385, 'f1': 0.189267166762839, 'number': 1065} | 0.1376 | 0.0933 | 0.1112 | 0.3461 |
1.4754 | 2.0 | 20 | 1.3886 | {'precision': 0.18979987088444158, 'recall': 0.36341161928306553, 'f1': 0.24936386768447838, 'number': 809} | {'precision': 0.0851063829787234, 'recall': 0.03361344537815126, 'f1': 0.048192771084337345, 'number': 119} | {'precision': 0.2655198204936425, 'recall': 0.3333333333333333, 'f1': 0.29558701082431305, 'number': 1065} | 0.2226 | 0.3276 | 0.2651 | 0.4190 |
1.2882 | 3.0 | 30 | 1.2556 | {'precision': 0.25, 'recall': 0.5030902348578492, 'f1': 0.3340172343044727, 'number': 809} | {'precision': 0.07547169811320754, 'recall': 0.03361344537815126, 'f1': 0.04651162790697674, 'number': 119} | {'precision': 0.3400431344356578, 'recall': 0.444131455399061, 'f1': 0.38517915309446255, 'number': 1065} | 0.2878 | 0.4436 | 0.3491 | 0.4540 |
1.1508 | 4.0 | 40 | 1.1427 | {'precision': 0.27153558052434457, 'recall': 0.5377008652657602, 'f1': 0.36084612194110327, 'number': 809} | {'precision': 0.23595505617977527, 'recall': 0.17647058823529413, 'f1': 0.20192307692307693, 'number': 119} | {'precision': 0.4009397024275646, 'recall': 0.4807511737089202, 'f1': 0.43723313407344155, 'number': 1065} | 0.3261 | 0.4857 | 0.3902 | 0.5272 |
1.0506 | 5.0 | 50 | 1.1546 | {'precision': 0.28481455563331, 'recall': 0.5030902348578492, 'f1': 0.36371760500446826, 'number': 809} | {'precision': 0.24719101123595505, 'recall': 0.18487394957983194, 'f1': 0.21153846153846156, 'number': 119} | {'precision': 0.4018324607329843, 'recall': 0.5765258215962441, 'f1': 0.4735827227150019, 'number': 1065} | 0.3424 | 0.5233 | 0.4140 | 0.5441 |
0.9855 | 6.0 | 60 | 1.1005 | {'precision': 0.31229012760241776, 'recall': 0.5747836835599506, 'f1': 0.4046997389033942, 'number': 809} | {'precision': 0.328125, 'recall': 0.17647058823529413, 'f1': 0.22950819672131148, 'number': 119} | {'precision': 0.47493403693931396, 'recall': 0.5070422535211268, 'f1': 0.49046321525885556, 'number': 1065} | 0.3814 | 0.5148 | 0.4382 | 0.5656 |
0.9039 | 7.0 | 70 | 1.0551 | {'precision': 0.32831608654750705, 'recall': 0.43139678615574784, 'f1': 0.37286324786324787, 'number': 809} | {'precision': 0.2743362831858407, 'recall': 0.2605042016806723, 'f1': 0.26724137931034486, 'number': 119} | {'precision': 0.4689306358381503, 'recall': 0.6093896713615023, 'f1': 0.5300122498979176, 'number': 1065} | 0.4020 | 0.5163 | 0.4520 | 0.5981 |
0.841 | 8.0 | 80 | 1.0710 | {'precision': 0.3379032258064516, 'recall': 0.5179233621755254, 'f1': 0.40897999023914106, 'number': 809} | {'precision': 0.2926829268292683, 'recall': 0.20168067226890757, 'f1': 0.23880597014925373, 'number': 119} | {'precision': 0.4723435225618632, 'recall': 0.6093896713615023, 'f1': 0.5321853218532185, 'number': 1065} | 0.4050 | 0.5479 | 0.4658 | 0.5885 |
0.7758 | 9.0 | 90 | 1.0917 | {'precision': 0.3506916192026037, 'recall': 0.5327564894932015, 'f1': 0.4229636898920511, 'number': 809} | {'precision': 0.3076923076923077, 'recall': 0.23529411764705882, 'f1': 0.26666666666666666, 'number': 119} | {'precision': 0.4916286149162861, 'recall': 0.6065727699530516, 'f1': 0.5430853299705759, 'number': 1065} | 0.4195 | 0.5544 | 0.4776 | 0.5892 |
0.7737 | 10.0 | 100 | 1.1005 | {'precision': 0.36325503355704697, 'recall': 0.5352286773794809, 'f1': 0.43278360819590206, 'number': 809} | {'precision': 0.3902439024390244, 'recall': 0.2689075630252101, 'f1': 0.31840796019900497, 'number': 119} | {'precision': 0.5075456711675933, 'recall': 0.6, 'f1': 0.5499139414802064, 'number': 1065} | 0.4358 | 0.5539 | 0.4878 | 0.5934 |
0.6942 | 11.0 | 110 | 1.0974 | {'precision': 0.3707136237256719, 'recall': 0.49443757725587145, 'f1': 0.423728813559322, 'number': 809} | {'precision': 0.34, 'recall': 0.2857142857142857, 'f1': 0.31050228310502287, 'number': 119} | {'precision': 0.5255775577557755, 'recall': 0.5981220657276995, 'f1': 0.559508124725516, 'number': 1065} | 0.4479 | 0.5374 | 0.4886 | 0.6107 |
0.691 | 12.0 | 120 | 1.0991 | {'precision': 0.381950774840474, 'recall': 0.5179233621755254, 'f1': 0.43966421825813223, 'number': 809} | {'precision': 0.36666666666666664, 'recall': 0.2773109243697479, 'f1': 0.31578947368421056, 'number': 119} | {'precision': 0.5208825847123719, 'recall': 0.6206572769953052, 'f1': 0.5664095972579263, 'number': 1065} | 0.4532 | 0.5585 | 0.5003 | 0.6116 |
0.6595 | 13.0 | 130 | 1.1179 | {'precision': 0.3776223776223776, 'recall': 0.5339925834363412, 'f1': 0.44239631336405527, 'number': 809} | {'precision': 0.3563218390804598, 'recall': 0.2605042016806723, 'f1': 0.30097087378640774, 'number': 119} | {'precision': 0.530562347188264, 'recall': 0.6112676056338028, 'f1': 0.5680628272251308, 'number': 1065} | 0.4532 | 0.5590 | 0.5006 | 0.6010 |
0.6288 | 14.0 | 140 | 1.1441 | {'precision': 0.3689075630252101, 'recall': 0.5426452410383189, 'f1': 0.4392196098049025, 'number': 809} | {'precision': 0.3595505617977528, 'recall': 0.2689075630252101, 'f1': 0.3076923076923077, 'number': 119} | {'precision': 0.54614733276884, 'recall': 0.6056338028169014, 'f1': 0.5743544078361531, 'number': 1065} | 0.4537 | 0.5600 | 0.5012 | 0.5913 |
0.6245 | 15.0 | 150 | 1.1237 | {'precision': 0.38014311270125223, 'recall': 0.5253399258343634, 'f1': 0.44110015568240785, 'number': 809} | {'precision': 0.32608695652173914, 'recall': 0.25210084033613445, 'f1': 0.2843601895734597, 'number': 119} | {'precision': 0.5316760224538893, 'recall': 0.6225352112676056, 'f1': 0.5735294117647058, 'number': 1065} | 0.4550 | 0.5610 | 0.5025 | 0.6009 |
Framework versions
- Transformers 4.38.2
- Pytorch 2.2.1+cu121
- Datasets 2.18.0
- Tokenizers 0.15.2