-
Notifications
You must be signed in to change notification settings - Fork 40
Support TensorRT-LLM Uses FlexKV in Multi-node Tensor Parallelism #53
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e6925e7
Init commit for trtllm+flexkv in tp16 mode
axxx03 dcaf856
Init commit for trtllm+flexkv in tp16 mode
axxx03 ff9f10b
remove rank info from model_config
axxx03 645e38d
fix some
axxx03 742f58a
fix tp16 support
axxx03 d69e69e
fix
axxx03 16d611b
Add the "FlEXKV_" prefix
axxx03 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 hidden or 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
This file contains hidden or 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,54 @@ | ||
| BATCH_SIZE=4 | ||
| TP_SIZE=16 | ||
| EP_SIZE=$TP_SIZE | ||
| MAX_SEQ_LEN=155648 | ||
| MAX_NUM_TOKENS=16384 | ||
| # MAX_SEQ_LEN=8192 | ||
| # MAX_NUM_TOKENS=8192 | ||
| HOSTFILE=YOUR_HOSTFILE | ||
| MODEL_PATH=${1:-YOUR_MODEL_PATH} | ||
|
|
||
| export FLEXKV_CONFIG_PATH=$(realpath "./flexkv_config.json") | ||
| export TENSORRT_LLM_USE_FLEXKV=1 | ||
| export FLEXKV_MASTER_HOST="172.16.0.30" | ||
| export FLEXKV_MASTER_PORTS="5556,5557,5558" | ||
| export FLEXKV_TRT_SUBPROCESS_HOST="172.16.0.30" | ||
| export FLEXKV_TRT_SUBPROCESS_PORTS="6667,6668,6669" | ||
| export TLLM_LOG_FIRST_RANK_ONLY=0 | ||
|
|
||
| mpirun -np 16 \ | ||
| --hostfile $HOSTFILE \ | ||
| -mca plm_rsh_args "-p 9898" \ | ||
| -mca btl tcp,self \ | ||
| -mca btl_tcp_if_include eth0 \ | ||
| -x CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \ | ||
| -x GLOO_SOCKET_IFNAME=eth0 \ | ||
| -x NCCL_DEBUG=INFO \ | ||
| -x NCCL_IBEXT_DISABLE=0 \ | ||
| -x NCCL_IB_GID_INDEX=3 \ | ||
| -x NCCL_IB_DISABLE=0 \ | ||
| -x NCCL_NET_GDR_LEVEL=2 \ | ||
| -x NCCL_IB_QPS_PER_CONNECTION=4 \ | ||
| -x NCCL_IB_TC=160 \ | ||
| -x NCCL_IB_TIMEOUT=22 \ | ||
| -x NCCL_SOCKET_IFNAME=eth0 \ | ||
| -x OMPI_MCA_btl=tcp,self \ | ||
| -x OMPI_MCA_btl_tcp_if_include=eth0 \ | ||
| -x FLEXKV_CONFIG_PATH \ | ||
| -x TENSORRT_LLM_USE_FLEXKV \ | ||
| -x FLEXKV_MASTER_HOST \ | ||
| -x FLEXKV_MASTER_PORTS \ | ||
| -x TLLM_LOG_FIRST_RANK_ONLY \ | ||
| -x FLEXKV_TRT_SUBPROCESS_HOST \ | ||
| -x FLEXKV_TRT_SUBPROCESS_PORTS \ | ||
| --allow-run-as-root \ | ||
| trtllm-llmapi-launch trtllm-serve $MODEL_PATH \ | ||
| --host 0.0.0.0 \ | ||
| --port 6000 \ | ||
| --backend pytorch \ | ||
| --tp_size $TP_SIZE \ | ||
| --ep_size $EP_SIZE \ | ||
| --max_seq_len $MAX_SEQ_LEN \ | ||
| --max_num_tokens $MAX_NUM_TOKENS \ | ||
| --max_batch_size $BATCH_SIZE \ | ||
| --extra_llm_api_options extra-llm-api-config.yml |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.