layoutlm-funsd2 / README.md
Benedict-L's picture
End of training
41ab1f5 verified
|
raw
history blame
9.37 kB
metadata
license: mit
base_model: microsoft/layoutlm-base-uncased
tags:
  - generated_from_trainer
datasets:
  - funsd
model-index:
  - name: layoutlm-funsd2
    results: []

layoutlm-funsd2

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.6965
  • Answer: {'precision': 0.7010869565217391, 'recall': 0.7972805933250927, 'f1': 0.746096009253904, 'number': 809}
  • Header: {'precision': 0.3305785123966942, 'recall': 0.33613445378151263, 'f1': 0.33333333333333337, 'number': 119}
  • Question: {'precision': 0.7692307692307693, 'recall': 0.8262910798122066, 'f1': 0.7967406066093254, 'number': 1065}
  • Overall Precision: 0.7162
  • Overall Recall: 0.7852
  • Overall F1: 0.7492
  • Overall Accuracy: 0.8006

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.8343 1.0 10 1.5921 {'precision': 0.006666666666666667, 'recall': 0.006180469715698393, 'f1': 0.006414368184733804, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.22067901234567902, 'recall': 0.13427230046948357, 'f1': 0.166958552247519, 'number': 1065} 0.1059 0.0743 0.0873 0.3510
1.4828 2.0 20 1.2849 {'precision': 0.2738799661876585, 'recall': 0.4004944375772559, 'f1': 0.32530120481927705, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.38058114812189936, 'recall': 0.504225352112676, 'f1': 0.43376413570274636, 'number': 1065} 0.3314 0.4320 0.3751 0.5951
1.1444 3.0 30 0.9563 {'precision': 0.4725897920604915, 'recall': 0.6180469715698393, 'f1': 0.5356186395286556, 'number': 809} {'precision': 0.041666666666666664, 'recall': 0.01680672268907563, 'f1': 0.02395209580838323, 'number': 119} {'precision': 0.5378020265003897, 'recall': 0.647887323943662, 'f1': 0.5877342419080069, 'number': 1065} 0.4990 0.5981 0.5440 0.6955
0.8658 4.0 40 0.7885 {'precision': 0.5757009345794393, 'recall': 0.761433868974042, 'f1': 0.6556679084619478, 'number': 809} {'precision': 0.1388888888888889, 'recall': 0.08403361344537816, 'f1': 0.10471204188481677, 'number': 119} {'precision': 0.6567299006323396, 'recall': 0.6826291079812207, 'f1': 0.6694290976058932, 'number': 1065} 0.6016 0.6789 0.6379 0.7601
0.6833 5.0 50 0.7124 {'precision': 0.64375, 'recall': 0.7639060568603214, 'f1': 0.6986998304126625, 'number': 809} {'precision': 0.35, 'recall': 0.23529411764705882, 'f1': 0.28140703517587945, 'number': 119} {'precision': 0.6729354047424366, 'recall': 0.7727699530516432, 'f1': 0.7194055944055944, 'number': 1065} 0.6491 0.7371 0.6903 0.7810
0.5898 6.0 60 0.6874 {'precision': 0.6227141482194418, 'recall': 0.799752781211372, 'f1': 0.7002164502164502, 'number': 809} {'precision': 0.3411764705882353, 'recall': 0.24369747899159663, 'f1': 0.28431372549019607, 'number': 119} {'precision': 0.7236492471213464, 'recall': 0.7671361502347418, 'f1': 0.7447584320875114, 'number': 1065} 0.6627 0.7491 0.7033 0.7851
0.5126 7.0 70 0.6599 {'precision': 0.6705632306057385, 'recall': 0.7799752781211372, 'f1': 0.7211428571428572, 'number': 809} {'precision': 0.32673267326732675, 'recall': 0.2773109243697479, 'f1': 0.30000000000000004, 'number': 119} {'precision': 0.7427821522309711, 'recall': 0.7971830985915493, 'f1': 0.7690217391304347, 'number': 1065} 0.6924 0.7592 0.7243 0.7963
0.4534 8.0 80 0.6562 {'precision': 0.670490093847758, 'recall': 0.7948084054388134, 'f1': 0.7273755656108597, 'number': 809} {'precision': 0.2966101694915254, 'recall': 0.29411764705882354, 'f1': 0.2953586497890296, 'number': 119} {'precision': 0.7476475620188195, 'recall': 0.8206572769953052, 'f1': 0.7824529991047449, 'number': 1065} 0.6910 0.7787 0.7322 0.7954
0.3984 9.0 90 0.6561 {'precision': 0.6838709677419355, 'recall': 0.7861557478368356, 'f1': 0.7314548591144335, 'number': 809} {'precision': 0.3333333333333333, 'recall': 0.3025210084033613, 'f1': 0.3171806167400881, 'number': 119} {'precision': 0.7555555555555555, 'recall': 0.8300469483568075, 'f1': 0.7910514541387024, 'number': 1065} 0.7047 0.7807 0.7408 0.7986
0.3865 10.0 100 0.6673 {'precision': 0.6877005347593583, 'recall': 0.7948084054388134, 'f1': 0.7373853211009175, 'number': 809} {'precision': 0.31666666666666665, 'recall': 0.31932773109243695, 'f1': 0.3179916317991632, 'number': 119} {'precision': 0.7613240418118467, 'recall': 0.8206572769953052, 'f1': 0.7898779936737461, 'number': 1065} 0.7059 0.7802 0.7412 0.8019
0.3343 11.0 110 0.6761 {'precision': 0.6853220696937699, 'recall': 0.8022249690976514, 'f1': 0.7391799544419134, 'number': 809} {'precision': 0.336283185840708, 'recall': 0.31932773109243695, 'f1': 0.32758620689655166, 'number': 119} {'precision': 0.7692307692307693, 'recall': 0.8262910798122066, 'f1': 0.7967406066093254, 'number': 1065} 0.7110 0.7863 0.7467 0.7998
0.314 12.0 120 0.6772 {'precision': 0.6989130434782609, 'recall': 0.7948084054388134, 'f1': 0.7437825332562175, 'number': 809} {'precision': 0.34545454545454546, 'recall': 0.31932773109243695, 'f1': 0.3318777292576419, 'number': 119} {'precision': 0.7698343504795118, 'recall': 0.8291079812206573, 'f1': 0.7983725135623869, 'number': 1065} 0.7184 0.7847 0.7501 0.8053
0.3008 13.0 130 0.6878 {'precision': 0.7048648648648649, 'recall': 0.8059332509270705, 'f1': 0.7520184544405998, 'number': 809} {'precision': 0.33620689655172414, 'recall': 0.3277310924369748, 'f1': 0.33191489361702126, 'number': 119} {'precision': 0.7689594356261023, 'recall': 0.8187793427230047, 'f1': 0.793087767166894, 'number': 1065} 0.7186 0.7842 0.75 0.8033
0.2797 14.0 140 0.6948 {'precision': 0.7027322404371584, 'recall': 0.7948084054388134, 'f1': 0.7459396751740139, 'number': 809} {'precision': 0.31746031746031744, 'recall': 0.33613445378151263, 'f1': 0.32653061224489793, 'number': 119} {'precision': 0.7661996497373029, 'recall': 0.8215962441314554, 'f1': 0.7929315813321249, 'number': 1065} 0.7137 0.7817 0.7462 0.8017
0.2722 15.0 150 0.6965 {'precision': 0.7010869565217391, 'recall': 0.7972805933250927, 'f1': 0.746096009253904, 'number': 809} {'precision': 0.3305785123966942, 'recall': 0.33613445378151263, 'f1': 0.33333333333333337, 'number': 119} {'precision': 0.7692307692307693, 'recall': 0.8262910798122066, 'f1': 0.7967406066093254, 'number': 1065} 0.7162 0.7852 0.7492 0.8006

Framework versions

  • Transformers 4.41.2
  • Pytorch 2.3.1+cu121
  • Datasets 2.19.2
  • Tokenizers 0.19.1