Instructions to use hf-internal-testing/tiny-random-LayoutLMForQuestionAnswering with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-LayoutLMForQuestionAnswering with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("document-question-answering", model="hf-internal-testing/tiny-random-LayoutLMForQuestionAnswering")# Load model directly from transformers import AutoTokenizer, AutoModelForDocumentQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-random-LayoutLMForQuestionAnswering") model = AutoModelForDocumentQuestionAnswering.from_pretrained("hf-internal-testing/tiny-random-LayoutLMForQuestionAnswering", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "cls_token": "[CLS]", | |
| "do_basic_tokenize": true, | |
| "do_lower_case": true, | |
| "mask_token": "[MASK]", | |
| "max_len": 512, | |
| "model_max_length": 512, | |
| "name_or_path": "temp/dummy/layoutlm/processors", | |
| "never_split": null, | |
| "pad_token": "[PAD]", | |
| "sep_token": "[SEP]", | |
| "special_tokens_map_file": "/home/huggingface/.cache/huggingface/hub/models--microsoft--layoutlm-base-uncased/snapshots/ca841ce8d2f46b13b0ac3f635b8eb7d2e1d758d5/special_tokens_map.json", | |
| "strip_accents": null, | |
| "tokenize_chinese_chars": true, | |
| "tokenizer_class": "LayoutLMTokenizer", | |
| "unk_token": "[UNK]" | |
| } | |