SCIR-HI / Med-ChatGLM

Repo for Chinese Medical ChatGLM 基于中文医学知识的ChatGLM指令微调
Apache License 2.0
968 stars 156 forks source link

运行infer,py出现问题 #59

Open Pandoravirus-N-T opened 7 months ago

Pandoravirus-N-T commented 7 months ago

你好作者,想请请教一下当我运行代码时出现如下报错是什么原因呢 Traceback (most recent call last): File "C:\Users\Lenovo\Desktop\Med-ChatGLM-main\Med-ChatGLM-main\infer.py", line 4, in tokenizer = AutoTokenizer.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\python\Lib\site-packages\transformers\models\auto\tokenization_auto.py", line 794, in from_pretrained config = AutoConfig.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\python\Lib\site-packages\transformers\models\auto\configuration_auto.py", line 1138, in from_pretrained config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\python\Lib\site-packages\transformers\configuration_utils.py", line 631, in get_config_dict config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\python\Lib\site-packages\transformers\configuration_utils.py", line 686, in _get_config_dict resolved_config_file = cached_file( ^^^^^^^^^^^^ File "D:\python\Lib\site-packages\transformers\utils\hub.py", line 369, in cached_file raise EnvironmentError( OSError: ./model does not appear to have a file named config.json. Checkout 'https://huggingface.co/./model/tree/None' for available files.

Yue-ming-han commented 4 months ago

我也是这个问题,应该是缺了config.json这个文件,但我也还没解决