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

15 lines
488 B
Bash

# 修改 ascend-toolkit 路径
source /usr/local/Ascend/ascend-toolkit/set_env.sh
# 设置并行策略
python convert_ckpt.py \
--model-type-hf gemma \
--model-type GPT \
--load-model-type hf \
--save-model-type mg \
--target-tensor-parallel-size 1 \
--target-pipeline-parallel-size 1 \
--params-dtype bf16 \
--load-dir ./model_from_hf/gemma-hf \
--save-dir ./model_weights/gemma-legacy \
--tokenizer-model ./model_from_hf/gemma-hf/tokenizer.model