KinokoY
KinokoY
> > 您可以根据需要修改cli_demo.py。 > > > 哦,我知道了,因为构建模型的时候就放在cuda上了……暂时只能这样改: > > 把cli_demo.py这段代码: > > ```python > > # load model > > model, model_args = AutoModel.from_pretrained( > > args.from_pretrained, > > args=argparse.Namespace(...
try pip install transformers==4.33.0
> 把这行代码直接改成device='cuda': > > https://github.com/THUDM/VisualGLM-6B/blob/main/cli_demo.py#L36 改了之后还是同样的报错,然后这两天试的时候还有个新的问题,用QLora微调的话会报: Build 4bit layer failed. You need to install the latest bitsandbytes. Try `pip install bitsandbytes`. (使用的还是bitsandbytes==0.39.0) 按照报错信息更新了bitsandbytes之后QLora可以跑通,但是加载微调后的模型还是会报TypeError: object of type 'QuantState' has no len()