mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-10 04:18:05 +00:00
* [gemini] remove distributed-related part from colotensor (#4379) * [gemini] remove process group dependency * [gemini] remove tp part from colo tensor * [gemini] patch inplace op * [gemini] fix param op hook and update tests * [test] remove useless tests * [test] remove useless tests * [misc] fix requirements * [test] fix model zoo * [test] fix model zoo * [test] fix model zoo * [test] fix model zoo * [test] fix model zoo * [misc] update requirements * [gemini] refactor gemini optimizer and gemini ddp (#4398) * [gemini] update optimizer interface * [gemini] renaming gemini optimizer * [gemini] refactor gemini ddp class * [example] update gemini related example * [example] update gemini related example * [plugin] fix gemini plugin args * [test] update gemini ckpt tests * [gemini] fix checkpoint io * [example] fix opt example requirements * [example] fix opt example * [example] fix opt example * [example] fix opt example * [gemini] add static placement policy (#4443) * [gemini] add static placement policy * [gemini] fix param offload * [test] update gemini tests * [plugin] update gemini plugin * [plugin] update gemini plugin docstr * [misc] fix flash attn requirement * [test] fix gemini checkpoint io test * [example] update resnet example result (#4457) * [example] update bert example result (#4458) * [doc] update gemini doc (#4468) * [example] update gemini related examples (#4473) * [example] update gpt example * [example] update dreambooth example * [example] update vit * [example] update opt * [example] update palm * [example] update vit and opt benchmark * [hotfix] fix bert in model zoo (#4480) * [hotfix] fix bert in model zoo * [test] remove chatglm gemini test * [test] remove sam gemini test * [test] remove vit gemini test * [hotfix] fix opt tutorial example (#4497) * [hotfix] fix opt tutorial example * [hotfix] fix opt tutorial example
26 lines
801 B
Bash
26 lines
801 B
Bash
set -x
|
|
# distplan in ["CAI_ZeRO1", "CAI_ZeRO2", "CAI_Gemini", "Pytorch_DDP", "Pytorch_ZeRO"]
|
|
export DISTPLAN=${DISTPLAN:-"CAI_Gemini"}
|
|
|
|
# The following options only valid when DISTPLAN="colossalai"
|
|
export GPUNUM=${GPUNUM:-1}
|
|
export BATCH_SIZE=${BATCH_SIZE:-16}
|
|
export MODEL_TYPE=${MODEL_TYPE:-"gpt2_medium"}
|
|
export TRAIN_STEP=${TRAIN_STEP:-10}
|
|
# export PYTHONPATH=$PWD:$PYTHONPATH
|
|
|
|
if [ ${USE_SHARD_INIT} = "True" ]; then
|
|
USE_SHARD_INIT="--shardinit"
|
|
else
|
|
USE_SHARD_INIT=""
|
|
fi
|
|
|
|
mkdir -p gemini_logs
|
|
|
|
torchrun --standalone --nproc_per_node=${GPUNUM} ./train_gpt_demo.py \
|
|
--model_type=${MODEL_TYPE} \
|
|
--batch_size=${BATCH_SIZE} \
|
|
--distplan=${DISTPLAN} \
|
|
--train_step=${TRAIN_STEP} \
|
|
2>&1 | tee ./gemini_logs/${MODEL_TYPE}_${DISTPLAN}_gpu_${GPUNUM}_bs_${BATCH_SIZE}_tp_${TPDEGREE}_${PLACEMENT}.log
|