
2024/9/6 Swift框架下模型训练和推理
需要修改infer.sh中路径为训练模型的输出路径----ckpt_dir "/mnt/workspace/swift/examples/pytorch/llm/output/qwen-7b-chat-int8/v0-20240906-094214/checkpoint-100" \。一、qwen_7b_chat_int8。
·
一、qwen_7b_chat_int8
git clone https://github.com/modelscope/swift.git
1,swift框架下文件路径:
/swift/examples/pytorch/llm/scripts/qwen_7b_chat_int8/qlora/sft.sh
/swift/swift/llm/utils/dataset.py
/swift/swift/llm/sft.py
2,训练:
bash scripts/qwen_7b_chat_int8/qlora/sft.sh
3,推理:
需要修改infer.sh中路径为训练模型的输出路径----ckpt_dir "/mnt/workspace/swift/examples/pytorch/llm/output/qwen-7b-chat-int8/v0-20240906-094214/checkpoint-100" \
bash scripts/qwen_7b_chat_int8/qlora/infer.sh
更多推荐
所有评论(0)