-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more examples for pipeline parallel inference #11372
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
82f4f7d
add more model exampels for pipelien parallel inference
sgwhat 3f92e9f
add mixtral and vicuna models
sgwhat e3680c3
add yi model and past_kv supprot for chatglm family
sgwhat e8fa2e2
add docs
sgwhat 23602cb
doc update
sgwhat 18288f0
add license
sgwhat ed69985
update
sgwhat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
python/llm/example/GPU/Pipeline-Parallel-Inference/run_codellama_arc_2_card.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
source /opt/intel/oneapi/setvars.sh | ||
export MASTER_ADDR=127.0.0.1 | ||
export MASTER_PORT=9090 | ||
export FI_PROVIDER=tcp | ||
export USE_XETLA=OFF | ||
export OMP_NUM_THREADS=6 | ||
export IPEX_LLM_QUANTIZE_KV_CACHE=1 | ||
if [[ $KERNEL_VERSION != *"6.5"* ]]; then | ||
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 | ||
fi | ||
export TORCH_LLM_ALLREDUCE=0 | ||
|
||
NUM_GPUS=2 # number of used GPU | ||
|
||
# To run CodeLlama-7b-Instruct-hf | ||
CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
generate.py --repo-id-or-model-path 'codellama/CodeLlama-7b-Instruct-hf' --gpu-num $NUM_GPUS | ||
|
||
# To run CodeLlama-13b-Instruct-hf | ||
# CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
# generate.py --repo-id-or-model-path 'codellama/CodeLlama-7b-Instruct-hf' --gpu-num $NUM_GPUS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'codellama/CodeLlama-7b-Instruct-hf' -> 'codellama/CodeLlama-13b-Instruct-hf' |
||
|
||
# To run CodeLlama-34b-Instruct-hf | ||
# CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
# generate.py --repo-id-or-model-path 'codellama/CodeLlama-34b-Instruct-hf' --gpu-num $NUM_GPUS |
21 changes: 21 additions & 0 deletions
21
python/llm/example/GPU/Pipeline-Parallel-Inference/run_mistral_arc_2_card.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
source /opt/intel/oneapi/setvars.sh | ||
export MASTER_ADDR=127.0.0.1 | ||
export MASTER_PORT=9090 | ||
export FI_PROVIDER=tcp | ||
export USE_XETLA=OFF | ||
export OMP_NUM_THREADS=6 | ||
export IPEX_LLM_QUANTIZE_KV_CACHE=1 | ||
if [[ $KERNEL_VERSION != *"6.5"* ]]; then | ||
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 | ||
fi | ||
export TORCH_LLM_ALLREDUCE=0 | ||
|
||
NUM_GPUS=2 # number of used GPU | ||
|
||
# To run Mistral-7B-v0.1 | ||
CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
generate.py --repo-id-or-model-path 'mistralai/Mistral-7B-v0.1' --gpu-num $NUM_GPUS | ||
|
||
# To run Mixtral-8x7B-Instruct-v0.1 | ||
# CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
# generate.py --repo-id-or-model-path 'mistralai/Mixtral-8x7B-Instruct-v0.1' --gpu-num $NUM_GPUS |
17 changes: 17 additions & 0 deletions
17
python/llm/example/GPU/Pipeline-Parallel-Inference/run_solar_arc_2_card.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
source /opt/intel/oneapi/setvars.sh | ||
export MASTER_ADDR=127.0.0.1 | ||
export MASTER_PORT=9090 | ||
export FI_PROVIDER=tcp | ||
export USE_XETLA=OFF | ||
export OMP_NUM_THREADS=6 | ||
export IPEX_LLM_QUANTIZE_KV_CACHE=1 | ||
if [[ $KERNEL_VERSION != *"6.5"* ]]; then | ||
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 | ||
fi | ||
export TORCH_LLM_ALLREDUCE=0 | ||
|
||
NUM_GPUS=2 # number of used GPU | ||
|
||
# To run SOLAR-10.7B-Instruct-v1.0 | ||
CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
generate.py --repo-id-or-model-path 'upstage/SOLAR-10.7B-Instruct-v1.0' --gpu-num $NUM_GPUS |
25 changes: 25 additions & 0 deletions
25
python/llm/example/GPU/Pipeline-Parallel-Inference/run_vicuna_arc_2_card.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
source /opt/intel/oneapi/setvars.sh | ||
export MASTER_ADDR=127.0.0.1 | ||
export MASTER_PORT=9090 | ||
export FI_PROVIDER=tcp | ||
export USE_XETLA=OFF | ||
export OMP_NUM_THREADS=6 | ||
export IPEX_LLM_QUANTIZE_KV_CACHE=1 | ||
if [[ $KERNEL_VERSION != *"6.5"* ]]; then | ||
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 | ||
fi | ||
export TORCH_LLM_ALLREDUCE=0 | ||
|
||
NUM_GPUS=2 # number of used GPU | ||
|
||
# To run vicuna-7b-v1.3 | ||
CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
generate.py --repo-id-or-model-path 'lmsys/vicuna-7b-v1.3' --gpu-num $NUM_GPUS | ||
|
||
# To run vicuna-13b-v1.3 | ||
# CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
# generate.py --repo-id-or-model-path 'lmsys/vicuna-13b-v1.3' --gpu-num $NUM_GPUS | ||
|
||
# To run vicuna-33b-v1.3 | ||
# CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
# generate.py --repo-id-or-model-path 'lmsys/vicuna-33b-v1.3' --gpu-num $NUM_GPUS |
21 changes: 21 additions & 0 deletions
21
python/llm/example/GPU/Pipeline-Parallel-Inference/run_yi_arc_2_card.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
source /opt/intel/oneapi/setvars.sh | ||
export MASTER_ADDR=127.0.0.1 | ||
export MASTER_PORT=9090 | ||
export FI_PROVIDER=tcp | ||
export USE_XETLA=OFF | ||
export OMP_NUM_THREADS=6 | ||
export IPEX_LLM_QUANTIZE_KV_CACHE=1 | ||
if [[ $KERNEL_VERSION != *"6.5"* ]]; then | ||
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 | ||
fi | ||
export TORCH_LLM_ALLREDUCE=0 | ||
|
||
NUM_GPUS=2 # number of used GPU | ||
|
||
# To run Yi-6B-Chat | ||
CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
generate.py --repo-id-or-model-path '01-ai/Yi-6B-Chat' --gpu-num $NUM_GPUS | ||
|
||
# To run Yi-34B-Chat | ||
# CCL_ZE_IPC_EXCHANGE=sockets torchrun --standalone --nnodes=1 --nproc-per-node $NUM_GPUS \ | ||
# generate.py --repo-id-or-model-path '01-ai/Yi-34B-Chat' --gpu-num $NUM_GPUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add license for each script.