layoutlm-funsd / README.md
philschmid's picture
philschmid HF staff
End of training
dedebc3
|
raw
history blame
9.16 kB
metadata
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: 1.0045
  • Answer: {'precision': 0.7348314606741573, 'recall': 0.8084054388133498, 'f1': 0.7698646262507357, 'number': 809}
  • Header: {'precision': 0.44285714285714284, 'recall': 0.5210084033613446, 'f1': 0.47876447876447875, 'number': 119}
  • Question: {'precision': 0.8211009174311926, 'recall': 0.8403755868544601, 'f1': 0.8306264501160092, 'number': 1065}
  • Overall Precision: 0.7599
  • Overall Recall: 0.8083
  • Overall F1: 0.7834
  • Overall Accuracy: 0.8106

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
0.1724 1.0 10 0.7657 {'precision': 0.7097826086956521, 'recall': 0.8071693448702101, 'f1': 0.7553499132446501, 'number': 809} {'precision': 0.3893129770992366, 'recall': 0.42857142857142855, 'f1': 0.40800000000000003, 'number': 119} {'precision': 0.7941176470588235, 'recall': 0.8366197183098592, 'f1': 0.8148148148148148, 'number': 1065} 0.7340 0.8003 0.7657 0.8134
0.1451 2.0 20 0.8099 {'precision': 0.7136659436008677, 'recall': 0.8133498145859085, 'f1': 0.7602541883304449, 'number': 809} {'precision': 0.4215686274509804, 'recall': 0.36134453781512604, 'f1': 0.3891402714932127, 'number': 119} {'precision': 0.809437386569873, 'recall': 0.8375586854460094, 'f1': 0.823257960313798, 'number': 1065} 0.7493 0.7993 0.7735 0.8125
0.1179 3.0 30 0.8622 {'precision': 0.7099892588614393, 'recall': 0.8170580964153276, 'f1': 0.7597701149425288, 'number': 809} {'precision': 0.4074074074074074, 'recall': 0.46218487394957986, 'f1': 0.4330708661417323, 'number': 119} {'precision': 0.8123300090661831, 'recall': 0.8413145539906103, 'f1': 0.8265682656826567, 'number': 1065} 0.7432 0.8088 0.7746 0.8074
0.0988 4.0 40 0.8587 {'precision': 0.7141327623126338, 'recall': 0.8244746600741656, 'f1': 0.7653471026965003, 'number': 809} {'precision': 0.4166666666666667, 'recall': 0.5042016806722689, 'f1': 0.4562737642585551, 'number': 119} {'precision': 0.8370998116760828, 'recall': 0.8347417840375587, 'f1': 0.8359191349318289, 'number': 1065} 0.7551 0.8108 0.7820 0.8157
0.0848 5.0 50 0.8933 {'precision': 0.7255813953488373, 'recall': 0.7713226205191595, 'f1': 0.7477531455961653, 'number': 809} {'precision': 0.4024390243902439, 'recall': 0.5546218487394958, 'f1': 0.46643109540636046, 'number': 119} {'precision': 0.8201834862385321, 'recall': 0.8394366197183099, 'f1': 0.8296983758700696, 'number': 1065} 0.7493 0.7948 0.7714 0.8056
0.073 6.0 60 0.9009 {'precision': 0.7344444444444445, 'recall': 0.8170580964153276, 'f1': 0.7735517846693973, 'number': 809} {'precision': 0.41721854304635764, 'recall': 0.5294117647058824, 'f1': 0.4666666666666667, 'number': 119} {'precision': 0.8107370336669699, 'recall': 0.8366197183098592, 'f1': 0.8234750462107209, 'number': 1065} 0.7512 0.8103 0.7796 0.8123
0.0655 7.0 70 0.9117 {'precision': 0.7367231638418079, 'recall': 0.8059332509270705, 'f1': 0.769775678866588, 'number': 809} {'precision': 0.4357142857142857, 'recall': 0.5126050420168067, 'f1': 0.47104247104247104, 'number': 119} {'precision': 0.8170955882352942, 'recall': 0.8347417840375587, 'f1': 0.8258244310264746, 'number': 1065} 0.7582 0.8038 0.7803 0.8088
0.0599 8.0 80 0.9414 {'precision': 0.7298474945533769, 'recall': 0.8281829419035847, 'f1': 0.7759119861030689, 'number': 809} {'precision': 0.41496598639455784, 'recall': 0.5126050420168067, 'f1': 0.4586466165413534, 'number': 119} {'precision': 0.8100810081008101, 'recall': 0.8450704225352113, 'f1': 0.8272058823529411, 'number': 1065} 0.7495 0.8184 0.7824 0.8089
0.0551 9.0 90 0.9548 {'precision': 0.746031746031746, 'recall': 0.8133498145859085, 'f1': 0.7782377291543465, 'number': 809} {'precision': 0.42953020134228187, 'recall': 0.5378151260504201, 'f1': 0.47761194029850745, 'number': 119} {'precision': 0.823963133640553, 'recall': 0.8394366197183099, 'f1': 0.8316279069767442, 'number': 1065} 0.7637 0.8108 0.7866 0.8111
0.0483 10.0 100 0.9684 {'precision': 0.7390326209223848, 'recall': 0.8121137206427689, 'f1': 0.773851590106007, 'number': 809} {'precision': 0.42, 'recall': 0.5294117647058824, 'f1': 0.46840148698884754, 'number': 119} {'precision': 0.8232044198895028, 'recall': 0.8394366197183099, 'f1': 0.8312412831241283, 'number': 1065} 0.7595 0.8098 0.7839 0.8091
0.0424 11.0 110 0.9858 {'precision': 0.7392290249433107, 'recall': 0.8059332509270705, 'f1': 0.7711413364872857, 'number': 809} {'precision': 0.4258064516129032, 'recall': 0.5546218487394958, 'f1': 0.48175182481751827, 'number': 119} {'precision': 0.8252788104089219, 'recall': 0.8338028169014085, 'f1': 0.8295189163942083, 'number': 1065} 0.7601 0.8058 0.7823 0.8094
0.0402 12.0 120 0.9920 {'precision': 0.7315436241610739, 'recall': 0.8084054388133498, 'f1': 0.7680563711098063, 'number': 809} {'precision': 0.4460431654676259, 'recall': 0.5210084033613446, 'f1': 0.48062015503875966, 'number': 119} {'precision': 0.8205128205128205, 'recall': 0.8413145539906103, 'f1': 0.8307834955957348, 'number': 1065} 0.7586 0.8088 0.7829 0.8111
0.0392 13.0 130 1.0027 {'precision': 0.7463193657984145, 'recall': 0.8145859085290482, 'f1': 0.7789598108747045, 'number': 809} {'precision': 0.4397163120567376, 'recall': 0.5210084033613446, 'f1': 0.47692307692307695, 'number': 119} {'precision': 0.8216911764705882, 'recall': 0.8394366197183099, 'f1': 0.8304691128657686, 'number': 1065} 0.7647 0.8103 0.7868 0.8104
0.0361 14.0 140 1.0027 {'precision': 0.7421171171171171, 'recall': 0.8145859085290482, 'f1': 0.7766647024160284, 'number': 809} {'precision': 0.43884892086330934, 'recall': 0.5126050420168067, 'f1': 0.4728682170542636, 'number': 119} {'precision': 0.8205128205128205, 'recall': 0.8413145539906103, 'f1': 0.8307834955957348, 'number': 1065} 0.7626 0.8108 0.7860 0.8115
0.0349 15.0 150 1.0045 {'precision': 0.7348314606741573, 'recall': 0.8084054388133498, 'f1': 0.7698646262507357, 'number': 809} {'precision': 0.44285714285714284, 'recall': 0.5210084033613446, 'f1': 0.47876447876447875, 'number': 119} {'precision': 0.8211009174311926, 'recall': 0.8403755868544601, 'f1': 0.8306264501160092, 'number': 1065} 0.7599 0.8083 0.7834 0.8106

Framework versions

  • Transformers 4.21.2
  • Pytorch 1.11.0+cu113
  • Datasets 2.5.1
  • Tokenizers 0.12.1