layoutlm-funsd / README.md
rathanveer's picture
End of training
4c9315a verified
metadata
license: mit
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.6674
  • Answer: {'precision': 0.6954595791805094, 'recall': 0.7762669962917181, 'f1': 0.7336448598130841, 'number': 809}
  • Header: {'precision': 0.32061068702290074, 'recall': 0.35294117647058826, 'f1': 0.336, 'number': 119}
  • Question: {'precision': 0.7581196581196581, 'recall': 0.8328638497652582, 'f1': 0.7937360178970916, 'number': 1065}
  • Overall Precision: 0.7064
  • Overall Recall: 0.7812
  • Overall F1: 0.7420
  • Overall Accuracy: 0.8062

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.7631 1.0 10 1.5642 {'precision': 0.020954598370197905, 'recall': 0.022249690976514216, 'f1': 0.02158273381294964, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.2592137592137592, 'recall': 0.19812206572769953, 'f1': 0.22458754656732305, 'number': 1065} 0.1369 0.1149 0.1249 0.3744
1.4027 2.0 20 1.2058 {'precision': 0.2994871794871795, 'recall': 0.36093943139678614, 'f1': 0.32735426008968616, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.43074691805656273, 'recall': 0.5577464788732395, 'f1': 0.48608837970540103, 'number': 1065} 0.3764 0.4446 0.4076 0.6093
1.0483 3.0 30 0.9188 {'precision': 0.5052854122621564, 'recall': 0.5908529048207664, 'f1': 0.5447293447293446, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.5563218390804597, 'recall': 0.6816901408450704, 'f1': 0.6126582278481012, 'number': 1065} 0.5325 0.6041 0.5661 0.7192
0.8029 4.0 40 0.7734 {'precision': 0.6087408949011447, 'recall': 0.723114956736712, 'f1': 0.6610169491525424, 'number': 809} {'precision': 0.0967741935483871, 'recall': 0.05042016806722689, 'f1': 0.06629834254143646, 'number': 119} {'precision': 0.646677471636953, 'recall': 0.7492957746478873, 'f1': 0.6942148760330579, 'number': 1065} 0.6154 0.6969 0.6536 0.7601
0.6459 5.0 50 0.7058 {'precision': 0.6804932735426009, 'recall': 0.7503090234857849, 'f1': 0.713697824808936, 'number': 809} {'precision': 0.1951219512195122, 'recall': 0.13445378151260504, 'f1': 0.15920398009950248, 'number': 119} {'precision': 0.697065820777161, 'recall': 0.8253521126760563, 'f1': 0.7558039552880481, 'number': 1065} 0.6720 0.7536 0.7105 0.7922
0.5563 6.0 60 0.6929 {'precision': 0.6706008583690987, 'recall': 0.7725587144622992, 'f1': 0.7179781734635267, 'number': 809} {'precision': 0.25287356321839083, 'recall': 0.18487394957983194, 'f1': 0.21359223300970878, 'number': 119} {'precision': 0.730999146029035, 'recall': 0.8037558685446009, 'f1': 0.7656529516994633, 'number': 1065} 0.6863 0.7541 0.7186 0.7852
0.4789 7.0 70 0.6587 {'precision': 0.6681127982646421, 'recall': 0.761433868974042, 'f1': 0.7117273252455227, 'number': 809} {'precision': 0.24242424242424243, 'recall': 0.20168067226890757, 'f1': 0.2201834862385321, 'number': 119} {'precision': 0.7401837928153717, 'recall': 0.831924882629108, 'f1': 0.7833775419982316, 'number': 1065} 0.6880 0.7657 0.7248 0.7977
0.4306 8.0 80 0.6571 {'precision': 0.6606765327695561, 'recall': 0.7725587144622992, 'f1': 0.7122507122507123, 'number': 809} {'precision': 0.25, 'recall': 0.25210084033613445, 'f1': 0.2510460251046025, 'number': 119} {'precision': 0.7340513670256835, 'recall': 0.831924882629108, 'f1': 0.7799295774647887, 'number': 1065} 0.6780 0.7732 0.7225 0.8007
0.3749 9.0 90 0.6571 {'precision': 0.6827133479212254, 'recall': 0.7713226205191595, 'f1': 0.7243180499129426, 'number': 809} {'precision': 0.30434782608695654, 'recall': 0.29411764705882354, 'f1': 0.29914529914529914, 'number': 119} {'precision': 0.7328370554177006, 'recall': 0.831924882629108, 'f1': 0.7792436235708003, 'number': 1065} 0.6903 0.7752 0.7303 0.8022
0.3722 10.0 100 0.6581 {'precision': 0.6774193548387096, 'recall': 0.7787391841779975, 'f1': 0.7245543415756182, 'number': 809} {'precision': 0.3, 'recall': 0.3025210084033613, 'f1': 0.301255230125523, 'number': 119} {'precision': 0.7462311557788944, 'recall': 0.8366197183098592, 'f1': 0.7888446215139443, 'number': 1065} 0.6939 0.7812 0.7350 0.8036
0.3155 11.0 110 0.6649 {'precision': 0.6891304347826087, 'recall': 0.7836835599505563, 'f1': 0.733371891266628, 'number': 809} {'precision': 0.32786885245901637, 'recall': 0.33613445378151263, 'f1': 0.33195020746887965, 'number': 119} {'precision': 0.7489469250210615, 'recall': 0.8347417840375587, 'f1': 0.7895204262877443, 'number': 1065} 0.7012 0.7842 0.7404 0.8070
0.2968 12.0 120 0.6687 {'precision': 0.6901098901098901, 'recall': 0.7762669962917181, 'f1': 0.7306573589296103, 'number': 809} {'precision': 0.3106060606060606, 'recall': 0.3445378151260504, 'f1': 0.32669322709163345, 'number': 119} {'precision': 0.752129471890971, 'recall': 0.8291079812206573, 'f1': 0.7887449754354622, 'number': 1065} 0.7004 0.7787 0.7375 0.8053
0.2871 13.0 130 0.6709 {'precision': 0.6904761904761905, 'recall': 0.788627935723115, 'f1': 0.7362954414310445, 'number': 809} {'precision': 0.33064516129032256, 'recall': 0.3445378151260504, 'f1': 0.33744855967078186, 'number': 119} {'precision': 0.7709790209790209, 'recall': 0.828169014084507, 'f1': 0.7985513807152557, 'number': 1065} 0.7121 0.7832 0.7460 0.8055
0.2642 14.0 140 0.6679 {'precision': 0.6991051454138703, 'recall': 0.7725587144622992, 'f1': 0.7339988256018791, 'number': 809} {'precision': 0.31851851851851853, 'recall': 0.36134453781512604, 'f1': 0.33858267716535434, 'number': 119} {'precision': 0.7606112054329371, 'recall': 0.8413145539906103, 'f1': 0.7989300044583147, 'number': 1065} 0.7087 0.7847 0.7448 0.8074
0.2651 15.0 150 0.6674 {'precision': 0.6954595791805094, 'recall': 0.7762669962917181, 'f1': 0.7336448598130841, 'number': 809} {'precision': 0.32061068702290074, 'recall': 0.35294117647058826, 'f1': 0.336, 'number': 119} {'precision': 0.7581196581196581, 'recall': 0.8328638497652582, 'f1': 0.7937360178970916, 'number': 1065} 0.7064 0.7812 0.7420 0.8062

Framework versions

  • Transformers 4.42.4
  • Pytorch 2.3.1+cu121
  • Datasets 2.20.0
  • Tokenizers 0.19.1