-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift 3.0 微调后量化用swift export 错误 #2949
Comments
merge lora和量化的步骤分开 |
optimum autogptq和swift版本是什么 |
你试试使用swift main分支是否存在这个问题 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
使用
CUDA_VISIBLE_DEVICES=0 swift export --quant_bits 4
--quant_method gptq
--ckpt_dir /train_model_output/Qwen2-VL-7B-Instruct/v0-20250120-171651/checkpoint-30
--merge_lora true --load_dataset_config true
--output_dir /train_model_output/Qwen2-VL-7B-Instruct-GPTQ-int4
报错信息是
Traceback (most recent call last):
File "/root/syh/qwen2vl_sft/ms-swift/swift/cli/export.py", line 5, in
export_main()
File "/root/syh/qwen2vl_sft/ms-swift/swift/llm/export/export.py", line 42, in export_main
return SwiftExport(args).main()
File "/root/syh/qwen2vl_sft/ms-swift/swift/llm/base.py", line 46, in main
result = self.run()
File "/root/syh/qwen2vl_sft/ms-swift/swift/llm/export/export.py", line 25, in run
merge_lora(args)
File "/root/syh/qwen2vl_sft/ms-swift/swift/llm/export/merge_lora.py", line 16, in merge_lora
assert args.quant_method is None, (f'args.quant_method: {args.quant_method}, '
AssertionError: args.quant_method: gptq, quantized model and does not support merge-lora.
查了一下源码,https://github.com/modelscope/ms-swift/blob/main/swift/llm/export/merge_lora.py#L16, 这里不允许--quant_method参数输入值,于是注释了这行,强制让replace_if_exists=True, 代码可以执行,但是转出来的模型没有量化过,占用的显存和量化前是一样的。
好奇,大家都可以执行成功吗?
The text was updated successfully, but these errors were encountered: