Closed ryzn0518 closed 1 year ago
查看代码https://github.com/yuanzhoulvpi2017/zero_nlp/blob/main/simple_thu_chatglm6b/infer.ipynb的最下面。
example:
text ="为什么冰红茶和柠檬茶的味道一样?"
with torch.autocast("cuda"):
res, history = model.chat(tokenizer=tokenizer, query=text,max_length=300)
print(res)
在本地执行遇到问题: