THUDM / VisualGLM-6B

Chinese and English multimodal conversational language model | 多模态中英双语对话语言模型
Apache License 2.0
4.07k stars 414 forks source link

在运行示例代码时报错round up函数未定义 #306

Open buptsdz opened 10 months ago

buptsdz commented 10 months ago

这是我的代码,自己新建的一个py文件,用的是给的hug的示例,我已经把模型下载到本地: from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("visualglm-6b", trust_remote_code=True) model = AutoModel.from_pretrained("visualglm-6b", trust_remote_code=True).quantize(4).half().cuda() model = model.eval() image_path = "./examples/1.jpeg" response, history = model.chat(tokenizer, image_path, "描述这张图片。", history=[]) print(response) response, history = model.chat(tokenizer, image_path, "这张图片可能是在什么场所拍摄的?", history=history) print(response)

下载的模型放在这个文件夹中 1698728491450

报错信息 1698728550640

我的cuda是11.6版本,torch和torchvision对应的版本也没问题

请大神帮忙看看