'list' object has no attribute 'endswith'

#52
by liuair - opened

from transformers import AutoTokenizer, AutoModel
path = "D:\Work Space\glm\chatglm-6b"
tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
model = AutoModel.from_pretrained(path, trust_remote_code=True,from_tf=True).half().cuda()
response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=[])
print(response)

################################################################################

model = AutoModel.from_pretrained(path, trust_remote_code=True,from_tf=True).half().cuda()
File "D:\Anaconda3\envs\paddle_env\lib\site-packages\transformers\models\auto\auto_factory.py", line 466, in from_pretrained
return model_class.from_pretrained(
File "D:\Anaconda3\envs\paddle_env\lib\site-packages\transformers\modeling_utils.py", line 2753, in from_pretrained
if resolved_archive_file.endswith(".index"):
AttributeError: 'list' object has no attribute 'endswith'

Sign up or log in to comment