Instructions to use microsoft/layoutxlm-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/layoutxlm-base with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("microsoft/layoutxlm-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Add `tokenizer_class` to `config.4.13.0.json`
Hi 😀! I recently noticed that: ```python from transformers import LayoutXLMProcessor processor = LayoutXLMProcessor.from_pretrained("microsoft/layoutxlm-base") ``` was logging the following message ``` The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'LayoutLMv2Tokenizer'. The class this function is called from is 'LayoutXLMTokenizerFast'. ``` and ```python tokenizer = AutoTokenizer.from_pretrained("microsoft/layoutxlm-base") print(type) ``` is printing ``` transformers.models.layoutlmv2.tokenization_layoutlmv2_fast.LayoutLMv2TokenizerFast ``` I think this is because the tokenizer class is not specified in the configuration file and therefore the default class determined is the one of the model, i.e. LayoutLMv2. What do you think?43d8d4e
-
Update config to new API for different files
cd757fc
-
Add link to docs
6e818cb
-
Create config.4.13.0.json
facb27d
-
Update license
ab39c2c
-
Restore tokenizer_class attribute
a6fb65e
-
Remove character
5e413fc -
Remove tokenizer_class attribute
bd086c2 -
Add preprocessor_config.json
ee55163
-
Fix model_type of config
d4a5e66
-
Fix JSON
c1e9ca2 -
Add tokenizer_class attribute to config
498ed50
-
Update README.md
Yiheng Xu0b0e209 -
Update README.md
Yiheng Xub61e18b
-
Update ReEADME.md
2192952 -
init
4172848
-
initial commit
4bdc975