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: 0.6859
- Answer: {'precision': 0.7175572519083969, 'recall': 0.8133498145859085, 'f1': 0.7624565469293164, 'number': 809}
- Header: {'precision': 0.29411764705882354, 'recall': 0.33613445378151263, 'f1': 0.3137254901960785, 'number': 119}
- Question: {'precision': 0.7724867724867724, 'recall': 0.8225352112676056, 'f1': 0.7967257844474761, 'number': 1065}
- Overall Precision: 0.7197
- Overall Recall: 0.7898
- Overall F1: 0.7531
- Overall Accuracy: 0.8101
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.8268 | 1.0 | 10 | 1.5857 | {'precision': 0.015523932729624839, 'recall': 0.014833127317676144, 'f1': 0.015170670037926676, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.17011834319526628, 'recall': 0.107981220657277, 'f1': 0.1321079839172889, 'number': 1065} | 0.0876 | 0.0637 | 0.0738 | 0.3586 |
1.4514 | 2.0 | 20 | 1.2482 | {'precision': 0.28865979381443296, 'recall': 0.311495673671199, 'f1': 0.29964328180737215, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.38357142857142856, 'recall': 0.504225352112676, 'f1': 0.43569979716024343, 'number': 1065} | 0.3471 | 0.3959 | 0.3699 | 0.5859 |
1.1188 | 3.0 | 30 | 0.9477 | {'precision': 0.5157232704402516, 'recall': 0.6081582200247219, 'f1': 0.5581395348837209, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5390879478827362, 'recall': 0.6215962441314554, 'f1': 0.5774095071958134, 'number': 1065} | 0.5215 | 0.5790 | 0.5487 | 0.7076 |
0.8437 | 4.0 | 40 | 0.7798 | {'precision': 0.5986124876114965, 'recall': 0.7466007416563659, 'f1': 0.6644664466446645, 'number': 809} | {'precision': 0.1875, 'recall': 0.07563025210084033, 'f1': 0.10778443113772454, 'number': 119} | {'precision': 0.6486718080548415, 'recall': 0.7107981220657277, 'f1': 0.6783154121863798, 'number': 1065} | 0.6160 | 0.6874 | 0.6498 | 0.7580 |
0.6804 | 5.0 | 50 | 0.7073 | {'precision': 0.6413502109704642, 'recall': 0.7515451174289246, 'f1': 0.6920887877063175, 'number': 809} | {'precision': 0.3, 'recall': 0.17647058823529413, 'f1': 0.22222222222222224, 'number': 119} | {'precision': 0.6712662337662337, 'recall': 0.7765258215962442, 'f1': 0.7200696560731389, 'number': 1065} | 0.6471 | 0.7306 | 0.6863 | 0.7850 |
0.5726 | 6.0 | 60 | 0.6805 | {'precision': 0.643141153081511, 'recall': 0.799752781211372, 'f1': 0.7129476584022039, 'number': 809} | {'precision': 0.3142857142857143, 'recall': 0.18487394957983194, 'f1': 0.23280423280423282, 'number': 119} | {'precision': 0.709372312983663, 'recall': 0.7746478873239436, 'f1': 0.7405745062836624, 'number': 1065} | 0.6673 | 0.7496 | 0.7060 | 0.7854 |
0.5005 | 7.0 | 70 | 0.6536 | {'precision': 0.6701680672268907, 'recall': 0.788627935723115, 'f1': 0.7245883021010789, 'number': 809} | {'precision': 0.27450980392156865, 'recall': 0.23529411764705882, 'f1': 0.2533936651583711, 'number': 119} | {'precision': 0.743103448275862, 'recall': 0.8093896713615023, 'f1': 0.7748314606741572, 'number': 1065} | 0.6902 | 0.7667 | 0.7264 | 0.7982 |
0.444 | 8.0 | 80 | 0.6526 | {'precision': 0.6802935010482181, 'recall': 0.8022249690976514, 'f1': 0.7362450368689732, 'number': 809} | {'precision': 0.26956521739130435, 'recall': 0.2605042016806723, 'f1': 0.264957264957265, 'number': 119} | {'precision': 0.7400690846286702, 'recall': 0.8046948356807512, 'f1': 0.7710301394511921, 'number': 1065} | 0.6902 | 0.7712 | 0.7284 | 0.8022 |
0.3904 | 9.0 | 90 | 0.6549 | {'precision': 0.6905781584582441, 'recall': 0.7972805933250927, 'f1': 0.7401032702237521, 'number': 809} | {'precision': 0.26666666666666666, 'recall': 0.2689075630252101, 'f1': 0.26778242677824265, 'number': 119} | {'precision': 0.7554019014693172, 'recall': 0.8206572769953052, 'f1': 0.7866786678667866, 'number': 1065} | 0.7015 | 0.7782 | 0.7379 | 0.8073 |
0.3778 | 10.0 | 100 | 0.6593 | {'precision': 0.6996805111821086, 'recall': 0.8121137206427689, 'f1': 0.7517162471395881, 'number': 809} | {'precision': 0.3018867924528302, 'recall': 0.2689075630252101, 'f1': 0.28444444444444444, 'number': 119} | {'precision': 0.7707231040564374, 'recall': 0.8206572769953052, 'f1': 0.7949067758071852, 'number': 1065} | 0.7173 | 0.7842 | 0.7493 | 0.8096 |
0.3205 | 11.0 | 110 | 0.6673 | {'precision': 0.7185104052573932, 'recall': 0.8108776266996292, 'f1': 0.761904761904762, 'number': 809} | {'precision': 0.26277372262773724, 'recall': 0.3025210084033613, 'f1': 0.28125000000000006, 'number': 119} | {'precision': 0.7557643040136636, 'recall': 0.8309859154929577, 'f1': 0.7915921288014313, 'number': 1065} | 0.7100 | 0.7913 | 0.7485 | 0.8077 |
0.3107 | 12.0 | 120 | 0.6723 | {'precision': 0.7185104052573932, 'recall': 0.8108776266996292, 'f1': 0.761904761904762, 'number': 809} | {'precision': 0.2803030303030303, 'recall': 0.31092436974789917, 'f1': 0.29482071713147406, 'number': 119} | {'precision': 0.7740213523131673, 'recall': 0.8169014084507042, 'f1': 0.7948835084513477, 'number': 1065} | 0.7206 | 0.7842 | 0.7511 | 0.8102 |
0.2906 | 13.0 | 130 | 0.6774 | {'precision': 0.7175324675324676, 'recall': 0.8195302843016069, 'f1': 0.7651471436814773, 'number': 809} | {'precision': 0.2824427480916031, 'recall': 0.31092436974789917, 'f1': 0.29600000000000004, 'number': 119} | {'precision': 0.7678883071553229, 'recall': 0.8262910798122066, 'f1': 0.7960199004975125, 'number': 1065} | 0.7179 | 0.7928 | 0.7535 | 0.8111 |
0.2684 | 14.0 | 140 | 0.6829 | {'precision': 0.716304347826087, 'recall': 0.8145859085290482, 'f1': 0.7622903412377097, 'number': 809} | {'precision': 0.2900763358778626, 'recall': 0.31932773109243695, 'f1': 0.304, 'number': 119} | {'precision': 0.7742504409171076, 'recall': 0.8244131455399061, 'f1': 0.7985447930877672, 'number': 1065} | 0.7208 | 0.7903 | 0.7539 | 0.8115 |
0.2659 | 15.0 | 150 | 0.6859 | {'precision': 0.7175572519083969, 'recall': 0.8133498145859085, 'f1': 0.7624565469293164, 'number': 809} | {'precision': 0.29411764705882354, 'recall': 0.33613445378151263, 'f1': 0.3137254901960785, 'number': 119} | {'precision': 0.7724867724867724, 'recall': 0.8225352112676056, 'f1': 0.7967257844474761, 'number': 1065} | 0.7197 | 0.7898 | 0.7531 | 0.8101 |
Framework versions
- Transformers 4.40.1
- Pytorch 2.3.0+cu121
- Datasets 2.19.0
- Tokenizers 0.19.1