Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

报错Use `repo_type` argument if needed.

Open forrestneo opened this issue 2 years ago • 4 comments
trafficstars

Traceback (most recent call last): File "/home/zsd/langchain-ChatGLM/knowledge_based_chatglm.py", line 102, in init_cfg(LLM_MODEL, EMBEDDING_MODEL, LLM_HISTORY_LEN) File "/home/zsd/langchain-ChatGLM/knowledge_based_chatglm.py", line 46, in init_cfg chatglm.load_model(model_name_or_path=llm_model_dict[LLM_MODEL]) File "/home/zsd/langchain-ChatGLM/chatglm_llm.py", line 52, in load_model self.tokenizer = AutoTokenizer.from_pretrained( File "/home/zsd/.local/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 619, in from_pretrained tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs) File "/home/zsd/.local/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 463, in get_tokenizer_config resolved_config_file = cached_file( File "/home/zsd/.local/lib/python3.10/site-packages/transformers/utils/hub.py", line 409, in cached_file resolved_file = hf_hub_download( File "/home/zsd/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 112, in _inner_fn validate_repo_id(arg_value) File "/home/zsd/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 160, in validate_repo_id raise HFValidationError( huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/Users/liuqian/Downloads/ChatGLM-6B/chatglm-6b'. Use repo_type argument if needed.

forrestneo avatar Apr 11 '23 16:04 forrestneo

执行 python knowledge_based_chatglm.py的时候

forrestneo avatar Apr 11 '23 16:04 forrestneo

请将代码更新至最新版版本

imClumsyPanda avatar Apr 11 '23 16:04 imClumsyPanda

更新至最新版本也会出现这样的错误v0.1.9

pengyong94 avatar May 04 '23 09:05 pengyong94

是绝对路径的问题 应该改为自己电脑上的路径,上面写的都是我电脑上的路径名

imClumsyPanda avatar May 04 '23 13:05 imClumsyPanda

检查路径是否正确

ykk648 avatar Jul 31 '23 07:07 ykk648