Skip to content

[PD] Remove unused server args for disaggregation#19618

Merged
ShangmingCai merged 3 commits intomainfrom
remove_pd_unused
Mar 2, 2026
Merged

[PD] Remove unused server args for disaggregation#19618
ShangmingCai merged 3 commits intomainfrom
remove_pd_unused

Conversation

@ShangmingCai
Copy link
Copy Markdown
Collaborator

@ShangmingCai ShangmingCai commented Mar 1, 2026

Motivation

We don't need these server args (since decode nodes can get these info from bootstrap servers, prefill can get these info from register info), they are not used for all backends, and will cause misunderstanding for open-source users.

image

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

Review Process

  1. Ping Merge Oncalls to start the PR flow. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • /tag-run-ci-label, /rerun-failed-ci, /tag-and-rerun-ci
  4. After green CI and required approvals, ask Merge Oncalls to merge.

Signed-off-by: Shangming Cai <csmthu@gmail.com>
Signed-off-by: Shangming Cai <csmthu@gmail.com>
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 1, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the disaggregation feature by removing obsolete server configuration parameters and their corresponding code references. The changes simplify the codebase and documentation, making the disaggregation setup cleaner and easier to manage without impacting functionality, as the removed arguments were no longer in use.

Highlights

  • Removed Unused Server Arguments: The pull request eliminates several server arguments related to disaggregation, specifically --disaggregation-decode-tp, --disaggregation-decode-dp, and --disaggregation-prefill-pp, which were no longer utilized in the system.
  • Codebase Cleanup: Associated code references to these removed arguments have been cleaned up across various files, including the KVArgs class, DecodeServer and PrefillServer initializations, and the Scheduler's disaggregation setup.
  • Documentation Update: The documentation for server arguments has been updated to reflect the removal of the obsolete disaggregation parameters, ensuring accuracy and reducing confusion for users.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/advanced_features/server_arguments.md
    • Removed documentation entries for --disaggregation-decode-tp, --disaggregation-decode-dp, and --disaggregation-prefill-pp.
  • python/sglang/srt/disaggregation/base/conn.py
    • Removed the decode_tp_size attribute from the KVArgs class.
  • python/sglang/srt/disaggregation/decode.py
    • Removed prefill_pp_size from the __init__ method parameters and its subsequent assignments.
    • Removed the assignment of kv_args.prefill_pp_size in _init_kv_manager.
  • python/sglang/srt/disaggregation/prefill.py
    • Removed decode_tp_size and decode_dp_size from the __init__ method parameters and their subsequent assignments.
    • Removed the assignments of kv_args.decode_tp_size and kv_args.prefill_pp_size in _init_kv_manager.
  • python/sglang/srt/managers/scheduler.py
    • Removed the prefill_pp_size argument during DecodeServer initialization.
    • Removed the decode_tp_size and decode_dp_size arguments during PrefillServer initialization.
  • python/sglang/srt/server_args.py
    • Removed disaggregation_decode_tp, disaggregation_decode_dp, and disaggregation_prefill_pp attributes from the ServerArgs class.
    • Removed assertions and assignments related to these arguments within the _handle_pd_disaggregation method.
    • Removed the add_argument calls for these parameters in the add_cli_args function.
    • Removed the validate_disagg_tp_size method.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively removes several unused server arguments related to disaggregation, which simplifies the configuration. The changes are consistently applied across the argument parsing logic, documentation, and their usage sites in the scheduler and disaggregation modules. I have one minor suggestion to ensure the removal is complete and to prevent potential issues.

I am having trouble creating individual review comments. Click here to see my feedback.

python/sglang/srt/disaggregation/prefill.py (138-139)

medium

While you've removed the assignments to kv_args.decode_tp_size and kv_args.prefill_pp_size, it seems prefill_pp_size might still be present in the KVArgs class definition in python/sglang/srt/disaggregation/base/conn.py. For completeness and to avoid potential AttributeError if it's accessed elsewhere unexpectedly, consider removing prefill_pp_size from the KVArgs class definition as well.

Signed-off-by: Shangming Cai <csmthu@gmail.com>
@ShangmingCai
Copy link
Copy Markdown
Collaborator Author

/rerun-stage stage-c-test-8-gpu-h20

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 1, 2026

✅ Triggered stage-c-test-8-gpu-h20 to run independently (skipping dependencies).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 1, 2026

🔗 View workflow run

@ShangmingCai
Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions bot added the run-ci label Mar 1, 2026
@ShangmingCai
Copy link
Copy Markdown
Collaborator Author

ShangmingCai commented Mar 2, 2026

Related CI has passed.

image image

@ShangmingCai ShangmingCai merged commit 0a6678b into main Mar 2, 2026
356 of 387 checks passed
@ShangmingCai ShangmingCai deleted the remove_pd_unused branch March 2, 2026 03:38
@iyastreb
Copy link
Copy Markdown

iyastreb commented Mar 2, 2026

@ShangmingCai This PR breaks NIXL plugin, where decode_tp_size is still referenced
It seems Mori is also affected
Could you please fix it?

Kangyan-Zhou pushed a commit to Kangyan-Zhou/sglang that referenced this pull request Mar 4, 2026
Signed-off-by: Shangming Cai <csmthu@gmail.com>
magicYang1573 pushed a commit to magicYang1573/sglang that referenced this pull request Mar 9, 2026
Signed-off-by: Shangming Cai <csmthu@gmail.com>
Wangzheee pushed a commit to Wangzheee/sglang that referenced this pull request Mar 21, 2026
Signed-off-by: Shangming Cai <csmthu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants