Instructions to use PrimWong/layoutlm_qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PrimWong/layoutlm_qa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("document-question-answering", model="PrimWong/layoutlm_qa")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForDocumentQuestionAnswering processor = AutoProcessor.from_pretrained("PrimWong/layoutlm_qa") model = AutoModelForDocumentQuestionAnswering.from_pretrained("PrimWong/layoutlm_qa", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Training in progress, step 200
Browse filesFiles changed (9)
- config.jsonAdded+132
- model.safetensorsAdded+3
- preprocessor_config.jsonAdded+14
- runs/Dec10_20-07-06_cmkl-MS-7C06/events.out.tfevents.1702213644.cmkl-MS-7C06.2706.0Added+3
- special_tokens_map.jsonAdded+37
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+79
- training_args.binAdded+3
- vocab.txtAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132{ "_name_or_path": "microsoft/layoutlmv2-base-uncased", "architectures": [ "LayoutLMv2ForQuestionAnswering" ], "attention_probs_dropout_prob": 0.1, "convert_sync_batchnorm": true, "coordinate_size": 128, "detectron2_config_args": { "MODEL.ANCHOR_GENERATOR.SIZES": [ [ 32 ], [ 64 ], [ 128 ], [ 256 ], [ 512 ] ], "MODEL.BACKBONE.NAME": "build_resnet_fpn_backbone", "MODEL.FPN.IN_FEATURES": [ "res2", "res3", "res4", "res5" ], "MODEL.MASK_ON": true, "MODEL.PIXEL_STD": [ 57.375, 57.12, 58.395 ], "MODEL.POST_NMS_TOPK_TEST": 1000, "MODEL.RESNETS.ASPECT_RATIOS": [ [ 0.5, 1.0, 2.0 ] ], "MODEL.RESNETS.DEPTH": 101, "MODEL.RESNETS.NUM_GROUPS": 32, "MODEL.RESNETS.OUT_FEATURES": [ "res2", "res3", "res4", "res5" ], "MODEL.RESNETS.SIZES": [ [ 32 ], [ 64 ], [ 128 ], [ 256 ], [ 512 ] ], "MODEL.RESNETS.STRIDE_IN_1X1": false, "MODEL.RESNETS.WIDTH_PER_GROUP": 8, "MODEL.ROI_BOX_HEAD.NAME": "FastRCNNConvFCHead", "MODEL.ROI_BOX_HEAD.NUM_FC": 2, "MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION": 14, "MODEL.ROI_HEADS.IN_FEATURES": [ "p2", "p3", "p4", "p5" ], "MODEL.ROI_HEADS.NAME": "StandardROIHeads", "MODEL.ROI_HEADS.NUM_CLASSES": 5, "MODEL.ROI_MASK_HEAD.NAME": "MaskRCNNConvUpsampleHead", "MODEL.ROI_MASK_HEAD.NUM_CONV": 4, "MODEL.ROI_MASK_HEAD.POOLER_RESOLUTION": 7, "MODEL.RPN.IN_FEATURES": [ "p2", "p3", "p4", "p5", "p6" ], "MODEL.RPN.POST_NMS_TOPK_TRAIN": 1000, "MODEL.RPN.PRE_NMS_TOPK_TEST": 1000, "MODEL.RPN.PRE_NMS_TOPK_TRAIN": 2000 }, "fast_qkv": true, "gradient_checkpointing": false, "has_relative_attention_bias": true, "has_spatial_attention_bias": true, "has_visual_segment_embedding": true, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "image_feature_pool_shape": [ 7, 7, 256 ], "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-12, "max_2d_position_embeddings": 1024, "max_position_embeddings": 512, "max_rel_2d_pos": 256, "max_rel_pos": 128, "model_type": "layoutlmv2", "num_attention_heads": 12, "num_hidden_layers": 12, "output_past": true, "pad_token_id": 0, "rel_2d_pos_bins": 64, "rel_pos_bins": 32, "shape_size": 128, "torch_dtype": "float32", "transformers_version": "4.35.2", "type_vocab_size": 2, "vocab_size": 30522}123version https://git-lfs.github.com/spec/v1oid sha256:a9a73e012faf691f1fe019ca5ba272c3408bae6fda5dc145b8c7e57a3b863e8fsize 8020537521234567891011121314{ "apply_ocr": true, "do_resize": true, "feature_extractor_type": "LayoutLMv2FeatureExtractor", "image_processor_type": "LayoutLMv2ImageProcessor", "ocr_lang": null, "processor_class": "LayoutLMv2Processor", "resample": 2, "size": { "height": 224, "width": 224 }, "tesseract_config": ""}123version https://git-lfs.github.com/spec/v1oid sha256:b5967ee5ac87f9c70cb9e46bb6100fa1702cf11690d62daf7000ea85c012ed03size 794612345678910111213141516171819202122232425262728293031323334353637{ "cls_token": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "mask_token": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "sep_token": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879{ "added_tokens_decoder": { "0": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "101": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "102": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "103": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [], "clean_up_tokenization_spaces": true, "cls_token": "[CLS]", "cls_token_box": [ 0, 0, 0, 0 ], "do_basic_tokenize": true, "do_lower_case": true, "mask_token": "[MASK]", "model_max_length": 512, "never_split": null, "only_label_first_subword": true, "pad_token": "[PAD]", "pad_token_box": [ 0, 0, 0, 0 ], "pad_token_label": -100, "processor_class": "LayoutLMv2Processor", "sep_token": "[SEP]", "sep_token_box": [ 1000, 1000, 1000, 1000 ], "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "LayoutLMv2Tokenizer", "unk_token": "[UNK]"}123version https://git-lfs.github.com/spec/v1oid sha256:25eebca378f2ada7db200cd5561ca18415c232301c94479d08fca00087f54aa3size 4600config.jsonAdded+132
model.safetensorsAdded+3
preprocessor_config.jsonAdded+14
runs/Dec10_20-07-06_cmkl-MS-7C06/events.out.tfevents.1702213644.cmkl-MS-7C06.2706.0Added+3
special_tokens_map.jsonAdded+37
tokenizer.jsonAdded
tokenizer_config.jsonAdded+79
training_args.binAdded+3
vocab.txtAdded