尝试使用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.
尝试使用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.