Fix ServerArgs when using DP attention #4599
Closed
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.
Motivation
ServerArgs.__post_init__is not idempotent and is called twice when runningbench_offline_throughput, causingchunked_prefill_sizeto be halved multiple times.Additionally, https://github.com/sgl-project/sglang/pull/3964/files#diff-700b5118b493d60d7b5994857f5f1e6a7e842ad702392b8ab199945764dfc8edR1144 caused a port collision. (fixed in #4648 though less robustly)
Modifications
--chunked-prefill-sizeor--schedule-conservativenessvalue if explicitly set. Defaults when runningsglang.launch_serverare unchanged frommain.ServerArgs.__post_init__()idempotent, so that runningsglang.bench_offline_throughputuses the same values assglang.launch_serverPortArgswhen using--enable_dp_attentionResult: This completes and uses default chunked prefill size 4096 on 2 GPUs.
Checklist