Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

在启动项目的时候如何使用到多张gpu啊?

Open includepanda opened this issue 1 year ago • 3 comments

在启动项目的时候如何使用到多张gpu啊?

includepanda avatar Jun 02 '23 10:06 includepanda

启动时如果判断torch.cuda.is_available返回为Ture且有多卡会自动把模型分配在多卡中运行

imClumsyPanda avatar Jun 02 '23 13:06 imClumsyPanda

vicuna使用本地模型启动,单卡没问题,双卡就出现 ValueError: The device_map provided does not give any device for the following parameters: model.embed_tokens.weight, model.layers.0.self_attn.q_proj.weight,

启动时如果判断torch.cuda.is_available返回为Ture且有多卡会自动把模型分配在多卡中运行

elven2016 avatar Jun 09 '23 07:06 elven2016

启动时如果判断torch.cuda.is_available返回为Ture且有多卡会自动把模型分配在多卡中运行

https://github.com/imClumsyPanda/langchain-ChatGLM/commit/33bbb4779e373602cb8cfa984b2e4e8342f62a75 这个commit把chatglm_llm.py多卡部署的代码删了

wlb666 avatar Jun 12 '23 05:06 wlb666

vicuna使用本地模型启动,单卡没问题,双卡就出现 ValueError: The device_map provided does not give any device for the following parameters: model.embed_tokens.weight, model.layers.0.self_attn.q_proj.weight,

启动时如果判断torch.cuda.is_available返回为Ture且有多卡会自动把模型分配在多卡中运行

@elven2016 请问这个问题解决了吗

haoyu-lab avatar Jul 04 '23 07:07 haoyu-lab