Chinese-LLaMA-Alpaca icon indicating copy to clipboard operation
Chinese-LLaMA-Alpaca copied to clipboard

合并模型的时候报错

Open Log4J-Ops opened this issue 1 year ago • 6 comments

image image 请问在合并模型的时候报错ValueError: weight is on the meta device, we need a value to put in on cpu如何解决

Log4J-Ops avatar Apr 06 '23 13:04 Log4J-Ops

我们本地测试暂时没遇到过这种错误。 是否和库的缺失有关? 请确认是否安装了accelerate? pip install accelerate

airaria avatar Apr 06 '23 13:04 airaria

您好,accelerate已安装,请问这种情况是否可能是原模型参数中有指定?或者可能跟操作系统为Windows有关?因为在merge_llama_with_chinese_lora.py的参数里加载模型之前并未指定权重的位置

Log4J-Ops avatar Apr 06 '23 14:04 Log4J-Ops

from_pretrained 中加上参数device_map="auto"试试呢

airaria avatar Apr 06 '23 14:04 airaria

同样有该错,谁解决了请提供解决办法

sheerfish999 avatar Apr 09 '23 15:04 sheerfish999

同样有该错,谁解决了请提供解决办法

请问你是使用Windows系统运行的吗,或者是使用了huggingface上的开源llama模型,我猜遇到问题可能是这两个原因中的一个,后续有空我会去验证一下

Log4J-Ops avatar Apr 10 '23 01:04 Log4J-Ops

不 , 我是在linux测试环境, 我使用的是一个已经转换好的33个文件组成的 7b-hf 模型

sheerfish999 avatar Apr 11 '23 14:04 sheerfish999

同样的问题

quanzhang2020 avatar May 17 '23 10:05 quanzhang2020