mirror of
https://gitee.com/ascend/ModelLink.git
synced 2024-12-05 05:17:40 +08:00
parent
9e590514e9
commit
d83d3f0f76
@ -6,8 +6,8 @@ python convert_ckpt.py \
|
||||
--use-mcore-models \
|
||||
--model-type-hf gemma \
|
||||
--model-type GPT \
|
||||
--load-model-type hf \
|
||||
--save-model-type mg \
|
||||
--load-model-type mg \
|
||||
--save-model-type hf \
|
||||
--target-tensor-parallel-size 1 \
|
||||
--target-pipeline-parallel-size 1 \
|
||||
--load-dir ./model_weights/gemma_mcore/ \
|
||||
|
@ -2,12 +2,12 @@
|
||||
source /usr/local/Ascend/ascend-toolkit/set_env.sh
|
||||
|
||||
# 设置并行策略
|
||||
python tools/checkpoint/convert_ckpt.py \
|
||||
python convert_ckpt.py \
|
||||
--use-mcore-models \
|
||||
--model-type-hf gemma2 \
|
||||
--model-type GPT \
|
||||
--load-model-type hf \
|
||||
--save-model-type mg \
|
||||
--load-model-type mg \
|
||||
--save-model-type hf \
|
||||
--post-norm \
|
||||
--target-tensor-parallel-size 1 \
|
||||
--target-pipeline-parallel-size 1 \
|
||||
|
@ -2,7 +2,7 @@
|
||||
source /usr/local/Ascend/ascend-toolkit/set_env.sh
|
||||
|
||||
# 权重格式转换
|
||||
python tools/checkpoint/convert_ckpt.py \
|
||||
python convert_ckpt.py \
|
||||
--model-type-hf chatglm3 \
|
||||
--model-type GPT \
|
||||
--load-model-type hf \
|
||||
|
15
examples/mcore/glm4/ckpt_convert_glm4_mcore2hf.sh
Normal file
15
examples/mcore/glm4/ckpt_convert_glm4_mcore2hf.sh
Normal file
@ -0,0 +1,15 @@
|
||||
# 修改 ascend-toolkit 路径
|
||||
source /usr/local/Ascend/ascend-toolkit/set_env.sh
|
||||
|
||||
# 设置并行策略
|
||||
python convert_ckpt.py \
|
||||
--use-mcore-models \
|
||||
--model-type-hf chatglm3 \
|
||||
--model-type GPT \
|
||||
--load-model-type mg \
|
||||
--save-model-type hf \
|
||||
--add-qkv-bias \
|
||||
--target-tensor-parallel-size 1 \
|
||||
--target-pipeline-parallel-size 1 \
|
||||
--load-dir ./model_weights/glm4_mcore/ \
|
||||
--save-dir ./model_from_hf/glm4_hf/ # 需要填入原始HF模型路径,新权重会存于./model_from_hf/glm4_hf/mg2hg/
|
@ -1,7 +1,7 @@
|
||||
# 请按照您的真实环境修改 set_env.sh 路径
|
||||
source /usr/local/Ascend/ascend-toolkit/set_env.sh
|
||||
|
||||
python tools/checkpoint/convert_ckpt.py \
|
||||
python convert_ckpt.py \
|
||||
--use-mcore-models \
|
||||
--model-type-hf llama2 \
|
||||
--model-type GPT \
|
||||
|
@ -2,7 +2,7 @@
|
||||
source /usr/local/Ascend/ascend-toolkit/set_env.sh
|
||||
|
||||
# 权重格式转换,设置需要的并行配置
|
||||
python tools/checkpoint/convert_ckpt.py \
|
||||
python convert_ckpt.py \
|
||||
--model-type GPT \
|
||||
--load-model-type hf \
|
||||
--save-model-type mg \
|
||||
|
@ -2,7 +2,7 @@
|
||||
source /usr/local/Ascend/ascend-toolkit/set_env.sh
|
||||
|
||||
# 权重格式转换,设置需要的并行配置
|
||||
python tools/checkpoint/convert_ckpt.py \
|
||||
python convert_ckpt.py \
|
||||
--model-type GPT \
|
||||
--load-model-type hf \
|
||||
--save-model-type mg \
|
||||
|
Loading…
Reference in New Issue
Block a user