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

15 lines
550 B
Bash

# 请按照您的真实环境修改 set_env.sh 路径
source /usr/local/Ascend/ascend-toolkit/set_env.sh
python convert_ckpt.py \
--model-type GPT \
--loader megatron \
--saver megatron \
--load-dir ./model_weights/llama-2-7b-hf-v0.1-tp8-pp1/ \
--lora-load ./ckpt/llama-2-7b-lora \
--lora-r 8 \
--lora-alpha 16 \
--lora-target-modules query_key_value dense dense_h_to_4h dense_4h_to_h \
--target-tensor-parallel-size 1 \
--target-pipeline-parallel-size 1 \
--save-dir ./model_weights/llama2-7b-lora2legacy