ModelLink2/examples/legacy/baichuan/ckpt_convert_baichuan_legacy2hf.sh
guoxinjie 670f729060 !1760 整理主线分支 README
Merge pull request !1760 from guoxinjie/arrange_readme
2024-10-25 01:33:31 +00:00

13 lines
515 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 请按照您的真实环境修改 set_env.sh 路径
source /usr/local/Ascend/ascend-toolkit/set_env.sh
python convert_ckpt.py --model-type GPT \
--load-model-type mg \
--save-model-type hf \
--model-type-hf baichuan \
--load-dir ./model_weights/Baichuan-legacy/ \
--target-tensor-parallel-size 1 \
--target-pipeline-parallel-size 1 \
--w-pack True \
--save-dir ./model_from_hf/Baichuan-hf/ # <-- 需要填入原始HF模型路径新权重会存于./model_from_hf/Baichuan-hf/mg2hg/