metadata
license: mit
base_model: microsoft/layoutlm-base-uncased
tags:
- generated_from_trainer
datasets:
- funsd
model-index:
- name: layoutlm-funsd1
results: []
layoutlm-funsd1
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: 0.6794
- Answer: {'precision': 0.7130242825607064, 'recall': 0.7985166872682324, 'f1': 0.7533527696793003, 'number': 809}
- Header: {'precision': 0.2907801418439716, 'recall': 0.3445378151260504, 'f1': 0.3153846153846154, 'number': 119}
- Question: {'precision': 0.773286467486819, 'recall': 0.8262910798122066, 'f1': 0.7989105764866091, 'number': 1065}
- Overall Precision: 0.7172
- Overall Recall: 0.7863
- Overall F1: 0.7501
- Overall Accuracy: 0.8053
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.8172 | 1.0 | 10 | 1.5984 | {'precision': 0.02287581699346405, 'recall': 0.0173053152039555, 'f1': 0.019704433497536946, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2019704433497537, 'recall': 0.11549295774647887, 'f1': 0.14695340501792115, 'number': 1065} | 0.1122 | 0.0687 | 0.0853 | 0.3383 |
1.4573 | 2.0 | 20 | 1.2552 | {'precision': 0.21509106678230702, 'recall': 0.3065512978986403, 'f1': 0.2528032619775739, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4427123928293063, 'recall': 0.5333333333333333, 'f1': 0.4838160136286201, 'number': 1065} | 0.3350 | 0.4094 | 0.3685 | 0.5671 |
1.1187 | 3.0 | 30 | 0.9227 | {'precision': 0.47129909365558914, 'recall': 0.5784919653893696, 'f1': 0.5194228634850167, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5402558314522197, 'recall': 0.6741784037558686, 'f1': 0.5998329156223893, 'number': 1065} | 0.5081 | 0.5951 | 0.5482 | 0.6953 |
0.8526 | 4.0 | 40 | 0.7688 | {'precision': 0.6256410256410256, 'recall': 0.754017305315204, 'f1': 0.6838565022421524, 'number': 809} | {'precision': 0.2564102564102564, 'recall': 0.08403361344537816, 'f1': 0.12658227848101264, 'number': 119} | {'precision': 0.6581125827814569, 'recall': 0.7464788732394366, 'f1': 0.6995160580730313, 'number': 1065} | 0.6368 | 0.7100 | 0.6714 | 0.7562 |
0.6873 | 5.0 | 50 | 0.6983 | {'precision': 0.6456776947705443, 'recall': 0.7478368355995055, 'f1': 0.693012600229095, 'number': 809} | {'precision': 0.22916666666666666, 'recall': 0.18487394957983194, 'f1': 0.2046511627906977, 'number': 119} | {'precision': 0.6671814671814672, 'recall': 0.8112676056338028, 'f1': 0.7322033898305085, 'number': 1065} | 0.6405 | 0.7481 | 0.6901 | 0.7729 |
0.5884 | 6.0 | 60 | 0.6816 | {'precision': 0.6539256198347108, 'recall': 0.7824474660074165, 'f1': 0.7124366910523354, 'number': 809} | {'precision': 0.273972602739726, 'recall': 0.16806722689075632, 'f1': 0.20833333333333331, 'number': 119} | {'precision': 0.7033613445378152, 'recall': 0.7859154929577464, 'f1': 0.7423503325942351, 'number': 1065} | 0.6679 | 0.7476 | 0.7055 | 0.7799 |
0.5091 | 7.0 | 70 | 0.6491 | {'precision': 0.6754478398314014, 'recall': 0.792336217552534, 'f1': 0.7292377701934016, 'number': 809} | {'precision': 0.256, 'recall': 0.2689075630252101, 'f1': 0.26229508196721313, 'number': 119} | {'precision': 0.7409326424870466, 'recall': 0.8056338028169014, 'f1': 0.7719298245614035, 'number': 1065} | 0.6859 | 0.7682 | 0.7247 | 0.7920 |
0.452 | 8.0 | 80 | 0.6574 | {'precision': 0.6897654584221748, 'recall': 0.799752781211372, 'f1': 0.7406983400114482, 'number': 809} | {'precision': 0.21705426356589147, 'recall': 0.23529411764705882, 'f1': 0.22580645161290322, 'number': 119} | {'precision': 0.7427597955706985, 'recall': 0.8187793427230047, 'f1': 0.7789191603394373, 'number': 1065} | 0.6903 | 0.7762 | 0.7308 | 0.7949 |
0.3956 | 9.0 | 90 | 0.6481 | {'precision': 0.6923890063424947, 'recall': 0.8096415327564895, 'f1': 0.7464387464387465, 'number': 809} | {'precision': 0.2748091603053435, 'recall': 0.3025210084033613, 'f1': 0.288, 'number': 119} | {'precision': 0.7578671328671329, 'recall': 0.8140845070422535, 'f1': 0.7849705749207787, 'number': 1065} | 0.7015 | 0.7817 | 0.7394 | 0.8006 |
0.377 | 10.0 | 100 | 0.6458 | {'precision': 0.7069716775599129, 'recall': 0.8022249690976514, 'f1': 0.751592356687898, 'number': 809} | {'precision': 0.30578512396694213, 'recall': 0.31092436974789917, 'f1': 0.30833333333333335, 'number': 119} | {'precision': 0.7688888888888888, 'recall': 0.812206572769953, 'f1': 0.7899543378995433, 'number': 1065} | 0.7167 | 0.7782 | 0.7462 | 0.8054 |
0.3216 | 11.0 | 110 | 0.6550 | {'precision': 0.7024972855591748, 'recall': 0.799752781211372, 'f1': 0.7479768786127167, 'number': 809} | {'precision': 0.2814814814814815, 'recall': 0.31932773109243695, 'f1': 0.2992125984251969, 'number': 119} | {'precision': 0.7577054794520548, 'recall': 0.8309859154929577, 'f1': 0.7926556202418271, 'number': 1065} | 0.7059 | 0.7878 | 0.7446 | 0.8031 |
0.3083 | 12.0 | 120 | 0.6539 | {'precision': 0.7086527929901424, 'recall': 0.799752781211372, 'f1': 0.751451800232288, 'number': 809} | {'precision': 0.29133858267716534, 'recall': 0.31092436974789917, 'f1': 0.3008130081300813, 'number': 119} | {'precision': 0.7714033539276258, 'recall': 0.8206572769953052, 'f1': 0.7952684258416743, 'number': 1065} | 0.7170 | 0.7817 | 0.7480 | 0.8066 |
0.2867 | 13.0 | 130 | 0.6673 | {'precision': 0.7047930283224401, 'recall': 0.799752781211372, 'f1': 0.7492762015055008, 'number': 809} | {'precision': 0.26666666666666666, 'recall': 0.3025210084033613, 'f1': 0.28346456692913385, 'number': 119} | {'precision': 0.7573402417962003, 'recall': 0.8234741784037559, 'f1': 0.7890238416554206, 'number': 1065} | 0.7056 | 0.7827 | 0.7422 | 0.8055 |
0.2718 | 14.0 | 140 | 0.6770 | {'precision': 0.7106430155210643, 'recall': 0.792336217552534, 'f1': 0.7492694330800702, 'number': 809} | {'precision': 0.3, 'recall': 0.35294117647058826, 'f1': 0.3243243243243243, 'number': 119} | {'precision': 0.7730870712401056, 'recall': 0.8253521126760563, 'f1': 0.798365122615804, 'number': 1065} | 0.7168 | 0.7837 | 0.7488 | 0.8053 |
0.2715 | 15.0 | 150 | 0.6794 | {'precision': 0.7130242825607064, 'recall': 0.7985166872682324, 'f1': 0.7533527696793003, 'number': 809} | {'precision': 0.2907801418439716, 'recall': 0.3445378151260504, 'f1': 0.3153846153846154, 'number': 119} | {'precision': 0.773286467486819, 'recall': 0.8262910798122066, 'f1': 0.7989105764866091, 'number': 1065} | 0.7172 | 0.7863 | 0.7501 | 0.8053 |
Framework versions
- Transformers 4.41.2
- Pytorch 2.3.1+cu121
- Datasets 2.19.2
- Tokenizers 0.19.1