layoutlm-finetuned-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.6806
- Answer: {'precision': 0.7069154774972558, 'recall': 0.796044499381953, 'f1': 0.7488372093023256, 'number': 809}
- Header: {'precision': 0.36752136752136755, 'recall': 0.36134453781512604, 'f1': 0.3644067796610169, 'number': 119}
- Question: {'precision': 0.7866549604916594, 'recall': 0.8413145539906103, 'f1': 0.8130671506352087, 'number': 1065}
- Overall Precision: 0.7305
- Overall Recall: 0.7943
- Overall F1: 0.7611
- Overall Accuracy: 0.8085
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.8023 | 1.0 | 10 | 1.6152 | {'precision': 0.009448818897637795, 'recall': 0.007416563658838072, 'f1': 0.008310249307479225, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.12998266897746968, 'recall': 0.07042253521126761, 'f1': 0.09135200974421437, 'number': 1065} | 0.0668 | 0.0406 | 0.0505 | 0.3276 |
1.4614 | 2.0 | 20 | 1.2547 | {'precision': 0.2211253701875617, 'recall': 0.276885043263288, 'f1': 0.24588364434687154, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.43353028064992616, 'recall': 0.5511737089201878, 'f1': 0.4853245142620918, 'number': 1065} | 0.3420 | 0.4069 | 0.3717 | 0.5926 |
1.0795 | 3.0 | 30 | 0.9150 | {'precision': 0.49837486457204766, 'recall': 0.5686032138442522, 'f1': 0.5311778290993071, 'number': 809} | {'precision': 0.04081632653061224, 'recall': 0.01680672268907563, 'f1': 0.023809523809523808, 'number': 119} | {'precision': 0.5953338696701529, 'recall': 0.6948356807511737, 'f1': 0.6412478336221837, 'number': 1065} | 0.5427 | 0.6031 | 0.5713 | 0.7145 |
0.8025 | 4.0 | 40 | 0.7686 | {'precision': 0.6056622851365016, 'recall': 0.7404202719406675, 'f1': 0.6662958843159066, 'number': 809} | {'precision': 0.10975609756097561, 'recall': 0.07563025210084033, 'f1': 0.08955223880597014, 'number': 119} | {'precision': 0.6737400530503979, 'recall': 0.7154929577464789, 'f1': 0.6939890710382515, 'number': 1065} | 0.6222 | 0.6874 | 0.6532 | 0.7506 |
0.6638 | 5.0 | 50 | 0.7034 | {'precision': 0.644535240040858, 'recall': 0.7799752781211372, 'f1': 0.7058165548098434, 'number': 809} | {'precision': 0.23711340206185566, 'recall': 0.19327731092436976, 'f1': 0.21296296296296294, 'number': 119} | {'precision': 0.7158992180712423, 'recall': 0.7737089201877935, 'f1': 0.7436823104693141, 'number': 1065} | 0.6637 | 0.7416 | 0.7005 | 0.7841 |
0.5567 | 6.0 | 60 | 0.6784 | {'precision': 0.6687435098650052, 'recall': 0.796044499381953, 'f1': 0.7268623024830699, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.2184873949579832, 'f1': 0.24761904761904763, 'number': 119} | {'precision': 0.7160392798690671, 'recall': 0.8215962441314554, 'f1': 0.765194578049847, 'number': 1065} | 0.6788 | 0.7752 | 0.7238 | 0.7903 |
0.4925 | 7.0 | 70 | 0.6815 | {'precision': 0.6839779005524862, 'recall': 0.765142150803461, 'f1': 0.7222870478413069, 'number': 809} | {'precision': 0.2894736842105263, 'recall': 0.2773109243697479, 'f1': 0.2832618025751073, 'number': 119} | {'precision': 0.7233169129720853, 'recall': 0.8272300469483568, 'f1': 0.7717915024091108, 'number': 1065} | 0.6853 | 0.7692 | 0.7248 | 0.7913 |
0.4494 | 8.0 | 80 | 0.6765 | {'precision': 0.6962305986696231, 'recall': 0.7762669962917181, 'f1': 0.734073641145529, 'number': 809} | {'precision': 0.28, 'recall': 0.29411764705882354, 'f1': 0.28688524590163933, 'number': 119} | {'precision': 0.7360066833751044, 'recall': 0.8272300469483568, 'f1': 0.7789566755083996, 'number': 1065} | 0.6942 | 0.7747 | 0.7323 | 0.8004 |
0.3986 | 9.0 | 90 | 0.6587 | {'precision': 0.7077777777777777, 'recall': 0.7873918417799752, 'f1': 0.7454651843183148, 'number': 809} | {'precision': 0.3274336283185841, 'recall': 0.31092436974789917, 'f1': 0.3189655172413793, 'number': 119} | {'precision': 0.7487266553480475, 'recall': 0.828169014084507, 'f1': 0.7864467231386535, 'number': 1065} | 0.7102 | 0.7807 | 0.7438 | 0.8019 |
0.3597 | 10.0 | 100 | 0.6607 | {'precision': 0.7054945054945055, 'recall': 0.7935723114956736, 'f1': 0.7469458987783596, 'number': 809} | {'precision': 0.3305084745762712, 'recall': 0.3277310924369748, 'f1': 0.32911392405063294, 'number': 119} | {'precision': 0.7600685518423308, 'recall': 0.8328638497652582, 'f1': 0.7948028673835125, 'number': 1065} | 0.7144 | 0.7868 | 0.7488 | 0.8048 |
0.3266 | 11.0 | 110 | 0.6751 | {'precision': 0.7050279329608938, 'recall': 0.7799752781211372, 'f1': 0.7406103286384977, 'number': 809} | {'precision': 0.3684210526315789, 'recall': 0.35294117647058826, 'f1': 0.3605150214592275, 'number': 119} | {'precision': 0.7711571675302246, 'recall': 0.8384976525821596, 'f1': 0.8034188034188035, 'number': 1065} | 0.7227 | 0.7858 | 0.7529 | 0.8056 |
0.3103 | 12.0 | 120 | 0.6799 | {'precision': 0.7047413793103449, 'recall': 0.8084054388133498, 'f1': 0.7530224525043179, 'number': 809} | {'precision': 0.3474576271186441, 'recall': 0.3445378151260504, 'f1': 0.3459915611814346, 'number': 119} | {'precision': 0.7799295774647887, 'recall': 0.831924882629108, 'f1': 0.8050885960926851, 'number': 1065} | 0.7246 | 0.7933 | 0.7574 | 0.8034 |
0.2893 | 13.0 | 130 | 0.6773 | {'precision': 0.7191392978482446, 'recall': 0.7849196538936959, 'f1': 0.7505910165484633, 'number': 809} | {'precision': 0.35833333333333334, 'recall': 0.36134453781512604, 'f1': 0.35983263598326365, 'number': 119} | {'precision': 0.7861524978089395, 'recall': 0.8422535211267606, 'f1': 0.8132366273798729, 'number': 1065} | 0.7346 | 0.7903 | 0.7614 | 0.8050 |
0.2743 | 14.0 | 140 | 0.6788 | {'precision': 0.7063318777292577, 'recall': 0.799752781211372, 'f1': 0.750144927536232, 'number': 809} | {'precision': 0.37168141592920356, 'recall': 0.35294117647058826, 'f1': 0.36206896551724144, 'number': 119} | {'precision': 0.7879858657243817, 'recall': 0.8375586854460094, 'f1': 0.812016385980883, 'number': 1065} | 0.7316 | 0.7933 | 0.7612 | 0.8085 |
0.2756 | 15.0 | 150 | 0.6806 | {'precision': 0.7069154774972558, 'recall': 0.796044499381953, 'f1': 0.7488372093023256, 'number': 809} | {'precision': 0.36752136752136755, 'recall': 0.36134453781512604, 'f1': 0.3644067796610169, 'number': 119} | {'precision': 0.7866549604916594, 'recall': 0.8413145539906103, 'f1': 0.8130671506352087, 'number': 1065} | 0.7305 | 0.7943 | 0.7611 | 0.8085 |
Framework versions
- Transformers 4.25.1
- Pytorch 1.13.1+cu116
- Datasets 2.8.0
- Tokenizers 0.13.2
- Downloads last month
- 9
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.