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.7672
  • Answer: {'precision': 0.7376681614349776, 'recall': 0.8133498145859085, 'f1': 0.7736625514403291, 'number': 809}
  • Header: {'precision': 0.37857142857142856, 'recall': 0.44537815126050423, 'f1': 0.4092664092664093, 'number': 119}
  • Question: {'precision': 0.8122109158186864, 'recall': 0.8244131455399061, 'f1': 0.8182665424044735, 'number': 1065}
  • Overall Precision: 0.7520
  • Overall Recall: 0.7973
  • Overall F1: 0.7740
  • Overall Accuracy: 0.8111

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: 8
  • 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.6896 1.0 19 1.4068 {'precision': 0.0572737686139748, 'recall': 0.06180469715698393, 'f1': 0.05945303210463733, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.4044834307992203, 'recall': 0.38967136150234744, 'f1': 0.3969392635102822, 'number': 1065} 0.2449 0.2333 0.2390 0.4540
1.1462 2.0 38 0.8626 {'precision': 0.5445075757575758, 'recall': 0.7107540173053152, 'f1': 0.6166219839142091, 'number': 809} {'precision': 0.04878048780487805, 'recall': 0.01680672268907563, 'f1': 0.025, 'number': 119} {'precision': 0.6331615120274914, 'recall': 0.692018779342723, 'f1': 0.661283086585913, 'number': 1065} 0.5812 0.6593 0.6178 0.7285
0.7687 3.0 57 0.7051 {'precision': 0.6217264791464597, 'recall': 0.792336217552534, 'f1': 0.6967391304347825, 'number': 809} {'precision': 0.18421052631578946, 'recall': 0.11764705882352941, 'f1': 0.14358974358974358, 'number': 119} {'precision': 0.6805084745762712, 'recall': 0.7539906103286385, 'f1': 0.7153674832962139, 'number': 1065} 0.6375 0.7316 0.6813 0.7678
0.5961 4.0 76 0.6423 {'precision': 0.6527918781725889, 'recall': 0.7948084054388134, 'f1': 0.7168338907469342, 'number': 809} {'precision': 0.26785714285714285, 'recall': 0.25210084033613445, 'f1': 0.2597402597402597, 'number': 119} {'precision': 0.7100949094046591, 'recall': 0.7727699530516432, 'f1': 0.7401079136690648, 'number': 1065} 0.6631 0.7506 0.7042 0.7923
0.4739 5.0 95 0.6263 {'precision': 0.7024972855591748, 'recall': 0.799752781211372, 'f1': 0.7479768786127167, 'number': 809} {'precision': 0.33070866141732286, 'recall': 0.35294117647058826, 'f1': 0.34146341463414637, 'number': 119} {'precision': 0.7435897435897436, 'recall': 0.8169014084507042, 'f1': 0.778523489932886, 'number': 1065} 0.7029 0.7822 0.7404 0.8059
0.3893 6.0 114 0.6456 {'precision': 0.6912681912681913, 'recall': 0.8220024721878862, 'f1': 0.7509881422924901, 'number': 809} {'precision': 0.28169014084507044, 'recall': 0.33613445378151263, 'f1': 0.30651340996168586, 'number': 119} {'precision': 0.768270944741533, 'recall': 0.8093896713615023, 'f1': 0.7882944673068131, 'number': 1065} 0.7040 0.7863 0.7428 0.8050
0.3267 7.0 133 0.6813 {'precision': 0.7297605473204105, 'recall': 0.7911001236093943, 'f1': 0.7591933570581256, 'number': 809} {'precision': 0.33070866141732286, 'recall': 0.35294117647058826, 'f1': 0.34146341463414637, 'number': 119} {'precision': 0.7810283687943262, 'recall': 0.8272300469483568, 'f1': 0.8034655722754217, 'number': 1065} 0.7331 0.7842 0.7578 0.8019
0.2731 8.0 152 0.6628 {'precision': 0.7153846153846154, 'recall': 0.8046971569839307, 'f1': 0.7574171029668412, 'number': 809} {'precision': 0.3697478991596639, 'recall': 0.3697478991596639, 'f1': 0.3697478991596639, 'number': 119} {'precision': 0.7877145438121048, 'recall': 0.8187793427230047, 'f1': 0.8029465930018417, 'number': 1065} 0.7336 0.7863 0.7590 0.8137
0.2425 9.0 171 0.6992 {'precision': 0.7209302325581395, 'recall': 0.8046971569839307, 'f1': 0.7605140186915887, 'number': 809} {'precision': 0.3851851851851852, 'recall': 0.4369747899159664, 'f1': 0.4094488188976378, 'number': 119} {'precision': 0.801980198019802, 'recall': 0.8366197183098592, 'f1': 0.8189338235294118, 'number': 1065} 0.7417 0.7998 0.7697 0.8104
0.2145 10.0 190 0.7271 {'precision': 0.7373167981961668, 'recall': 0.8084054388133498, 'f1': 0.7712264150943396, 'number': 809} {'precision': 0.36075949367088606, 'recall': 0.4789915966386555, 'f1': 0.41155234657039713, 'number': 119} {'precision': 0.8250950570342205, 'recall': 0.8150234741784037, 'f1': 0.8200283419933868, 'number': 1065} 0.7530 0.7923 0.7721 0.8047
0.1882 11.0 209 0.7348 {'precision': 0.7400681044267877, 'recall': 0.8059332509270705, 'f1': 0.7715976331360946, 'number': 809} {'precision': 0.375, 'recall': 0.453781512605042, 'f1': 0.4106463878326997, 'number': 119} {'precision': 0.8254716981132075, 'recall': 0.8215962441314554, 'f1': 0.8235294117647057, 'number': 1065} 0.7583 0.7933 0.7754 0.8103
0.1668 12.0 228 0.7541 {'precision': 0.7360178970917226, 'recall': 0.8133498145859085, 'f1': 0.7727539635936582, 'number': 809} {'precision': 0.3984375, 'recall': 0.42857142857142855, 'f1': 0.41295546558704455, 'number': 119} {'precision': 0.8007246376811594, 'recall': 0.8300469483568075, 'f1': 0.8151221761180267, 'number': 1065} 0.7493 0.7993 0.7735 0.8097
0.1595 13.0 247 0.7616 {'precision': 0.7370786516853932, 'recall': 0.8108776266996292, 'f1': 0.7722189523248971, 'number': 809} {'precision': 0.38345864661654133, 'recall': 0.42857142857142855, 'f1': 0.4047619047619047, 'number': 119} {'precision': 0.8153988868274582, 'recall': 0.8253521126760563, 'f1': 0.8203453103126458, 'number': 1065} 0.7549 0.7958 0.7748 0.8122
0.1451 14.0 266 0.7638 {'precision': 0.7361894024802705, 'recall': 0.8071693448702101, 'f1': 0.7700471698113207, 'number': 809} {'precision': 0.375886524822695, 'recall': 0.44537815126050423, 'f1': 0.40769230769230774, 'number': 119} {'precision': 0.8150557620817844, 'recall': 0.8234741784037559, 'f1': 0.8192433442316676, 'number': 1065} 0.7524 0.7943 0.7728 0.8110
0.1449 15.0 285 0.7672 {'precision': 0.7376681614349776, 'recall': 0.8133498145859085, 'f1': 0.7736625514403291, 'number': 809} {'precision': 0.37857142857142856, 'recall': 0.44537815126050423, 'f1': 0.4092664092664093, 'number': 119} {'precision': 0.8122109158186864, 'recall': 0.8244131455399061, 'f1': 0.8182665424044735, 'number': 1065} 0.7520 0.7973 0.7740 0.8111

Framework versions

  • Transformers 4.44.2
  • Pytorch 2.4.1+cu121
  • Datasets 2.21.0
  • Tokenizers 0.19.1
Downloads last month
0
Safetensors
Model size
113M params
Tensor type
F32
·
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.

Model tree for VincentVVVVV/layoutlm-funsd

Finetuned
(135)
this model