layoutlm-funsd / README.md
mathewchris96's picture
End of training
b46164e
metadata
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.6741
  • Answer: {'precision': 0.6960167714884696, 'recall': 0.8207663782447466, 'f1': 0.7532614861032332, 'number': 809}
  • Header: {'precision': 0.30952380952380953, 'recall': 0.3277310924369748, 'f1': 0.31836734693877555, 'number': 119}
  • Question: {'precision': 0.7824529991047449, 'recall': 0.8206572769953052, 'f1': 0.8010999083409717, 'number': 1065}
  • Overall Precision: 0.7178
  • Overall Recall: 0.7913
  • Overall F1: 0.7527
  • 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

Training results

Training Loss Epoch Step Validation Loss Answer Header Question Overall Precision Overall Recall Overall F1 Overall Accuracy
1.8231 1.0 10 1.5809 {'precision': 0.02072538860103627, 'recall': 0.024721878862793572, 'f1': 0.022547914317925594, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.20584795321637428, 'recall': 0.1652582159624413, 'f1': 0.18333333333333335, 'number': 1065} 0.1077 0.0983 0.1028 0.4047
1.4405 2.0 20 1.2298 {'precision': 0.12202380952380952, 'recall': 0.10135970333745364, 'f1': 0.11073598919648886, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.4417808219178082, 'recall': 0.6056338028169014, 'f1': 0.5108910891089109, 'number': 1065} 0.3407 0.3648 0.3523 0.5730
1.111 3.0 30 0.9547 {'precision': 0.47729672650475186, 'recall': 0.5587144622991347, 'f1': 0.5148063781321185, 'number': 809} {'precision': 0.06451612903225806, 'recall': 0.01680672268907563, 'f1': 0.026666666666666665, 'number': 119} {'precision': 0.6218274111675127, 'recall': 0.6901408450704225, 'f1': 0.6542056074766356, 'number': 1065} 0.5505 0.5966 0.5726 0.7074
0.8317 4.0 40 0.7729 {'precision': 0.5933649289099526, 'recall': 0.7737948084054388, 'f1': 0.6716738197424893, 'number': 809} {'precision': 0.24528301886792453, 'recall': 0.1092436974789916, 'f1': 0.1511627906976744, 'number': 119} {'precision': 0.6753574432296047, 'recall': 0.7539906103286385, 'f1': 0.7125110913930789, 'number': 1065} 0.6278 0.7235 0.6723 0.7637
0.656 5.0 50 0.7105 {'precision': 0.640973630831643, 'recall': 0.7812113720642769, 'f1': 0.7041782729805014, 'number': 809} {'precision': 0.2898550724637681, 'recall': 0.16806722689075632, 'f1': 0.2127659574468085, 'number': 119} {'precision': 0.7317518248175182, 'recall': 0.7530516431924883, 'f1': 0.7422489588153632, 'number': 1065} 0.6760 0.7296 0.7017 0.7811
0.5543 6.0 60 0.6688 {'precision': 0.6625514403292181, 'recall': 0.796044499381953, 'f1': 0.7231892195395846, 'number': 809} {'precision': 0.26732673267326734, 'recall': 0.226890756302521, 'f1': 0.24545454545454548, 'number': 119} {'precision': 0.7412587412587412, 'recall': 0.7962441314553991, 'f1': 0.7677682209144409, 'number': 1065} 0.6852 0.7622 0.7216 0.8004
0.4829 7.0 70 0.6491 {'precision': 0.6635610766045549, 'recall': 0.792336217552534, 'f1': 0.7222535211267606, 'number': 809} {'precision': 0.25471698113207547, 'recall': 0.226890756302521, 'f1': 0.24, 'number': 119} {'precision': 0.7401372212692967, 'recall': 0.8103286384976526, 'f1': 0.7736441057821605, 'number': 1065} 0.6841 0.7682 0.7237 0.8056
0.4371 8.0 80 0.6419 {'precision': 0.6742502585315409, 'recall': 0.8059332509270705, 'f1': 0.7342342342342343, 'number': 809} {'precision': 0.25210084033613445, 'recall': 0.25210084033613445, 'f1': 0.25210084033613445, 'number': 119} {'precision': 0.7491228070175439, 'recall': 0.8018779342723005, 'f1': 0.7746031746031745, 'number': 1065} 0.6900 0.7707 0.7281 0.8062
0.3855 9.0 90 0.6560 {'precision': 0.6869747899159664, 'recall': 0.8084054388133498, 'f1': 0.7427597955706984, 'number': 809} {'precision': 0.2711864406779661, 'recall': 0.2689075630252101, 'f1': 0.270042194092827, 'number': 119} {'precision': 0.7871559633027523, 'recall': 0.8056338028169014, 'f1': 0.7962877030162413, 'number': 1065} 0.7148 0.7747 0.7436 0.8047
0.3511 10.0 100 0.6675 {'precision': 0.6853932584269663, 'recall': 0.8294190358467244, 'f1': 0.750559284116331, 'number': 809} {'precision': 0.2966101694915254, 'recall': 0.29411764705882354, 'f1': 0.2953586497890296, 'number': 119} {'precision': 0.7851239669421488, 'recall': 0.8028169014084507, 'f1': 0.7938718662952646, 'number': 1065} 0.7141 0.7832 0.7471 0.8062
0.3236 11.0 110 0.6729 {'precision': 0.7195121951219512, 'recall': 0.8022249690976514, 'f1': 0.7586206896551723, 'number': 809} {'precision': 0.30303030303030304, 'recall': 0.33613445378151263, 'f1': 0.3187250996015936, 'number': 119} {'precision': 0.774798927613941, 'recall': 0.8140845070422535, 'f1': 0.7939560439560438, 'number': 1065} 0.7227 0.7807 0.7506 0.8045
0.307 12.0 120 0.6755 {'precision': 0.6757575757575758, 'recall': 0.826946847960445, 'f1': 0.7437465258476932, 'number': 809} {'precision': 0.29365079365079366, 'recall': 0.31092436974789917, 'f1': 0.30204081632653057, 'number': 119} {'precision': 0.7683363148479427, 'recall': 0.8065727699530516, 'f1': 0.7869903802107192, 'number': 1065} 0.7005 0.7852 0.7405 0.8052
0.2905 13.0 130 0.6712 {'precision': 0.6970021413276232, 'recall': 0.8046971569839307, 'f1': 0.7469879518072289, 'number': 809} {'precision': 0.3007518796992481, 'recall': 0.33613445378151263, 'f1': 0.31746031746031744, 'number': 119} {'precision': 0.7817028985507246, 'recall': 0.8103286384976526, 'f1': 0.7957584140156754, 'number': 1065} 0.7158 0.7797 0.7464 0.8067
0.2734 14.0 140 0.6758 {'precision': 0.6912681912681913, 'recall': 0.8220024721878862, 'f1': 0.7509881422924901, 'number': 809} {'precision': 0.3089430894308943, 'recall': 0.31932773109243695, 'f1': 0.3140495867768595, 'number': 119} {'precision': 0.7850045167118338, 'recall': 0.815962441314554, 'f1': 0.8001841620626151, 'number': 1065} 0.7172 0.7888 0.7513 0.8097
0.2672 15.0 150 0.6741 {'precision': 0.6960167714884696, 'recall': 0.8207663782447466, 'f1': 0.7532614861032332, 'number': 809} {'precision': 0.30952380952380953, 'recall': 0.3277310924369748, 'f1': 0.31836734693877555, 'number': 119} {'precision': 0.7824529991047449, 'recall': 0.8206572769953052, 'f1': 0.8010999083409717, 'number': 1065} 0.7178 0.7913 0.7527 0.8085

Framework versions

  • Transformers 4.34.1
  • Pytorch 2.1.0+cu118
  • Datasets 2.14.6
  • Tokenizers 0.14.1