-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: PeftConfig.__init__() got an unexpected keyword argument '_name_or_path' 报错怎么解决 #1661
Comments
Sorry, I don't understand everything that you wrote. There should be an |
adapter_config.json 如下 |
Thanks. This does not look like a |
Why did you rename If this was originally trained as a PEFT model, ensure that only the PEFT adapter is saved, not the whole model. For instance, don't merge the adapter before saving the model. I can't tell what exactly happened here though, you need to investigate that. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. |
System Info
peft 版本为0.10.0
Who can help?
@pacman100 @younesbelkada @BenjaminBossan @sayakpaul @stevhliu
Information
Tasks
examples
folderReproduction
部署langchain-chatchat 报错提示这个要怎么解决(Baichuan2) root@root1-System-Product-Name:/home/Baichuan2/Langchain-Chatchat# python startup.py -a
==============================Langchain-Chatchat Configuration==============================
操作系统:Linux-6.5.0-27-generic-x86_64-with-glibc2.35.
python版本:3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0]
项目版本:v0.2.10
langchain版本:0.0.354. fastchat版本:0.2.35
当前使用的分词器:ChineseRecursiveTextSplitter
当前启动的LLM模型:['peft-HitoGpt'] @ cuda
{'device': 'cuda',
'host': '0.0.0.0',
'infer_turbo': False,
'model_path': '/home/Baichuan2/Langchain-Chatchat/peft/peft-HitoGpt',
'model_path_exists': True,
'port': 20002}
当前Embbedings模型: bge-large-zh-v1.5 @ cuda
==============================Langchain-Chatchat Configuration==============================
2024-04-18 09:22:08,920 - startup.py[line:655] - INFO: 正在启动服务:
2024-04-18 09:22:08,920 - startup.py[line:656] - INFO: 如需查看 llm_api 日志,请前往 /home/Baichuan2/Langchain-Chatchat/logs
/root/anaconda3/envs/Baichuan2/lib/python3.10/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: 模型启动功能将于 Langchain-Chatchat 0.3.x重写,支持更多模式和加速启动,0.2.x中相关功能将废弃
warn_deprecated(
2024-04-18 09:22:11 | ERROR | stderr | INFO: Started server process [44838]
2024-04-18 09:22:11 | ERROR | stderr | INFO: Waiting for application startup.
2024-04-18 09:22:11 | ERROR | stderr | INFO: Application startup complete.
2024-04-18 09:22:11 | ERROR | stderr | INFO: Uvicorn running on http://0.0.0.0:20000 (Press CTRL+C to quit)
2024-04-18 09:22:11 | ERROR | stderr | Process model_worker - peft-HitoGpt:
2024-04-18 09:22:11 | ERROR | stderr | Traceback (most recent call last):
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
2024-04-18 09:22:11 | ERROR | stderr | self.run()
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/multiprocessing/process.py", line 108, in run
2024-04-18 09:22:11 | ERROR | stderr | self._target(*self._args, **self._kwargs)
2024-04-18 09:22:11 | ERROR | stderr | File "/home/Baichuan2/Langchain-Chatchat/startup.py", line 389, in run_model_worker
2024-04-18 09:22:11 | ERROR | stderr | app = create_model_worker_app(log_level=log_level, **kwargs)
2024-04-18 09:22:11 | ERROR | stderr | File "/home/Baichuan2/Langchain-Chatchat/startup.py", line 217, in create_model_worker_app
2024-04-18 09:22:11 | ERROR | stderr | worker = ModelWorker(
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/site-packages/fastchat/serve/model_worker.py", line 66, in init
2024-04-18 09:22:11 | ERROR | stderr | super().init(
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/site-packages/fastchat/serve/base_model_worker.py", line 47, in init
2024-04-18 09:22:11 | ERROR | stderr | self.conv = self.make_conv_template(conv_template, model_path)
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/site-packages/fastchat/serve/base_model_worker.py", line 75, in make_conv_template
2024-04-18 09:22:11 | ERROR | stderr | conv = get_conversation_template(model_path)
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/site-packages/fastchat/model/model_adapter.py", line 376, in get_conversation_template
2024-04-18 09:22:11 | ERROR | stderr | return adapter.get_default_conv_template(model_path)
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/site-packages/fastchat/model/model_adapter.py", line 654, in get_default_conv_template
2024-04-18 09:22:11 | ERROR | stderr | config = PeftConfig.from_pretrained(model_path)
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/site-packages/peft/config.py", line 151, in from_pretrained
2024-04-18 09:22:11 | ERROR | stderr | return cls.from_peft_type(**kwargs)
2024-04-18 09:22:11 | ERROR | stderr | File "/root/anaconda3/envs/Baichuan2/lib/python3.10/site-packages/peft/config.py", line 118, in from_peft_type
2024-04-18 09:22:11 | ERROR | stderr | return config_cls(**kwargs)
2024-04-18 09:22:11 | ERROR | stderr | TypeError: PeftConfig.init() got an unexpected keyword argument '_name_or_path'
Expected behavior
帮助我解决问题
The text was updated successfully, but these errors were encountered: