ipex-llm/python/llm/example/GPU/Deepspeed-AutoTP/run.sh
Yang Wang 8838707009 Add deepspeed autotp example readme (#9289)
* Add deepspeed autotp example readme

* change word
2023-10-27 13:04:38 -07:00

13 lines
424 B
Bash

source bigdl-llm-init -t -g
export MASTER_ADDR=127.0.0.1
export CCL_ZE_IPC_EXCHANGE=sockets
NUM_GPUS=4
if [[ -n $OMP_NUM_THREADS ]]; then
export OMP_NUM_THREADS=$(($OMP_NUM_THREADS / $NUM_GPUS))
else
export OMP_NUM_THREADS=$(($(nproc) / $NUM_GPUS))
fi
torchrun --standalone \
--nnodes=1 \
--nproc-per-node $NUM_GPUS \
deepspeed_autotp.py --repo-id-or-model-path "meta-llama/Llama-2-7b-hf"