1 Star 0 Fork 118

王紫东/MindSpeed-Core-MS

forked from Ascend/MindSpeed-Core-MS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
auto_convert_llm.sh 2.02 KB
一键复制 编辑 原始数据 按行查看 历史
kongziyi 提交于 2025-03-12 11:42 +08:00 . 新增dev分支转换工具
#!/bin/bash
echo "===========================================start convert==========================================="
rm -rf MindSpeed-LLM/
git clone -b 1.0.0 https://gitee.com/ascend/MindSpeed-LLM.git --depth=1
if [ $? -ne 0 ]; then
echo "Error:git clone MindSpeed-LLM failed"
exit 1
fi
echo "------------------------------------done MindSpeed-LLM"
rm -rf MindSpeed/
git clone https://gitee.com/ascend/MindSpeed.git
if [ $? -ne 0 ]; then
echo "Error:git clone MindSpeed failed"
exit 1
fi
cd MindSpeed
git checkout 969686ff
cd ..
echo "...............................................done apply MindSpeed"
rm -rf Megatron-LM/
git clone -b core_r0.6.0 https://github.com/NVIDIA/Megatron-LM.git --depth=1
if [ $? -ne 0 ]; then
echo "Error:git clone Megatron-LM failed"
exit 1
fi
echo "------------------------------------done Megatron-LM"
rm -rf transformers/
git clone -b v4.47.0 https://github.com/huggingface/transformers.git --depth=1
if [ $? -ne 0 ]; then
echo "Error:git clone transformers failed"
exit 1
fi
echo "------------------------------------done transformers"
rm -rf peft/
git clone -b v0.7.1 https://github.com/huggingface/peft.git --depth=1
if [ $? -ne 0 ]; then
echo "Error:git clone peft failed"
exit 1
fi
echo "------------------------------------done peft"
pip install -r requirements.txt
echo "..............................................done install requirements"
python tools/transfer.py --megatron_path Megatron-LM/ --mindspeed_path MindSpeed/ --mindspeed_llm_path MindSpeed-LLM/ \
--transformers_path transformers/ --mindspeed_type LLM
MindSpeed_Core_MS_PATH=$(pwd)
export PYTHONPATH=${MindSpeed_Core_MS_PATH}/msadaptor:${MindSpeed_Core_MS_PATH}/Megatron-LM/:${MindSpeed_Core_MS_PATH}/MindSpeed/:${MindSpeed_Core_MS_PATH}/transformers/src/:$PYTHONPATH
export PYTHONPATH=${MindSpeed_Core_MS_PATH}/peft/src/:$PYTHONPATH
echo "..............................................done set PYTHONPATH"
echo "===========================================finish convert==========================================="
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang_zi_dong/MindSpeed-Core-MS.git
git@gitee.com:wang_zi_dong/MindSpeed-Core-MS.git
wang_zi_dong
MindSpeed-Core-MS
MindSpeed-Core-MS
dev

搜索帮助