mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 12:10:09 +01:00
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12555222 * add convert megatron ckpt script
8 lines
266 B
Bash
8 lines
266 B
Bash
TARGET_TENSOR_MODEL_PARALLEL_SIZE=1
|
|
ORIGIN_MODEL='damo/nlp_gpt3_text-generation_1.3B'
|
|
TARGET_DIR='./target'
|
|
|
|
torchrun --nproc_per_node $TARGET_TENSOR_MODEL_PARALLEL_SIZE tools/convert_megatron_ckpt.py \
|
|
--model_dir $ORIGIN_MODEL \
|
|
--target_dir $TARGET_DIR \
|