Langchain-Chatchat
Langchain-Chatchat copied to clipboard
[BUG] 使用 p-tuningv2后的模型,重新加载报错
把p-tunningv2训练完后的相关文件放到了p-tunningv2文件夹下,勾选使用p-tuningv2点重新加载模型,控制台输错错误信息:
The device_map provided does not give any device for the following parameters: transformer.prefix_encoder.embedding.weight
我也有这个错误,请问您解决了吗?
同样这个报错,怎么解决?
我是双卡,是否双卡才会有这个问题?
我也遇到了这个问题,也是p-tuning v2微调后,使用已有的知识库webui报Error,新增知识库webui提示“模型未完成加载,请先在加载模型后再导入文件”,点击重新加载后就报了这个错误
双卡应该有这个问题,可以将models/loader/loader.py 将num_gpus置为1可以正常加载微调后的模型。
num_gpus = torch.cuda.device_count()
- 》 num_gpus = 1
也还是报错捏
加载PrefixEncoder模型参数失败 'ChatGLMModel' object has no attribute 'prefix_encoder'
更新模型fix