python3.7 pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack缺失
Explicitly passing a revision
is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Traceback (most recent call last):
File "api.py", line 54, in
model = AutoModel.from_pretrained("/home/chatglm-6b/ChatGLM-6B/chatglm-6b", trust_remote_code=True).half().cuda()
File "/usr/local/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py", line 467, in from_pretrained
pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
File "/usr/local/lib/python3.7/site-packages/transformers/modeling_utils.py", line 2275, in from_pretrained
f"Error no file named {_add_variant(WEIGHTS_NAME, variant)}, {TF2_WEIGHTS_NAME},"
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory /home/chatglm-6b/ChatGLM-6B/chatglm-6b.
(venv) [root@VM-0-8-centos ChatGLM-6B]# cd /model/