export PYTHONPATH=/home/megatron-deepspeed_dtk23.04::$PYTHONPATH
CHECKPOINT_PATH=/home/megatron-deepspeed-dtk23.04/checkopints/gpt2-4tp/global_step1000
OUTPUT_PATH=./checkopints/megatron-1tp

python tools/convert_checkpoint/deepspeed_to_deepspeed.py \
  --input_folder $CHECKPOINT_PATH \
  --output_folder ./conver-model-deepspeed-1tp \
  --target_tp 1 \
  --target_pp 1

python tools/convert_checkpoint/deepspeed_to_megatron.py \
  --input_folder ./conver-model-deepspeed-1tp/global_step1000 \
  --output_folder $OUTPUT_PATH \
  --target_tp 1 \
  --target_pp 1
