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.6735
  • Answer: {'precision': 0.7215601300108342, 'recall': 0.823238566131026, 'f1': 0.76905311778291, 'number': 809}
  • Header: {'precision': 0.3046875, 'recall': 0.3277310924369748, 'f1': 0.31578947368421056, 'number': 119}
  • Question: {'precision': 0.7800175284837861, 'recall': 0.8356807511737089, 'f1': 0.8068902991840435, 'number': 1065}
  • Overall Precision: 0.7276
  • Overall Recall: 0.8003
  • Overall F1: 0.7622
  • Overall Accuracy: 0.8080

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

Training results

Training Loss Epoch Step Validation Loss Answer Header Question Overall Precision Overall Recall Overall F1 Overall Accuracy
1.7753 1.0 10 1.5651 {'precision': 0.01791713325867861, 'recall': 0.019777503090234856, 'f1': 0.018801410105757928, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.253315649867374, 'recall': 0.17934272300469484, 'f1': 0.21000549752611322, 'number': 1065} 0.1257 0.1039 0.1137 0.3966
1.4505 2.0 20 1.2385 {'precision': 0.2100456621004566, 'recall': 0.22744128553770088, 'f1': 0.21839762611275965, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.46676197283774123, 'recall': 0.6131455399061033, 'f1': 0.5300324675324676, 'number': 1065} 0.3657 0.4200 0.3909 0.6293
1.0869 3.0 30 0.8993 {'precision': 0.5091496232508074, 'recall': 0.584672435105068, 'f1': 0.5443037974683544, 'number': 809} {'precision': 0.046511627906976744, 'recall': 0.01680672268907563, 'f1': 0.02469135802469136, 'number': 119} {'precision': 0.5931254996003198, 'recall': 0.6967136150234742, 'f1': 0.6407599309153713, 'number': 1065} 0.5475 0.6106 0.5773 0.7210
0.8144 4.0 40 0.7685 {'precision': 0.5755755755755756, 'recall': 0.7107540173053152, 'f1': 0.6360619469026548, 'number': 809} {'precision': 0.15625, 'recall': 0.08403361344537816, 'f1': 0.10928961748633881, 'number': 119} {'precision': 0.6641350210970464, 'recall': 0.7389671361502348, 'f1': 0.6995555555555556, 'number': 1065} 0.6103 0.6884 0.6470 0.7562
0.6642 5.0 50 0.6960 {'precision': 0.6472424557752341, 'recall': 0.7688504326328801, 'f1': 0.7028248587570621, 'number': 809} {'precision': 0.19607843137254902, 'recall': 0.16806722689075632, 'f1': 0.18099547511312217, 'number': 119} {'precision': 0.6795201371036846, 'recall': 0.7446009389671362, 'f1': 0.7105734767025091, 'number': 1065} 0.6435 0.7200 0.6796 0.7773
0.5578 6.0 60 0.6555 {'precision': 0.6557377049180327, 'recall': 0.7911001236093943, 'f1': 0.7170868347338936, 'number': 809} {'precision': 0.19327731092436976, 'recall': 0.19327731092436976, 'f1': 0.19327731092436978, 'number': 119} {'precision': 0.7009038619556286, 'recall': 0.8009389671361502, 'f1': 0.7475898334794041, 'number': 1065} 0.6557 0.7607 0.7043 0.7920
0.484 7.0 70 0.6448 {'precision': 0.6560574948665298, 'recall': 0.7898640296662547, 'f1': 0.7167694896242288, 'number': 809} {'precision': 0.24509803921568626, 'recall': 0.21008403361344538, 'f1': 0.22624434389140272, 'number': 119} {'precision': 0.7357859531772575, 'recall': 0.8262910798122066, 'f1': 0.7784166298098186, 'number': 1065} 0.6796 0.7747 0.7240 0.8003
0.4248 8.0 80 0.6501 {'precision': 0.6865828092243187, 'recall': 0.8096415327564895, 'f1': 0.7430516165626773, 'number': 809} {'precision': 0.23972602739726026, 'recall': 0.29411764705882354, 'f1': 0.2641509433962264, 'number': 119} {'precision': 0.7493403693931399, 'recall': 0.8, 'f1': 0.7738419618528609, 'number': 1065} 0.6893 0.7737 0.7291 0.7993
0.3833 9.0 90 0.6427 {'precision': 0.7062706270627063, 'recall': 0.7935723114956736, 'f1': 0.7473806752037252, 'number': 809} {'precision': 0.2777777777777778, 'recall': 0.29411764705882354, 'f1': 0.28571428571428575, 'number': 119} {'precision': 0.7600685518423308, 'recall': 0.8328638497652582, 'f1': 0.7948028673835125, 'number': 1065} 0.7103 0.7847 0.7456 0.8069
0.3435 10.0 100 0.6499 {'precision': 0.7076271186440678, 'recall': 0.8257107540173053, 'f1': 0.7621220764403879, 'number': 809} {'precision': 0.3217391304347826, 'recall': 0.31092436974789917, 'f1': 0.3162393162393162, 'number': 119} {'precision': 0.7789566755083996, 'recall': 0.8272300469483568, 'f1': 0.802367941712204, 'number': 1065} 0.7242 0.7958 0.7583 0.8088
0.3157 11.0 110 0.6661 {'precision': 0.7183406113537117, 'recall': 0.8133498145859085, 'f1': 0.7628985507246376, 'number': 809} {'precision': 0.32231404958677684, 'recall': 0.3277310924369748, 'f1': 0.32499999999999996, 'number': 119} {'precision': 0.7774846086191732, 'recall': 0.8300469483568075, 'f1': 0.8029064486830154, 'number': 1065} 0.7272 0.7933 0.7588 0.8052
0.2921 12.0 120 0.6645 {'precision': 0.7142857142857143, 'recall': 0.8281829419035847, 'f1': 0.767029192902118, 'number': 809} {'precision': 0.30158730158730157, 'recall': 0.31932773109243695, 'f1': 0.310204081632653, 'number': 119} {'precision': 0.7777777777777778, 'recall': 0.8347417840375587, 'f1': 0.8052536231884059, 'number': 1065} 0.7236 0.8013 0.7605 0.8075
0.2805 13.0 130 0.6742 {'precision': 0.7270742358078602, 'recall': 0.823238566131026, 'f1': 0.7721739130434783, 'number': 809} {'precision': 0.29850746268656714, 'recall': 0.33613445378151263, 'f1': 0.31620553359683795, 'number': 119} {'precision': 0.7802101576182137, 'recall': 0.8366197183098592, 'f1': 0.8074309016764839, 'number': 1065} 0.7286 0.8013 0.7632 0.8074
0.2676 14.0 140 0.6739 {'precision': 0.720173535791757, 'recall': 0.8207663782447466, 'f1': 0.7671865973425764, 'number': 809} {'precision': 0.2932330827067669, 'recall': 0.3277310924369748, 'f1': 0.30952380952380953, 'number': 119} {'precision': 0.7730434782608696, 'recall': 0.8347417840375587, 'f1': 0.8027088036117382, 'number': 1065} 0.7220 0.7988 0.7585 0.8066
0.2731 15.0 150 0.6735 {'precision': 0.7215601300108342, 'recall': 0.823238566131026, 'f1': 0.76905311778291, 'number': 809} {'precision': 0.3046875, 'recall': 0.3277310924369748, 'f1': 0.31578947368421056, 'number': 119} {'precision': 0.7800175284837861, 'recall': 0.8356807511737089, 'f1': 0.8068902991840435, 'number': 1065} 0.7276 0.8003 0.7622 0.8080

Framework versions

  • Transformers 4.33.0.dev0
  • Pytorch 2.0.1+cpu
  • Datasets 2.14.4
  • Tokenizers 0.13.3
Downloads last month
24
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 AndreasPiper/layoutlm-funsd

Finetuned
(143)
this model