Instructions to use impira/layoutlm-document-qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use impira/layoutlm-document-qa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("document-question-answering", model="impira/layoutlm-document-qa")# Load model directly from transformers import AutoTokenizer, AutoModelForDocumentQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("impira/layoutlm-document-qa") model = AutoModelForDocumentQuestionAnswering.from_pretrained("impira/layoutlm-document-qa") - Notebooks
- Google Colab
- Kaggle
Tokenizer class issue in the config file
#4
by ydshieh - opened
Hi @ankrgyl . Do you know why we have"tokenizer_class": "RobertaTokenizer",
in the config file instead of LayoutLMTokenizer? Is RobertaTokenizer used in fine-tuning this downstream QA task?
Yes! It's forked from here: https://huggingface.co/microsoft/layoutlm-base-cased/blob/main/config.json
Thanks! There might be some reason why layoutlm-base-cased use RobertaTokenizer but layoutlm-base-uncased doesn't specify a class (so will use LayoutLMTokenizer. However, this question should be posted on those repos.
Okay great, sounds good to me. If you discover anything super interesting, please update here :). I'll close this out for now.
ankrgyl changed discussion status to closed