mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2026-04-25 01:03:35 +00:00
* update vit example for hybrid plugin * reset tp/pp size * fix dataloader iteration bug * update optimizer passing in evaluation/add grad_accum * change criterion * wrap tqdm * change grad_accum to grad_checkpoint * fix pbar
25 lines
426 B
Bash
25 lines
426 B
Bash
set -xe
|
|
pip install -r requirements.txt
|
|
|
|
export BS=8
|
|
export MEMCAP=0
|
|
export GPUNUM=1
|
|
|
|
for BS in 8 32
|
|
do
|
|
for PLUGIN in "torch_ddp" "torch_ddp_fp16" "low_level_zero" "gemini" "hybrid_parallel"
|
|
do
|
|
|
|
MODEL_PATH="google/vit-base-patch16-224"
|
|
torchrun \
|
|
--standalone \
|
|
--nproc_per_node 4 \
|
|
vit_benchmark.py \
|
|
--model_name_or_path ${MODEL_PATH} \
|
|
--mem_cap ${MEMCAP} \
|
|
--plugin ${PLUGIN} \
|
|
--batch_size ${BS}
|
|
|
|
done
|
|
done
|