https://github.com/modelscope/ms-swift/blob/main/swift/llm/utils/model.py#L812
上述链接是swift官方文档给出的报错代码。目的是为了检测是否存在awq_ext
量化前一般都安装了
pip install autoawq -U
这个是量化模型必须的,
但是在使用下面代码进行Qlora微调时
# awq
CUDA_VISIBLE_DEVICES=0 swift sft \
--model_type qwen1half-7b-chat \
--model_id_or_path qwen1half-7b-chat-awq-int4 \
--quant_method awq \
--sft_type lora \
--dataset alpaca-zh#5000 \
出现报错,You are training awq models, remember installing awq_ext by '
'`git clone https://github.com/casper-hansen/AutoAWQ_kernels '
'&& cd AutoAWQ_kernels && pip install -e .