-
Notifications
You must be signed in to change notification settings - Fork 665
[Feature] [PD Disaggregation] simplify configuration for pd-disaggregated deployment, and refactor post-init and usage for all ports #5415
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
Open
liyonghua0910
wants to merge
19
commits into
PaddlePaddle:develop
Choose a base branch
from
liyonghua0910:develop+simplify_pd_config_1206
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
209bce3
[feat] simplify configuration for pd-disaggregated deployment, and re…
liyonghua0910 29a0ee5
[fix] fix some bugs
liyonghua0910 9d216c0
Merge remote-tracking branch 'upstream/develop' into develop+simplify…
liyonghua0910 47a86a8
[fix] fix rdma port for cache manager/messager
liyonghua0910 f07c2e0
[fix] temporarily cancel port availability check to see if it can pas…
liyonghua0910 cb2e618
[feat] simplify args for multi api server
liyonghua0910 9c9a660
[fix] fix dp
liyonghua0910 b3fec44
[fix] fix port for xpu
liyonghua0910 8ceb83c
[fix] add tests for ports post processing & fix ci
liyonghua0910 c2bc5d6
[test] fix test_multi_api_server
liyonghua0910 32fa9e8
[fix] fix rdma_comm_ports args for multi_api_server
liyonghua0910 d1ab65c
[fix] fix test_common_engine
liyonghua0910 1832afb
[fix] fix test_cache_transfer_manager
liyonghua0910 d520838
[chore] automatically setting FD_ENABLE_MULTI_API_SERVER
liyonghua0910 555044f
Merge remote-tracking branch 'upstream/develop' into develop+simplify…
liyonghua0910 624d02f
[fix] avoid api server from creating engine_args twice
liyonghua0910 d164731
[fix] fix test_run_batch
liyonghua0910 1fb86eb
[fix] fix test_metrics
liyonghua0910 7d4ff93
[fix] fix splitwise connector init
liyonghua0910 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
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,82 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| # Test splitwise deployment | ||
| # There are two methods for splitwise deployment: | ||
| # v0: using splitwise_scheduler or dp_scheduler | ||
| # v1: using local_scheduler + router | ||
|
|
||
| # prepare environment | ||
| export MODEL_NAME="PaddlePaddle/ERNIE-4.5-0.3B-Paddle" | ||
| export FD_DEBUG=1 | ||
| export ENABLE_V1_KVCACHE_SCHEDULER=1 | ||
| export KVCACHE_GDRCOPY_FLUSH_ENABLE=1 | ||
|
|
||
| SCRIPT_PATH=$(readlink -f "$0") | ||
| SCRIPT_DIR=$(dirname "$SCRIPT_PATH") | ||
| source ${SCRIPT_DIR}/utils.sh | ||
|
|
||
| unset http_proxy && unset https_proxy | ||
|
|
||
| P_PORT=52400 | ||
| D_PORT=52500 | ||
| ROUTER_PORT=52700 | ||
| LOG_DATE=$(date +%Y%m%d_%H%M%S) | ||
|
|
||
| ports=($P_PORT $D_PORT $ROUTER_PORT) | ||
| check_ports "${ports[@]}" || { | ||
| echo "❌ Some ports are in use. Please release them." | ||
| exit 1 | ||
| } | ||
|
|
||
| # start router | ||
| export FD_LOG_DIR="log/$LOG_DATE/router" | ||
| rm -rf ${FD_LOG_DIR} && mkdir -p ${FD_LOG_DIR} | ||
|
|
||
| nohup python -m fastdeploy.router.launch \ | ||
| --port ${ROUTER_PORT} \ | ||
| --splitwise \ | ||
| 2>&1 >${FD_LOG_DIR}/nohup & | ||
|
|
||
| # start prefill | ||
| export CUDA_VISIBLE_DEVICES=0,1 | ||
| export FD_LOG_DIR="log/$LOG_DATE/prefill" | ||
| rm -rf ${FD_LOG_DIR} && mkdir -p ${FD_LOG_DIR} | ||
|
|
||
| nohup python -m fastdeploy.entrypoints.openai.api_server \ | ||
| --model ${MODEL_NAME} \ | ||
| --port "${P_PORT}" \ | ||
| --tensor-parallel-size 2 \ | ||
| --splitwise-role "prefill" \ | ||
| --router "0.0.0.0:${ROUTER_PORT}" \ | ||
| 2>&1 >${FD_LOG_DIR}/nohup & | ||
|
|
||
| wait_for_health ${P_PORT} | ||
|
|
||
| # start decode | ||
| export CUDA_VISIBLE_DEVICES=2,3 | ||
| export FD_LOG_DIR="log/$LOG_DATE/decode" | ||
| rm -rf ${FD_LOG_DIR} && mkdir -p ${FD_LOG_DIR} | ||
|
|
||
| nohup python -m fastdeploy.entrypoints.openai.api_server \ | ||
| --model ${MODEL_NAME} \ | ||
| --port "${D_PORT}" \ | ||
| --tensor-parallel-size 2 \ | ||
| --splitwise-role "decode" \ | ||
| --router "0.0.0.0:${ROUTER_PORT}" \ | ||
| 2>&1 >${FD_LOG_DIR}/nohup & | ||
|
|
||
| wait_for_health ${D_PORT} | ||
|
|
||
| # send request | ||
| sleep 10 # make sure server is registered to router | ||
| echo "send request..." | ||
| curl -X POST "http://0.0.0.0:${ROUTER_PORT}/v1/chat/completions" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "messages": [ | ||
| {"role": "user", "content": "hello"} | ||
| ], | ||
| "max_tokens": 100, | ||
| "stream": false | ||
| }' |
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.
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.