ipex-llm/python/llm/example/GPU/Deepspeed-AutoTP/run.sh
Yang Wang 067c7e8098 Support deepspeed AutoTP (#9230)
* Support deepspeed

* add test script

* refactor convert

* refine example

* refine

* refine example

* fix style

* refine example and adapte latest ipex

* fix style
2023-10-24 23:46:28 -07:00

12 lines
389 B
Bash

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