shuxueslpi / chatGLM-6B-QLoRA

使用peft库,对chatGLM-6B/chatGLM2-6B实现4bit的QLoRA高效微调,并做lora model和base model的merge及4bit的量化(quantize)。
350 stars 46 forks source link

ChatGLM2-6B微调后合并报错We need an `offload_dir` to dispatch this model according to this `device_map`, the following submodules need to be offloaded: #46

Closed JuzLEthE closed 10 months ago

JuzLEthE commented 10 months ago

image image peft版本使用0.3.0 和0.4.0都有这个问题

使用的命令是 python3 merge_lora_and_quantize.py \ --lora_path saved_files \ --output_path merged_qlora_model_4bit \ --remote_scripts_dir remote_scripts/chatglm2-6b \ --qbits 4

微调时使用的输出文件夹是 "output_dir": "saved_files" lora_path是正确的 文件夹内只有这些文件 image

JuzLEthE commented 10 months ago

save_strategy改成epoch后再用微调后的结果执行合并还是一样的报错 image

JuzLEthE commented 10 months ago

应该是显存不足导致的 指定--device cpu之后正常了