mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-02 01:28:31 +00:00
[workflow]New version: Create workflow files for examples' auto check (#2298)
* [workflows]bug_repair * [workflow]new_pr_fixing_bugs Co-authored-by: binmakeswell <binmakeswell@gmail.com>
This commit is contained in:
@@ -1,3 +1 @@
|
||||
colossalai >= 0.1.12
|
||||
torch >= 1.8.1
|
||||
transformers >= 4.231
|
||||
transformers >= 4.23
|
||||
|
16
examples/language/gpt/test_ci.sh
Normal file
16
examples/language/gpt/test_ci.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
pip install -r requirements.txt
|
||||
|
||||
# distplan in ["colossalai", "zero1", "zero2", "torch_ddp", "torch_zero"]
|
||||
export DISTPAN="colossalai"
|
||||
|
||||
# The following options only valid when DISTPAN="colossalai"
|
||||
export TPDEGREE=2
|
||||
export GPUNUM=4
|
||||
export PLACEMENT='cpu'
|
||||
export USE_SHARD_INIT=False
|
||||
export BATCH_SIZE=8
|
||||
export MODEL_TYPE="gpt2_medium"
|
||||
|
||||
|
||||
mkdir -p logs
|
||||
torchrun --standalone --nproc_per_node=${GPUNUM} train_gpt_demo.py --tp_degree=${TPDEGREE} --model_type=${MODEL_TYPE} --batch_size=${BATCH_SIZE} --placement ${PLACEMENT} --shardinit ${USE_SHARD_INIT} --distplan ${DISTPAN} 2>&1 | tee ./logs/${MODEL_TYPE}_${DISTPAN}_gpu_${GPUNUM}_bs_${BATCH_SIZE}_tp_${TPDEGREE}.log
|
Reference in New Issue
Block a user