Cherrysaber
Cherrysaber
> 加载量化后的int4模型会报错:  `model = AutoModel.from_pretrained("THUDM/chatglm-6b-int4-qe", trust_remote_code=True)` `model.save_pretrained(“./multi_gpus”,max_shard_size='2GB')` 先用python运行上面两行代码,在运行webui就行了,模型路径填 _**“./multi_gpus”**_
> > 加载量化后的int4模型会报错:  > > 这是因为路径不对吧?不过都量化int4了还需要多卡吗? 没有测试。 还是非常必要的,max_tokens直接和显存大小相关,int4模型能记录的上下文在相同配置下,远超正常模型。
> > > 加载量化后的int4模型会报错:  > > > > > > `model = AutoModel.from_pretrained("THUDM/chatglm-6b-int4-qe", trust_remote_code=True)` `model.save_pretrained(“./multi_gpus”,max_shard_size='2GB')` 先用python运行上面两行代码,在运行webui就行了,模型路径填 _**“./multi_gpus”**_ > > 这样确实可以跑起来,但是有出现了新问题 确实是4张卡 > > 错误信息 > > 代码 > >...
> 我也遇到了同样的报错: Expected all tensors to be on the same device, but found at least two devices... > > 使用模数和仓库里的代码都不可以正常运行。模型是从 https://cloud.tsinghua.edu.cn/d/fb9f16d6dc8f482596c2/ 这里下载的。 把整个错误栈贴上来
> > 我也遇到了同样的报错: Expected all tensors to be on the same device, but found at least two devices... > > 使用模数和仓库里的代码都不可以正常运行。模型是从 https://cloud.tsinghua.edu.cn/d/fb9f16d6dc8f482596c2/ 这里下载的。 > > 试一下Cli的demo是否能正常运行。 我windows都是正常的,切到wsl ubuntu就和他们一样报错 我hook了torch.embedding 发现...
> 我也遇到了同样的报错: Expected all tensors to be on the same device, but found at least two devices... > > 使用模数和仓库里的代码都不可以正常运行。模型是从 https://cloud.tsinghua.edu.cn/d/fb9f16d6dc8f482596c2/ 这里下载的。 搞定了,用下面的代码 ``` import os from typing import Dict,...
> > > 我也遇到了同样的报错: Expected all tensors to be on the same device, but found at least two devices... > > > 使用模数和仓库里的代码都不可以正常运行。模型是从 https://cloud.tsinghua.edu.cn/d/fb9f16d6dc8f482596c2/ 这里下载的。 > > > > >...
@xiaoweiweixiao 微调不行,你在一张卡上微调完,在部署到多卡。或者你自己写训练代码,中间把对Tensor操作时都放到同一device再操作
流式响应API接口用websocket实现更好吧 ```python # 类似这样 for response, history in model.stream_chat(tokenizer, query, history=history): msg = await ws.recv() # 继续或者暂停 # 处理相关逻辑 ``` 惰性生成