microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities
https://aka.ms/GeneralAI
MIT License
20.28k stars 2.56k forks source link

ValueError: Unrecognized model in microsoft/unilm-base-cased. #948

Open FriedaSmith opened 1 year ago

FriedaSmith commented 1 year ago

Describe the bug Model I am using UniLM:

I use the following code to load the model.

from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("microsoft/unilm-base-cased")

And I got the traceback like this:

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: albert, bart, beit, bert, bert-generation, big_bird, bigbird_pegasus, blenderbot, blenderbot-small, bloom, camembert, canine, clip, codegen, conditional_detr, convbert, convnext, ctrl, cvt, data2vec-audio, data2vec-text, data2vec-vision, deberta, deberta-v2, decision_transformer, deformable_detr, deit, detr, distilbert, donut-swin, dpr, dpt, electra, encoder-decoder, ernie, esm, flaubert, flava, fnet, fsmt, funnel, glpn, gpt2, gpt_neo, gpt_neox, gpt_neox_japanese, gptj, groupvit, hubert, ibert, imagegpt, layoutlm, layoutlmv2, layoutlmv3, led, levit, lilt, longformer, longt5, luke, lxmert, m2m_100, marian, markuplm, maskformer, mbart, mctct, megatron-bert, mobilebert, mobilevit, mpnet, mt5, mvp, nezha, nystromformer, openai-gpt, opt, owlvit, pegasus, pegasus_x, perceiver, plbart, poolformer, prophetnet, qdqbert, rag, realm, reformer, regnet, rembert, resnet, retribert, roberta, roformer, segformer, sew, sew-d, speech-encoder-decoder, speech_to_text, speech_to_text_2, splinter, squeezebert, swin, swinv2, t5, table-transformer, tapas, time_series_transformer, trajectory_transformer, transfo-xl, trocr, unispeech, unispeech-sat, van, videomae, vilt, vision-encoder-decoder, vision-text-dual-encoder, visual_bert, vit, vit_mae, vit_msn, wav2vec2, wav2vec2-conformer, wavlm, whisper, xclip, xglm, xlm, xlm-prophetnet, xlm-roberta, xlm-roberta-xl, xlnet, yolos, yoso

agarnitin86 commented 1 year ago

@FriedaSmith : Did you find any solution to this?