load 'microsoft/unilm-base-cased' failed 
Author: AI678
Pull request: no
Labels: name: wontfix

# ❓ Questions & Help

<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,
     new models and benchmarks, and migration questions. For all other questions,
     we direct you to the Hugging Face forum: https://discuss.huggingface.co/ .
     You can also try Stack Overflow (SO) where a whole community of PyTorch and
     Tensorflow enthusiast can help you out. In this case, make sure to tag your
     question with the right deep learning framework as well as the
     huggingface-transformers tag: 
     https://stackoverflow.com/questions/tagged/huggingface-transformers 
     -->

## Details
<!-- Description of your issue -->
I use the following code in https://huggingface.co/microsoft/unilm-base-cased to load the model.
```
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("microsoft/unilm-base-cased")

model = AutoModel.from_pretrained("microsoft/unilm-base-cased")
```

And I got the traceback like this 
 tokenizer = AutoTokenizer.from_pretrained("microsoft/unilm-base-cased")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\666666\AppData\Local\Programs\Python\Python38\lib\site-packages\transformers\tokenization_auto.py", line 298, in from_pretrained
    config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
  File "C:\Users\666666\AppData\Local\Programs\Python\Python38\lib\site-packages\transformers\configuration_auto.py", line 341, in from_pretrained
    raise ValueError(
ValueError: Unrecognized model in microsoft/unilm-base-cased. Should have a `model_type` key in its config.json, or contain one of the following strings in its name: retribert, t5, mobilebert, distilbert, albert, bert-generation, camembert, xlm-roberta, pegasus, marian, mbart, bart, blenderbot, reformer, longformer, roberta, deberta, flaubert, fsmt, squeezebert, bert, openai-gpt, gpt2, transfo-xl, xlnet, xlm-prophetnet, prophetnet, xlm, ctrl, electra, encoder-decoder, funnel, lxmert, dpr, layoutlm, rag
>>>
>>> model = AutoModel.from_pretrained("microsoft/unilm-base-cased")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\666666\AppData\Local\Programs\Python\Python38\lib\site-packages\transformers\modeling_auto.py", line 623, in from_pretrained
    config, kwargs = AutoConfig.from_pretrained(
  File "C:\Users\666666\AppData\Local\Programs\Python\Python38\lib\site-packages\transformers\configuration_auto.py", line 341, in from_pretrained
    raise ValueError(
ValueError: Unrecognized model in microsoft/unilm-base-cased. Should have a `model_type` key in its config.json, or contain one of the following strings in its name: retribert, t5, mobilebert, distilbert, albert, bert-generation, camembert, xlm-roberta, pegasus, marian, mbart, bart, blenderbot, reformer, longformer, roberta, deberta, flaubert, fsmt, squeezebert, bert, openai-gpt, gpt2, transfo-xl, xlnet, xlm-prophetnet, prophetnet, xlm, ctrl, electra, encoder-decoder, funnel, lxmert, dpr, layoutlm, rag
<!-- You should first ask your question on the forum or SO, and only if
     you didn't get an answer ask it here on GitHub. -->
**A link to original question on the forum/Stack Overflow**:

Comments:
Hello
Same problem for us.
Do you plan to investigate / fix it ?
Cheers
Philippe

The UniLM model has not been released in the library yet.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.