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: 0.6820
  • Answer: {'precision': 0.7084257206208425, 'recall': 0.7898640296662547, 'f1': 0.7469316189362946, 'number': 809}
  • Header: {'precision': 0.2689655172413793, 'recall': 0.3277310924369748, 'f1': 0.2954545454545454, 'number': 119}
  • Question: {'precision': 0.7870619946091644, 'recall': 0.8225352112676056, 'f1': 0.8044077134986226, 'number': 1065}
  • Overall Precision: 0.7194
  • Overall Recall: 0.7797
  • Overall F1: 0.7484
  • Overall Accuracy: 0.8102

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.7857 1.0 10 1.5985 {'precision': 0.009248554913294798, 'recall': 0.009888751545117428, 'f1': 0.00955794504181601, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.1273972602739726, 'recall': 0.08732394366197183, 'f1': 0.10362116991643454, 'number': 1065} 0.0633 0.0507 0.0563 0.3562
1.4597 2.0 20 1.2331 {'precision': 0.18717683557394002, 'recall': 0.22373300370828184, 'f1': 0.20382882882882883, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.4439461883408072, 'recall': 0.5577464788732395, 'f1': 0.4943820224719101, 'number': 1065} 0.3362 0.3889 0.3606 0.6007
1.0902 3.0 30 0.9489 {'precision': 0.4371069182389937, 'recall': 0.515451174289246, 'f1': 0.47305728871242203, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.6257615317667538, 'recall': 0.6751173708920187, 'f1': 0.6495031616982836, 'number': 1065} 0.5311 0.5700 0.5499 0.6910
0.8339 4.0 40 0.7979 {'precision': 0.5977366255144033, 'recall': 0.7181705809641533, 'f1': 0.652442448062886, 'number': 809} {'precision': 0.13513513513513514, 'recall': 0.08403361344537816, 'f1': 0.10362694300518135, 'number': 119} {'precision': 0.6854545454545454, 'recall': 0.707981220657277, 'f1': 0.6965357967667436, 'number': 1065} 0.6267 0.6749 0.6499 0.7453
0.6983 5.0 50 0.7659 {'precision': 0.6392896781354052, 'recall': 0.7119901112484549, 'f1': 0.6736842105263159, 'number': 809} {'precision': 0.19626168224299065, 'recall': 0.17647058823529413, 'f1': 0.18584070796460178, 'number': 119} {'precision': 0.6688102893890675, 'recall': 0.7812206572769953, 'f1': 0.7206582936336077, 'number': 1065} 0.6345 0.7170 0.6733 0.7610
0.5815 6.0 60 0.6907 {'precision': 0.6410256410256411, 'recall': 0.7725587144622992, 'f1': 0.7006726457399104, 'number': 809} {'precision': 0.23863636363636365, 'recall': 0.17647058823529413, 'f1': 0.20289855072463767, 'number': 119} {'precision': 0.7027463651050081, 'recall': 0.8169014084507042, 'f1': 0.7555362570560139, 'number': 1065} 0.6588 0.7607 0.7061 0.7913
0.5044 7.0 70 0.6802 {'precision': 0.6727078891257996, 'recall': 0.7799752781211372, 'f1': 0.7223812249570692, 'number': 809} {'precision': 0.26605504587155965, 'recall': 0.24369747899159663, 'f1': 0.2543859649122807, 'number': 119} {'precision': 0.7305699481865285, 'recall': 0.7943661971830986, 'f1': 0.7611336032388665, 'number': 1065} 0.6830 0.7556 0.7175 0.7902
0.4534 8.0 80 0.6595 {'precision': 0.7018701870187019, 'recall': 0.788627935723115, 'f1': 0.7427240977881256, 'number': 809} {'precision': 0.234375, 'recall': 0.25210084033613445, 'f1': 0.242914979757085, 'number': 119} {'precision': 0.7378559463986599, 'recall': 0.8272300469483568, 'f1': 0.779991146525011, 'number': 1065} 0.6943 0.7772 0.7334 0.8074
0.3971 9.0 90 0.6625 {'precision': 0.6967032967032967, 'recall': 0.7836835599505563, 'f1': 0.7376381617219313, 'number': 809} {'precision': 0.27007299270072993, 'recall': 0.31092436974789917, 'f1': 0.2890625, 'number': 119} {'precision': 0.7433930093776641, 'recall': 0.8187793427230047, 'f1': 0.7792672028596961, 'number': 1065} 0.6950 0.7742 0.7325 0.8060
0.3593 10.0 100 0.6634 {'precision': 0.7079152731326644, 'recall': 0.7849196538936959, 'f1': 0.7444314185228605, 'number': 809} {'precision': 0.2714285714285714, 'recall': 0.31932773109243695, 'f1': 0.29343629343629346, 'number': 119} {'precision': 0.7571305099394987, 'recall': 0.8225352112676056, 'f1': 0.7884788478847885, 'number': 1065} 0.7060 0.7772 0.7399 0.8115
0.3209 11.0 110 0.6655 {'precision': 0.6973262032085561, 'recall': 0.8059332509270705, 'f1': 0.7477064220183487, 'number': 809} {'precision': 0.2903225806451613, 'recall': 0.3025210084033613, 'f1': 0.2962962962962963, 'number': 119} {'precision': 0.7788632326820604, 'recall': 0.8234741784037559, 'f1': 0.8005476951163851, 'number': 1065} 0.7162 0.7852 0.7492 0.8129
0.3064 12.0 120 0.6771 {'precision': 0.7104072398190046, 'recall': 0.7762669962917181, 'f1': 0.74187832250443, 'number': 809} {'precision': 0.2689655172413793, 'recall': 0.3277310924369748, 'f1': 0.2954545454545454, 'number': 119} {'precision': 0.7795698924731183, 'recall': 0.8169014084507042, 'f1': 0.797799174690509, 'number': 1065} 0.7166 0.7712 0.7429 0.8088
0.286 13.0 130 0.6765 {'precision': 0.7030905077262694, 'recall': 0.7873918417799752, 'f1': 0.7428571428571429, 'number': 809} {'precision': 0.2689655172413793, 'recall': 0.3277310924369748, 'f1': 0.2954545454545454, 'number': 119} {'precision': 0.769298245614035, 'recall': 0.8234741784037559, 'f1': 0.7954648526077097, 'number': 1065} 0.7088 0.7792 0.7424 0.8111
0.2806 14.0 140 0.6820 {'precision': 0.7052980132450332, 'recall': 0.7898640296662547, 'f1': 0.7451895043731779, 'number': 809} {'precision': 0.2689655172413793, 'recall': 0.3277310924369748, 'f1': 0.2954545454545454, 'number': 119} {'precision': 0.7793594306049823, 'recall': 0.8225352112676056, 'f1': 0.8003654636820466, 'number': 1065} 0.7145 0.7797 0.7457 0.8106
0.2736 15.0 150 0.6820 {'precision': 0.7084257206208425, 'recall': 0.7898640296662547, 'f1': 0.7469316189362946, 'number': 809} {'precision': 0.2689655172413793, 'recall': 0.3277310924369748, 'f1': 0.2954545454545454, 'number': 119} {'precision': 0.7870619946091644, 'recall': 0.8225352112676056, 'f1': 0.8044077134986226, 'number': 1065} 0.7194 0.7797 0.7484 0.8102

Framework versions

  • Transformers 4.23.1
  • Pytorch 1.12.1+cu113
  • Datasets 2.6.1
  • Tokenizers 0.13.1
Downloads last month
7
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.