holk-h / CyberFriend

CyberFriend: 你的赛博群友,一个模仿现代互联网聊天风格,会说人话,会调用工具的群聊 bot。
MIT License
24 stars 2 forks source link

huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': './finetune_demo/output/checkpoint-3000'. Use `repo_type` argument if needed. #1

Closed Ch180907 closed 1 month ago

Ch180907 commented 2 months ago

部署完LLM模型后,运行出现下面错误: Traceback (most recent call last): File "C:\Users\admin.conda\envs\nonebot\lib\site-packages\peft\config.py", line 197, in _get_peft_type config_file = hf_hub_download( File "C:\Users\admin.conda\envs\nonebot\lib\site-packages\huggingface_hub\utils_validators.py", line 111, in _inner_fn validate_repo_id(arg_value) File "C:\Users\admin.conda\envs\nonebot\lib\site-packages\huggingface_hub\utils_validators.py", line 159, in validate_repo_id raise HFValidationError( huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': './finetune_demo/output/checkpoint-3000'. Use repo_type argument if needed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\CH\Project\CyberFriend\CyberFriend_LLM_core\api_server.py", line 508, in model = PeftModel.from_pretrained(omodel, "./finetune_demo/output/checkpoint-3000") File "C:\Users\admin.conda\envs\nonebot\lib\site-packages\peft\peft_model.py", line 328, in from_pretrained PeftConfig._get_peft_type( File "C:\Users\admin.conda\envs\nonebot\lib\site-packages\peft\config.py", line 203, in _get_peft_type raise ValueError(f"Can't find '{CONFIG_NAME}' at '{model_id}'") 修改为绝对路径并没有解决问题

holk-h commented 1 month ago

修改模型路径即可