Edit model card

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.2144
  • Answer: {'precision': 0.46146146146146144, 'recall': 0.5698393077873919, 'f1': 0.5099557522123893, 'number': 809}
  • Header: {'precision': 0.4024390243902439, 'recall': 0.2773109243697479, 'f1': 0.3283582089552239, 'number': 119}
  • Question: {'precision': 0.5888412017167381, 'recall': 0.644131455399061, 'f1': 0.6152466367713004, 'number': 1065}
  • Overall Precision: 0.5254
  • Overall Recall: 0.5921
  • Overall F1: 0.5567
  • Overall Accuracy: 0.6483

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: 4
  • eval_batch_size: 2
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 15

Training results

Training Loss Epoch Step Validation Loss Answer Header Question Overall Precision Overall Recall Overall F1 Overall Accuracy
1.5615 1.0 38 1.2309 {'precision': 0.23910171730515192, 'recall': 0.44746600741656367, 'f1': 0.311665949203616, 'number': 809} {'precision': 0.2830188679245283, 'recall': 0.12605042016806722, 'f1': 0.1744186046511628, 'number': 119} {'precision': 0.35969209237228833, 'recall': 0.48262910798122066, 'f1': 0.4121892542101042, 'number': 1065} 0.2974 0.4471 0.3572 0.4649
1.1729 2.0 76 1.0880 {'precision': 0.3109656301145663, 'recall': 0.46971569839307786, 'f1': 0.37419990152634175, 'number': 809} {'precision': 0.423728813559322, 'recall': 0.21008403361344538, 'f1': 0.2808988764044944, 'number': 119} {'precision': 0.507488986784141, 'recall': 0.5408450704225352, 'f1': 0.5236363636363637, 'number': 1065} 0.4060 0.4922 0.4450 0.5557
1.0126 3.0 114 1.0622 {'precision': 0.31921110299488675, 'recall': 0.5401730531520396, 'f1': 0.40128558310376494, 'number': 809} {'precision': 0.38372093023255816, 'recall': 0.2773109243697479, 'f1': 0.32195121951219513, 'number': 119} {'precision': 0.4930662557781202, 'recall': 0.6009389671361502, 'f1': 0.5416842996191282, 'number': 1065} 0.4032 0.5569 0.4678 0.5662
0.9042 4.0 152 1.0144 {'precision': 0.3859060402684564, 'recall': 0.5686032138442522, 'f1': 0.45977011494252873, 'number': 809} {'precision': 0.312, 'recall': 0.3277310924369748, 'f1': 0.31967213114754095, 'number': 119} {'precision': 0.542713567839196, 'recall': 0.6084507042253521, 'f1': 0.5737051792828685, 'number': 1065} 0.4568 0.5755 0.5093 0.6204
0.7609 5.0 190 1.0307 {'precision': 0.41357466063348414, 'recall': 0.5648949320148331, 'f1': 0.47753396029258094, 'number': 809} {'precision': 0.3373493975903614, 'recall': 0.23529411764705882, 'f1': 0.2772277227722772, 'number': 119} {'precision': 0.5755711775043937, 'recall': 0.6150234741784038, 'f1': 0.5946436677258284, 'number': 1065} 0.4901 0.5720 0.5279 0.6340
0.6792 6.0 228 1.0643 {'precision': 0.43541102077687444, 'recall': 0.595797280593325, 'f1': 0.5031315240083507, 'number': 809} {'precision': 0.4142857142857143, 'recall': 0.24369747899159663, 'f1': 0.3068783068783069, 'number': 119} {'precision': 0.5757575757575758, 'recall': 0.6065727699530516, 'f1': 0.5907636031092821, 'number': 1065} 0.5033 0.5805 0.5391 0.6180
0.6081 7.0 266 1.0222 {'precision': 0.4691780821917808, 'recall': 0.5080346106304079, 'f1': 0.4878338278931751, 'number': 809} {'precision': 0.26618705035971224, 'recall': 0.31092436974789917, 'f1': 0.2868217054263566, 'number': 119} {'precision': 0.5478056426332288, 'recall': 0.6563380281690141, 'f1': 0.5971806920119608, 'number': 1065} 0.5007 0.5755 0.5355 0.6424
0.5218 8.0 304 1.0641 {'precision': 0.42940038684719534, 'recall': 0.5488257107540173, 'f1': 0.481823114487249, 'number': 809} {'precision': 0.3409090909090909, 'recall': 0.25210084033613445, 'f1': 0.2898550724637681, 'number': 119} {'precision': 0.5291512915129152, 'recall': 0.6732394366197183, 'f1': 0.5925619834710744, 'number': 1065} 0.4808 0.5976 0.5329 0.6167
0.468 9.0 342 1.1145 {'precision': 0.4584942084942085, 'recall': 0.5871446229913473, 'f1': 0.5149051490514905, 'number': 809} {'precision': 0.3924050632911392, 'recall': 0.2605042016806723, 'f1': 0.31313131313131315, 'number': 119} {'precision': 0.5921501706484642, 'recall': 0.6516431924882629, 'f1': 0.6204738489047832, 'number': 1065} 0.5247 0.6021 0.5607 0.6527
0.4159 10.0 380 1.1606 {'precision': 0.4683281412253375, 'recall': 0.5574783683559951, 'f1': 0.5090293453724605, 'number': 809} {'precision': 0.367816091954023, 'recall': 0.2689075630252101, 'f1': 0.31067961165048547, 'number': 119} {'precision': 0.5958369470945359, 'recall': 0.6450704225352113, 'f1': 0.6194770063119928, 'number': 1065} 0.5311 0.5871 0.5577 0.6521
0.3764 11.0 418 1.2370 {'precision': 0.4515828677839851, 'recall': 0.5995055624227441, 'f1': 0.5151354221986192, 'number': 809} {'precision': 0.3888888888888889, 'recall': 0.29411764705882354, 'f1': 0.3349282296650718, 'number': 119} {'precision': 0.6041083099906629, 'recall': 0.6075117370892019, 'f1': 0.6058052434456929, 'number': 1065} 0.5221 0.5855 0.5520 0.6248
0.3393 12.0 456 1.2263 {'precision': 0.46161515453639085, 'recall': 0.5723114956736712, 'f1': 0.5110375275938189, 'number': 809} {'precision': 0.35135135135135137, 'recall': 0.2184873949579832, 'f1': 0.26943005181347146, 'number': 119} {'precision': 0.5891132572431957, 'recall': 0.6300469483568075, 'f1': 0.6088929219600726, 'number': 1065} 0.5235 0.5820 0.5512 0.6369
0.3253 13.0 494 1.2059 {'precision': 0.4658590308370044, 'recall': 0.522867737948084, 'f1': 0.49271986022131625, 'number': 809} {'precision': 0.3402061855670103, 'recall': 0.2773109243697479, 'f1': 0.3055555555555556, 'number': 119} {'precision': 0.5623028391167192, 'recall': 0.6694835680751173, 'f1': 0.6112301757393913, 'number': 1065} 0.5143 0.5866 0.5481 0.6376
0.2996 14.0 532 1.2311 {'precision': 0.46296296296296297, 'recall': 0.5871446229913473, 'f1': 0.5177111716621253, 'number': 809} {'precision': 0.3263157894736842, 'recall': 0.2605042016806723, 'f1': 0.2897196261682243, 'number': 119} {'precision': 0.5991189427312775, 'recall': 0.6384976525821596, 'f1': 0.6181818181818182, 'number': 1065} 0.5257 0.5951 0.5582 0.6350
0.2892 15.0 570 1.2144 {'precision': 0.46146146146146144, 'recall': 0.5698393077873919, 'f1': 0.5099557522123893, 'number': 809} {'precision': 0.4024390243902439, 'recall': 0.2773109243697479, 'f1': 0.3283582089552239, 'number': 119} {'precision': 0.5888412017167381, 'recall': 0.644131455399061, 'f1': 0.6152466367713004, 'number': 1065} 0.5254 0.5921 0.5567 0.6483

Framework versions

  • Transformers 4.38.2
  • Pytorch 2.2.1
  • Datasets 2.18.0
  • Tokenizers 0.15.2
Downloads last month
3
Safetensors
Model size
113M params
Tensor type
F32
·
Inference Examples
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.

Model tree for magus4450/layoutlm-funsd

Finetuned
(136)
this model