--- 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](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset. It achieves the following results on the evaluation set: - Loss: 0.6811 - Answer: {'precision': 0.709070796460177, 'recall': 0.792336217552534, 'f1': 0.7483946293053124, 'number': 809} - Header: {'precision': 0.30935251798561153, 'recall': 0.36134453781512604, 'f1': 0.33333333333333337, 'number': 119} - Question: {'precision': 0.7719298245614035, 'recall': 0.8262910798122066, 'f1': 0.7981859410430839, 'number': 1065} - Overall Precision: 0.7164 - Overall Recall: 0.7847 - Overall F1: 0.7490 - Overall Accuracy: 0.8082 ## 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.7509 | 1.0 | 10 | 1.5595 | {'precision': 0.017814726840855107, 'recall': 0.018541409147095178, 'f1': 0.018170805572380374, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2612244897959184, 'recall': 0.18028169014084508, 'f1': 0.21333333333333337, 'number': 1065} | 0.1313 | 0.1039 | 0.1160 | 0.3731 | | 1.4219 | 2.0 | 20 | 1.2145 | {'precision': 0.2700871248789932, 'recall': 0.34487021013597036, 'f1': 0.30293159609120524, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.44834710743801653, 'recall': 0.6112676056338028, 'f1': 0.5172824791418356, 'number': 1065} | 0.3742 | 0.4666 | 0.4154 | 0.6174 | | 1.051 | 3.0 | 30 | 0.8818 | {'precision': 0.5245579567779961, 'recall': 0.6600741656365884, 'f1': 0.5845648604269295, 'number': 809} | {'precision': 0.08823529411764706, 'recall': 0.025210084033613446, 'f1': 0.039215686274509796, 'number': 119} | {'precision': 0.5788679245283019, 'recall': 0.72018779342723, 'f1': 0.6418410041841004, 'number': 1065} | 0.5486 | 0.6543 | 0.5968 | 0.7169 | | 0.8148 | 4.0 | 40 | 0.7627 | {'precision': 0.5905587668593449, 'recall': 0.757725587144623, 'f1': 0.6637791012452626, 'number': 809} | {'precision': 0.16981132075471697, 'recall': 0.07563025210084033, 'f1': 0.10465116279069768, 'number': 119} | {'precision': 0.6629502572898799, 'recall': 0.7258215962441315, 'f1': 0.6929627969520394, 'number': 1065} | 0.6181 | 0.6999 | 0.6565 | 0.7571 | | 0.655 | 5.0 | 50 | 0.7092 | {'precision': 0.6670305676855895, 'recall': 0.7552533992583437, 'f1': 0.7084057971014494, 'number': 809} | {'precision': 0.20652173913043478, 'recall': 0.15966386554621848, 'f1': 0.1800947867298578, 'number': 119} | {'precision': 0.6726986624704957, 'recall': 0.8028169014084507, 'f1': 0.7320205479452055, 'number': 1065} | 0.6516 | 0.7451 | 0.6952 | 0.7782 | | 0.5597 | 6.0 | 60 | 0.6707 | {'precision': 0.6635220125786163, 'recall': 0.7824474660074165, 'f1': 0.7180941576857629, 'number': 809} | {'precision': 0.24242424242424243, 'recall': 0.20168067226890757, 'f1': 0.2201834862385321, 'number': 119} | {'precision': 0.7158608990670059, 'recall': 0.7924882629107981, 'f1': 0.7522281639928697, 'number': 1065} | 0.6725 | 0.7531 | 0.7105 | 0.7910 | | 0.4852 | 7.0 | 70 | 0.6426 | {'precision': 0.6834763948497854, 'recall': 0.7873918417799752, 'f1': 0.7317633543940264, 'number': 809} | {'precision': 0.27927927927927926, 'recall': 0.2605042016806723, 'f1': 0.26956521739130435, 'number': 119} | {'precision': 0.7425658453695837, 'recall': 0.8206572769953052, 'f1': 0.7796610169491525, 'number': 1065} | 0.6946 | 0.7737 | 0.7320 | 0.8031 | | 0.4304 | 8.0 | 80 | 0.6514 | {'precision': 0.6897654584221748, 'recall': 0.799752781211372, 'f1': 0.7406983400114482, 'number': 809} | {'precision': 0.24285714285714285, 'recall': 0.2857142857142857, 'f1': 0.2625482625482625, 'number': 119} | {'precision': 0.7366638441998307, 'recall': 0.8169014084507042, 'f1': 0.7747105966162066, 'number': 1065} | 0.6866 | 0.7782 | 0.7295 | 0.7993 | | 0.3848 | 9.0 | 90 | 0.6446 | {'precision': 0.7036625971143174, 'recall': 0.7836835599505563, 'f1': 0.7415204678362575, 'number': 809} | {'precision': 0.2677165354330709, 'recall': 0.2857142857142857, 'f1': 0.2764227642276422, 'number': 119} | {'precision': 0.7435456110154905, 'recall': 0.8112676056338028, 'f1': 0.7759317467444994, 'number': 1065} | 0.6995 | 0.7687 | 0.7325 | 0.8035 | | 0.3788 | 10.0 | 100 | 0.6471 | {'precision': 0.7045454545454546, 'recall': 0.8046971569839307, 'f1': 0.7512983266012695, 'number': 809} | {'precision': 0.26717557251908397, 'recall': 0.29411764705882354, 'f1': 0.28, 'number': 119} | {'precision': 0.7420435510887772, 'recall': 0.831924882629108, 'f1': 0.7844178840194777, 'number': 1065} | 0.6990 | 0.7888 | 0.7412 | 0.8082 | | 0.3236 | 11.0 | 110 | 0.6526 | {'precision': 0.7038251366120218, 'recall': 0.796044499381953, 'f1': 0.7470997679814385, 'number': 809} | {'precision': 0.29850746268656714, 'recall': 0.33613445378151263, 'f1': 0.31620553359683795, 'number': 119} | {'precision': 0.7566638005159071, 'recall': 0.8262910798122066, 'f1': 0.7899461400359066, 'number': 1065} | 0.7071 | 0.7847 | 0.7439 | 0.8054 | | 0.3053 | 12.0 | 120 | 0.6676 | {'precision': 0.7138047138047138, 'recall': 0.7861557478368356, 'f1': 0.748235294117647, 'number': 809} | {'precision': 0.3125, 'recall': 0.33613445378151263, 'f1': 0.3238866396761134, 'number': 119} | {'precision': 0.7703768624014022, 'recall': 0.8253521126760563, 'f1': 0.7969174977334541, 'number': 1065} | 0.7199 | 0.7802 | 0.7489 | 0.8098 | | 0.2881 | 13.0 | 130 | 0.6718 | {'precision': 0.7058177826564215, 'recall': 0.7948084054388134, 'f1': 0.7476744186046511, 'number': 809} | {'precision': 0.312, 'recall': 0.3277310924369748, 'f1': 0.31967213114754095, 'number': 119} | {'precision': 0.7652173913043478, 'recall': 0.8262910798122066, 'f1': 0.7945823927765238, 'number': 1065} | 0.7145 | 0.7837 | 0.7475 | 0.8073 | | 0.2668 | 14.0 | 140 | 0.6787 | {'precision': 0.7093922651933702, 'recall': 0.7935723114956736, 'f1': 0.7491248541423571, 'number': 809} | {'precision': 0.30714285714285716, 'recall': 0.36134453781512604, 'f1': 0.33204633204633205, 'number': 119} | {'precision': 0.7713787085514834, 'recall': 0.8300469483568075, 'f1': 0.7996381727725013, 'number': 1065} | 0.7161 | 0.7873 | 0.7500 | 0.8081 | | 0.2692 | 15.0 | 150 | 0.6811 | {'precision': 0.709070796460177, 'recall': 0.792336217552534, 'f1': 0.7483946293053124, 'number': 809} | {'precision': 0.30935251798561153, 'recall': 0.36134453781512604, 'f1': 0.33333333333333337, 'number': 119} | {'precision': 0.7719298245614035, 'recall': 0.8262910798122066, 'f1': 0.7981859410430839, 'number': 1065} | 0.7164 | 0.7847 | 0.7490 | 0.8082 | ### Framework versions - Transformers 4.42.4 - Pytorch 2.3.1+cu121 - Datasets 2.20.0 - Tokenizers 0.19.1