Run this model with HF Jobs
Run janbl06/layoutlm-paragraphs on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/janbl06/layoutlm-paragraphs. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/janbl06/layoutlm-paragraphs on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use janbl06/layoutlm-paragraphs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use janbl06/layoutlm-paragraphs with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="janbl06/layoutlm-paragraphs")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("janbl06/layoutlm-paragraphs") model = AutoModelForTokenClassification.from_pretrained("janbl06/layoutlm-paragraphs", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from janbl06/layoutlm-paragraphs: direct link, hf CLI and curl.
- Browser
- Download file 7.42 kB
-
https://huggingface.co/janbl06/layoutlm-paragraphs/resolve/main/README.md
- Command line
-
hf download hf://janbl06/layoutlm-paragraphs/README.md
-
curl -L -o README.md https://huggingface.co/janbl06/layoutlm-paragraphs/resolve/main/README.md
7.42 kB
| library_name: transformers | |
| license: mit | |
| base_model: microsoft/layoutlm-base-uncased | |
| tags: | |
| - generated_from_trainer | |
| model-index: | |
| - name: layoutlm-paragraphs | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # layoutlm-paragraphs | |
| This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.0883 | |
| - Aragraph: {'precision': 0.48, 'recall': 0.6666666666666666, 'f1': 0.5581395348837209, 'number': 18} | |
| - Ull: {'precision': 0.56, 'recall': 0.7777777777777778, 'f1': 0.6511627906976745, 'number': 18} | |
| - Overall Precision: 0.52 | |
| - Overall Recall: 0.7222 | |
| - Overall F1: 0.6047 | |
| - Overall Accuracy: 0.9843 | |
| ## 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: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments | |
| - lr_scheduler_type: linear | |
| - num_epochs: 15 | |
| - mixed_precision_training: Native AMP | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Aragraph | Ull | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy | | |
| |:-------------:|:-----:|:----:|:---------------:|:---------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:| | |
| | 0.4984 | 1.0 | 7 | 0.2661 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 18} | {'precision': 0.011396011396011397, 'recall': 0.2222222222222222, 'f1': 0.02168021680216802, 'number': 18} | 0.0057 | 0.1111 | 0.0108 | 0.9371 | | |
| | 0.1418 | 2.0 | 14 | 0.1140 | {'precision': 0.0375, 'recall': 0.16666666666666666, 'f1': 0.061224489795918366, 'number': 18} | {'precision': 0.0375, 'recall': 0.16666666666666666, 'f1': 0.061224489795918366, 'number': 18} | 0.0375 | 0.1667 | 0.0612 | 0.9674 | | |
| | 0.0517 | 3.0 | 21 | 0.1035 | {'precision': 0.125, 'recall': 0.3333333333333333, 'f1': 0.18181818181818182, 'number': 18} | {'precision': 0.14583333333333334, 'recall': 0.3888888888888889, 'f1': 0.21212121212121213, 'number': 18} | 0.1354 | 0.3611 | 0.1970 | 0.9726 | | |
| | 0.0476 | 4.0 | 28 | 0.0844 | {'precision': 0.43333333333333335, 'recall': 0.7222222222222222, 'f1': 0.5416666666666666, 'number': 18} | {'precision': 0.4666666666666667, 'recall': 0.7777777777777778, 'f1': 0.5833333333333334, 'number': 18} | 0.45 | 0.75 | 0.5625 | 0.9803 | | |
| | 0.0335 | 5.0 | 35 | 0.0895 | {'precision': 0.6666666666666666, 'recall': 0.8888888888888888, 'f1': 0.761904761904762, 'number': 18} | {'precision': 0.625, 'recall': 0.8333333333333334, 'f1': 0.7142857142857143, 'number': 18} | 0.6458 | 0.8611 | 0.7381 | 0.9813 | | |
| | 0.0329 | 6.0 | 42 | 0.0746 | {'precision': 0.5, 'recall': 0.7777777777777778, 'f1': 0.6086956521739131, 'number': 18} | {'precision': 0.5, 'recall': 0.7777777777777778, 'f1': 0.6086956521739131, 'number': 18} | 0.5 | 0.7778 | 0.6087 | 0.9833 | | |
| | 0.0249 | 7.0 | 49 | 0.0718 | {'precision': 0.35714285714285715, 'recall': 0.5555555555555556, 'f1': 0.43478260869565216, 'number': 18} | {'precision': 0.4642857142857143, 'recall': 0.7222222222222222, 'f1': 0.5652173913043479, 'number': 18} | 0.4107 | 0.6389 | 0.5 | 0.9834 | | |
| | 0.0174 | 8.0 | 56 | 0.0759 | {'precision': 0.42857142857142855, 'recall': 0.6666666666666666, 'f1': 0.5217391304347826, 'number': 18} | {'precision': 0.5, 'recall': 0.7777777777777778, 'f1': 0.6086956521739131, 'number': 18} | 0.4643 | 0.7222 | 0.5652 | 0.9836 | | |
| | 0.0144 | 9.0 | 63 | 0.0845 | {'precision': 0.5, 'recall': 0.7222222222222222, 'f1': 0.5909090909090908, 'number': 18} | {'precision': 0.5384615384615384, 'recall': 0.7777777777777778, 'f1': 0.6363636363636364, 'number': 18} | 0.5192 | 0.75 | 0.6136 | 0.9839 | | |
| | 0.0131 | 10.0 | 70 | 0.0895 | {'precision': 0.6363636363636364, 'recall': 0.7777777777777778, 'f1': 0.7000000000000001, 'number': 18} | {'precision': 0.6818181818181818, 'recall': 0.8333333333333334, 'f1': 0.7499999999999999, 'number': 18} | 0.6591 | 0.8056 | 0.7250 | 0.9847 | | |
| | 0.0179 | 11.0 | 77 | 0.0922 | {'precision': 0.6666666666666666, 'recall': 0.7777777777777778, 'f1': 0.717948717948718, 'number': 18} | {'precision': 0.7142857142857143, 'recall': 0.8333333333333334, 'f1': 0.7692307692307692, 'number': 18} | 0.6905 | 0.8056 | 0.7436 | 0.9848 | | |
| | 0.0151 | 12.0 | 84 | 0.0902 | {'precision': 0.6363636363636364, 'recall': 0.7777777777777778, 'f1': 0.7000000000000001, 'number': 18} | {'precision': 0.6818181818181818, 'recall': 0.8333333333333334, 'f1': 0.7499999999999999, 'number': 18} | 0.6591 | 0.8056 | 0.7250 | 0.9847 | | |
| | 0.0127 | 13.0 | 91 | 0.0886 | {'precision': 0.5416666666666666, 'recall': 0.7222222222222222, 'f1': 0.619047619047619, 'number': 18} | {'precision': 0.625, 'recall': 0.8333333333333334, 'f1': 0.7142857142857143, 'number': 18} | 0.5833 | 0.7778 | 0.6667 | 0.9845 | | |
| | 0.0118 | 14.0 | 98 | 0.0883 | {'precision': 0.5, 'recall': 0.6666666666666666, 'f1': 0.5714285714285715, 'number': 18} | {'precision': 0.5833333333333334, 'recall': 0.7777777777777778, 'f1': 0.6666666666666666, 'number': 18} | 0.5417 | 0.7222 | 0.6190 | 0.9844 | | |
| | 0.012 | 15.0 | 105 | 0.0883 | {'precision': 0.48, 'recall': 0.6666666666666666, 'f1': 0.5581395348837209, 'number': 18} | {'precision': 0.56, 'recall': 0.7777777777777778, 'f1': 0.6511627906976745, 'number': 18} | 0.52 | 0.7222 | 0.6047 | 0.9843 | | |
| ### Framework versions | |
| - Transformers 4.52.3 | |
| - Pytorch 2.7.0+cpu | |
| - Datasets 3.6.0 | |
| - Tokenizers 0.21.1 | |