ms-swift
ms-swift copied to clipboard
微调后怎么转回原来基座的格式
Describe the feature 微调后的模型面目全非,huggingface再也load不进去了。vllm等加速框架也用不了了
Paste any useful information 微调完的是adapter_model.safetensors文件,我给他强制改为model.safetensors,然后覆盖到原来的基座的文件夹中 结果load进来,推理完全不对。
Additional context 求方法,怎么转回去。
我的天,为什么一定要包一层呢?麻烦给一个模型转回去到基座的方法,下面这种很难接受啊。
CUDA_VISIBLE_DEVICES=1 swift deploy --model_type qwen1half-7b-chat --model_cache_dir /data/ssd/LLM_models/qwen/Qwen1.5-7B-Chat --infer_backend vllm --use_flash_attn true --host 0.0.0.0 --port 8000 --max_new_tokens 512 --temperature 0.3 --top_p 0.7 --repetition_penalty 1.0
请问这是我需要的嘛? LoRA fine-tuned:
CUDA_VISIBLE_DEVICES=0 swift export
--ckpt_dir xxx/checkpoint-xxx --load_dataset_config true
--quant_method awq --quant_bits 4
--merge_lora true \
是的, 但是有个bug: https://github.com/modelscope/swift/issues/841
正在修复