<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->
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: 0.6510
- Answer: {'precision': 0.7025527192008879, 'recall': 0.7824474660074165, 'f1': 0.7403508771929823, 'number': 809}
- Header: {'precision': 0.28421052631578947, 'recall': 0.226890756302521, 'f1': 0.25233644859813087, 'number': 119}
- Question: {'precision': 0.7480916030534351, 'recall': 0.828169014084507, 'f1': 0.7860962566844921, 'number': 1065}
- Overall Precision: 0.7090
- Overall Recall: 0.7737
- Overall F1: 0.7399
- Overall Accuracy: 0.8032
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: 10
Training results
Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
---|---|---|---|---|---|---|---|---|---|---|
1.7428 | 1.0 | 10 | 1.5458 | {'precision': 0.030690537084398978, 'recall': 0.04449938195302843, 'f1': 0.036326942482341064, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.18740157480314962, 'recall': 0.22347417840375586, 'f1': 0.2038543897216274, 'number': 1065} | 0.1122 | 0.1375 | 0.1235 | 0.4326 |
1.3991 | 2.0 | 20 | 1.2229 | {'precision': 0.1326676176890157, 'recall': 0.11495673671199011, 'f1': 0.12317880794701987, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5, 'recall': 0.5352112676056338, 'f1': 0.5170068027210885, 'number': 1065} | 0.3597 | 0.3327 | 0.3457 | 0.5731 |
1.0911 | 3.0 | 30 | 0.9391 | {'precision': 0.47231638418079097, 'recall': 0.5166872682323856, 'f1': 0.4935064935064935, 'number': 809} | {'precision': 0.058823529411764705, 'recall': 0.01680672268907563, 'f1': 0.026143790849673203, 'number': 119} | {'precision': 0.6528268551236749, 'recall': 0.6938967136150235, 'f1': 0.6727355484751935, 'number': 1065} | 0.5651 | 0.5815 | 0.5732 | 0.7183 |
0.8461 | 4.0 | 40 | 0.7784 | {'precision': 0.6047717842323651, 'recall': 0.7206427688504327, 'f1': 0.6576424139875917, 'number': 809} | {'precision': 0.15384615384615385, 'recall': 0.06722689075630252, 'f1': 0.0935672514619883, 'number': 119} | {'precision': 0.6666666666666666, 'recall': 0.7455399061032864, 'f1': 0.7039007092198581, 'number': 1065} | 0.6275 | 0.6949 | 0.6595 | 0.7638 |
0.6966 | 5.0 | 50 | 0.7307 | {'precision': 0.6315228966986155, 'recall': 0.7330037082818294, 'f1': 0.6784897025171623, 'number': 809} | {'precision': 0.21052631578947367, 'recall': 0.13445378151260504, 'f1': 0.1641025641025641, 'number': 119} | {'precision': 0.6925064599483204, 'recall': 0.7549295774647887, 'f1': 0.7223719676549865, 'number': 1065} | 0.6494 | 0.7090 | 0.6779 | 0.7703 |
0.6037 | 6.0 | 60 | 0.6834 | {'precision': 0.657922350472193, 'recall': 0.7750309023485785, 'f1': 0.7116912599318955, 'number': 809} | {'precision': 0.3150684931506849, 'recall': 0.19327731092436976, 'f1': 0.23958333333333334, 'number': 119} | {'precision': 0.7021103896103896, 'recall': 0.812206572769953, 'f1': 0.7531562908141053, 'number': 1065} | 0.6709 | 0.7602 | 0.7128 | 0.7915 |
0.5421 | 7.0 | 70 | 0.6692 | {'precision': 0.671306209850107, 'recall': 0.7750309023485785, 'f1': 0.7194492254733217, 'number': 809} | {'precision': 0.2823529411764706, 'recall': 0.20168067226890757, 'f1': 0.23529411764705882, 'number': 119} | {'precision': 0.7227467811158799, 'recall': 0.7906103286384977, 'f1': 0.7551569506726458, 'number': 1065} | 0.6836 | 0.7491 | 0.7149 | 0.7931 |
0.5085 | 8.0 | 80 | 0.6549 | {'precision': 0.6901874310915105, 'recall': 0.7737948084054388, 'f1': 0.7296037296037297, 'number': 809} | {'precision': 0.3023255813953488, 'recall': 0.2184873949579832, 'f1': 0.25365853658536586, 'number': 119} | {'precision': 0.7408637873754153, 'recall': 0.8375586854460094, 'f1': 0.7862494490965183, 'number': 1065} | 0.7028 | 0.7747 | 0.7370 | 0.7982 |
0.4692 | 9.0 | 90 | 0.6517 | {'precision': 0.6973684210526315, 'recall': 0.7861557478368356, 'f1': 0.7391051714119697, 'number': 809} | {'precision': 0.2903225806451613, 'recall': 0.226890756302521, 'f1': 0.25471698113207547, 'number': 119} | {'precision': 0.7534364261168385, 'recall': 0.8234741784037559, 'f1': 0.7868999551368328, 'number': 1065} | 0.7100 | 0.7727 | 0.7400 | 0.8025 |
0.4538 | 10.0 | 100 | 0.6510 | {'precision': 0.7025527192008879, 'recall': 0.7824474660074165, 'f1': 0.7403508771929823, 'number': 809} | {'precision': 0.28421052631578947, 'recall': 0.226890756302521, 'f1': 0.25233644859813087, 'number': 119} | {'precision': 0.7480916030534351, 'recall': 0.828169014084507, 'f1': 0.7860962566844921, 'number': 1065} | 0.7090 | 0.7737 | 0.7399 | 0.8032 |
Framework versions
- Transformers 4.31.0
- Pytorch 2.0.1+cu118
- Datasets 2.14.2
- Tokenizers 0.13.3