!1663 权重转换参数更正

Merge pull request !1663 from yuhui/param_fix
This commit is contained in:
yuhui 2024-09-13 01:02:14 +00:00 committed by i-robot
parent 9e590514e9
commit d83d3f0f76
7 changed files with 24 additions and 9 deletions

View File

@ -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/ \

View File

@ -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 \

View File

@ -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 \

View 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/

View File

@ -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 \

View File

@ -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 \

View File

@ -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 \