Closed QTNiCheng closed 1 year ago
transformers的版本如下: pip show transformers Name: transformers Version: 4.34.0.dev0 Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow Home-page: https://github.com/huggingface/transformers Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors) Author-email: transformers@huggingface.co License: Apache 2.0 License Location: c:\users\qtnic\anaconda3\envs\textgen\lib\site-packages Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm Required-by: auto-gptq, optimum, peft
不好意思,最后发现是少下载了tokenizer_config.json文件,重新下载后加载成功了。打扰了,问题可以关闭了。
报错log如下: (textgen) D:\AI_project\HuatuoGPT> python -m huatuo_cli_demo_stream --model-name D:\AI_project\text-generation-webui\models\HuatuoGPT-7B Traceback (most recent call last): File "C:\Users\qtnic\anaconda3\envs\textgen\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\qtnic\anaconda3\envs\textgen\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\AI_project\HuatuoGPT\huatuo_cli_demo_stream.py", line 160, in
main(args)
File "D:\AI_project\HuatuoGPT\huatuo_cli_demo_stream.py", line 117, in main
model, tokenizer = load_model(args.model_name, args.device, args.num_gpus)
File "D:\AI_project\HuatuoGPT\huatuo_cli_demo_stream.py", line 27, in load_model
tokenizer = AutoTokenizer.from_pretrained(model_name, padding_side="right", use_fast=True, trust_remote_code=True)
File "C:\Users\qtnic\anaconda3\envs\textgen\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 764, in from_pretrained
raise ValueError(
ValueError: Unrecognized configuration class <class 'transformers_modules.HuatuoGPT-7B.configuration_baichuan.BaiChuanConfig'> to build an AutoTokenizer.
Model type should be one of AlbertConfig, AlignConfig, BarkConfig, BartConfig, BertConfig, BertGenerationConfig, BigBirdConfig, BigBirdPegasusConfig, BioGptConfig, BlenderbotConfig, BlenderbotSmallConfig, BlipConfig, Blip2Config, BloomConfig, BridgeTowerConfig, CamembertConfig, CanineConfig, ChineseCLIPConfig, ClapConfig, CLIPConfig, CLIPSegConfig, LlamaConfig, CodeGenConfig, ConvBertConfig, CpmAntConfig, CTRLConfig, Data2VecAudioConfig, Data2VecTextConfig, DebertaConfig, DebertaV2Config, DistilBertConfig, DPRConfig, ElectraConfig, ErnieConfig, ErnieMConfig, EsmConfig, FlaubertConfig, FNetConfig, FSMTConfig, FunnelConfig, GitConfig, GPT2Config, GPT2Config, GPTBigCodeConfig, GPTNeoConfig, GPTNeoXConfig, GPTNeoXJapaneseConfig, GPTJConfig, GPTSanJapaneseConfig, GroupViTConfig, HubertConfig, IBertConfig, IdeficsConfig, InstructBlipConfig, JukeboxConfig, LayoutLMConfig, LayoutLMv2Config, LayoutLMv3Config, LEDConfig, LiltConfig, LlamaConfig, LongformerConfig, LongT5Config, LukeConfig, LxmertConfig, M2M100Config, MarianConfig, MBartConfig, MegaConfig, MegatronBertConfig, MgpstrConfig, MobileBertConfig, MPNetConfig, MptConfig, MraConfig, MT5Config, MusicgenConfig, MvpConfig, NezhaConfig, NllbMoeConfig, NystromformerConfig, OneFormerConfig, OpenAIGPTConfig, OPTConfig, OwlViTConfig, PegasusConfig, PegasusXConfig, PerceiverConfig, Pix2StructConfig, PLBartConfig, ProphetNetConfig, QDQBertConfig, RagConfig, RealmConfig, ReformerConfig, RemBertConfig, RetriBertConfig, RobertaConfig, RobertaPreLayerNormConfig, RoCBertConfig, RoFormerConfig, RwkvConfig, Speech2TextConfig, Speech2Text2Config, SpeechT5Config, SplinterConfig, SqueezeBertConfig, SwitchTransformersConfig, T5Config, TapasConfig, TransfoXLConfig, UMT5Config, ViltConfig, VisualBertConfig, VitsConfig, Wav2Vec2Config, Wav2Vec2ConformerConfig, WhisperConfig, XCLIPConfig, XGLMConfig, XLMConfig, XLMProphetNetConfig, XLMRobertaConfig, XLMRobertaXLConfig, XLNetConfig, XmodConfig, YosoConfig.