--- 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](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset. It achieves the following results on the evaluation set: - Loss: 0.6680 - Answer: {'precision': 0.6523109243697479, 'recall': 0.7676143386897404, 'f1': 0.7052810902896083, 'number': 809} - Header: {'precision': 0.23300970873786409, 'recall': 0.20168067226890757, 'f1': 0.21621621621621623, 'number': 119} - Question: {'precision': 0.7324786324786324, 'recall': 0.8046948356807512, 'f1': 0.766890380313199, 'number': 1065} - Overall Precision: 0.6751 - Overall Recall: 0.7536 - Overall F1: 0.7122 - Overall Accuracy: 0.7957 ## 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: 10 ### Training results | Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy | |:-------------:|:-----:|:----:|:---------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:| | 1.8904 | 1.0 | 10 | 1.6569 | {'precision': 0.0226628895184136, 'recall': 0.029666254635352288, 'f1': 0.025695931477516063, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.13233724653148346, 'recall': 0.11643192488262911, 'f1': 0.12387612387612387, 'number': 1065} | 0.074 | 0.0743 | 0.0741 | 0.3562 | | 1.5103 | 2.0 | 20 | 1.3215 | {'precision': 0.16376306620209058, 'recall': 0.17428924598269468, 'f1': 0.1688622754491018, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.37047970479704795, 'recall': 0.47136150234741786, 'f1': 0.4148760330578512, 'number': 1065} | 0.2902 | 0.3226 | 0.3055 | 0.5678 | | 1.1593 | 3.0 | 30 | 0.9985 | {'precision': 0.45689655172413796, 'recall': 0.5241038318912238, 'f1': 0.4881980426021877, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5746268656716418, 'recall': 0.6507042253521127, 'f1': 0.6103038309114928, 'number': 1065} | 0.5176 | 0.5605 | 0.5382 | 0.6952 | | 0.8944 | 4.0 | 40 | 0.8291 | {'precision': 0.5676982591876208, 'recall': 0.7255871446229913, 'f1': 0.6370048833423766, 'number': 809} | {'precision': 0.125, 'recall': 0.05042016806722689, 'f1': 0.07185628742514971, 'number': 119} | {'precision': 0.648323301805675, 'recall': 0.707981220657277, 'f1': 0.6768402154398564, 'number': 1065} | 0.6 | 0.6759 | 0.6357 | 0.7440 | | 0.7344 | 5.0 | 50 | 0.7416 | {'precision': 0.6231422505307855, 'recall': 0.7255871446229913, 'f1': 0.670474014848658, 'number': 809} | {'precision': 0.21686746987951808, 'recall': 0.15126050420168066, 'f1': 0.1782178217821782, 'number': 119} | {'precision': 0.6871794871794872, 'recall': 0.7549295774647887, 'f1': 0.7194630872483222, 'number': 1065} | 0.6419 | 0.7070 | 0.6729 | 0.7718 | | 0.6312 | 6.0 | 60 | 0.7028 | {'precision': 0.616956077630235, 'recall': 0.7466007416563659, 'f1': 0.6756152125279643, 'number': 809} | {'precision': 0.2413793103448276, 'recall': 0.17647058823529413, 'f1': 0.2038834951456311, 'number': 119} | {'precision': 0.7020033388981636, 'recall': 0.7896713615023474, 'f1': 0.7432611577551921, 'number': 1065} | 0.6475 | 0.7356 | 0.6887 | 0.7880 | | 0.5603 | 7.0 | 70 | 0.6980 | {'precision': 0.6331550802139038, 'recall': 0.7317676143386898, 'f1': 0.6788990825688073, 'number': 809} | {'precision': 0.2604166666666667, 'recall': 0.21008403361344538, 'f1': 0.23255813953488375, 'number': 119} | {'precision': 0.6994219653179191, 'recall': 0.7953051643192488, 'f1': 0.7442882249560634, 'number': 1065} | 0.6530 | 0.7346 | 0.6914 | 0.7861 | | 0.5272 | 8.0 | 80 | 0.6733 | {'precision': 0.6592827004219409, 'recall': 0.7725587144622992, 'f1': 0.7114399544678428, 'number': 809} | {'precision': 0.25, 'recall': 0.20168067226890757, 'f1': 0.22325581395348837, 'number': 119} | {'precision': 0.7175188600167645, 'recall': 0.8037558685446009, 'f1': 0.758193091231178, 'number': 1065} | 0.6728 | 0.7551 | 0.7116 | 0.7927 | | 0.4849 | 9.0 | 90 | 0.6716 | {'precision': 0.6549145299145299, 'recall': 0.757725587144623, 'f1': 0.7025787965616046, 'number': 809} | {'precision': 0.23809523809523808, 'recall': 0.21008403361344538, 'f1': 0.22321428571428573, 'number': 119} | {'precision': 0.7216666666666667, 'recall': 0.8131455399061033, 'f1': 0.7646799116997792, 'number': 1065} | 0.6711 | 0.7546 | 0.7104 | 0.7961 | | 0.4695 | 10.0 | 100 | 0.6680 | {'precision': 0.6523109243697479, 'recall': 0.7676143386897404, 'f1': 0.7052810902896083, 'number': 809} | {'precision': 0.23300970873786409, 'recall': 0.20168067226890757, 'f1': 0.21621621621621623, 'number': 119} | {'precision': 0.7324786324786324, 'recall': 0.8046948356807512, 'f1': 0.766890380313199, 'number': 1065} | 0.6751 | 0.7536 | 0.7122 | 0.7957 | ### Framework versions - Transformers 4.31.0 - Pytorch 2.0.1+cu118 - Datasets 2.14.2 - Tokenizers 0.13.3