THUDM / VisualGLM-6B

Chinese and English multimodal conversational language model | 多模态中英双语对话语言模型
Apache License 2.0
4.1k stars 417 forks source link

Unrecognized configuration class <class ‘transformers_modules.visualglm-6b.configuration_chatglm.ChatGLMConfig’> #129

Open chenjie04 opened 1 year ago

chenjie04 commented 1 year ago

尝试使用text-generation-webui本地部署VisualGLM-6B,加载模型时出错Unrecognized configuration class <class ‘transformers_modules.visualglm-6b.configuration_chatglm.ChatGLMConfig’>

具体如下所示:

Traceback (most recent call last): File “/home/xxxxxx/workstation/text-generation-webui/server.py”, line 69, in load_model_wrapper shared.model, shared.tokenizer = load_model(shared.model_name) File “/home/xxxxxx/workstation/text-generation-webui/modules/models.py”, line 94, in load_model output = load_func(model_name) File “/home/xxxxxx/workstation/text-generation-webui/modules/models.py”, line 222, in huggingface_loader model = LoaderClass.from_pretrained(checkpoint, **params) File “/home/xxxxxx/anaconda3/envs/textgen/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py”, line 487, in from_pretrained raise ValueError( ValueError: Unrecognized configuration class <class ‘transformers_modules.visualglm-6b.configuration_chatglm.ChatGLMConfig’> for this kind of AutoModel: AutoModelForCausalLM. Model type should be one of BartConfig, BertConfig, BertGenerationConfig, BigBirdConfig, BigBirdPegasusConfig, BioGptConfig, BlenderbotConfig, BlenderbotSmallConfig, BloomConfig, CamembertConfig, CodeGenConfig, CpmAntConfig, CTRLConfig, Data2VecTextConfig, ElectraConfig, ErnieConfig, GitConfig, GPT2Config, GPT2Config, GPTBigCodeConfig, GPTNeoConfig, GPTNeoXConfig, GPTNeoXJapaneseConfig, GPTJConfig, LlamaConfig, MarianConfig, MBartConfig, MegaConfig, MegatronBertConfig, MvpConfig, OpenLlamaConfig, OpenAIGPTConfig, OPTConfig, PegasusConfig, PLBartConfig, ProphetNetConfig, QDQBertConfig, ReformerConfig, RemBertConfig, RobertaConfig, RobertaPreLayerNormConfig, RoCBertConfig, RoFormerConfig, RwkvConfig, Speech2Text2Config, TransfoXLConfig, TrOCRConfig, XGLMConfig, XLMConfig, XLMProphetNetConfig, XLMRobertaConfig, XLMRobertaXLConfig, XLNetConfig, XmodConfig.

DZ9 commented 1 year ago

same problem

1049451037 commented 1 year ago
pip install git+https://github.com/huggingface/transformers