Skip to content

[MISC] Add routerconfig to runtimes and add pd runtimes#78

Merged
slin1237 merged 13 commits into
mainfrom
feature/add-router-pd-to-rt
Jun 28, 2025
Merged

[MISC] Add routerconfig to runtimes and add pd runtimes#78
slin1237 merged 13 commits into
mainfrom
feature/add-router-pd-to-rt

Conversation

@YouNeedCryDear
Copy link
Copy Markdown
Collaborator

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add routerconfig to runtimes and add pd runtimes

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


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.

Summary of Changes

Hello @YouNeedCryDear, 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 significantly expands the available model serving runtimes by adding new configurations that support prefill-decode disaggregation for various large language models. It also standardizes and completes the router configurations across all relevant runtimes, ensuring consistent and updated deployment practices. Additionally, some minor Go module dependency cleanup was performed.

Highlights

  • New Prefill-Decode Runtimes: Introduced several new ClusterServingRuntime configurations (e.g., llama-3-1-405b-instruct-fp8-pd-rt.yaml, mistral-7b-instruct-pd-rt.yaml) specifically designed for prefill-decode disaggregation. These runtimes separate the prefill and decode stages of LLM inference into distinct engine and decoder components, managed by a dedicated router.
  • Router Image Version Standardization: Updated the sgl-router image version across all existing and newly added runtime configurations to a specific release tag: ghcr.io/moirai-internal/sgl-router:0.1.4.30f2a44. This ensures consistency and stability in the router deployments.
  • Router Configuration for Existing Runtimes: Added the routerConfig section to existing mistral-7b-instruct-rt.yaml and mixtral-8x7b-instruct-rt.yaml runtime definitions, which previously lacked this configuration. This enables these runtimes to properly utilize the router for model serving.
  • Go Module Dependency Optimization: Cleaned up the Go module dependencies by removing several unused indirect dependencies from go.mod and go.sum, contributing to a leaner build and reduced dependency footprint.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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 adds several new ClusterServingRuntime configurations for prefill/decode disaggregated setups and updates existing runtimes. The main changes involve pinning router image versions and adding new runtime definitions. My review focuses on ensuring consistency, maintainability, and production-readiness of the new configuration files. Key issues identified include the use of development image tags, inconsistencies in naming conventions and command-line arguments, and significant code duplication in the new runtime definitions.

Comment thread config/runtimes/srt/llama-3-1-405b-instruct-fp8-pd-rt.yaml Outdated
Comment thread config/runtimes/srt/llama-3-1-405b-instruct-fp8-pd-rt.yaml Outdated
periodSeconds: 6
initialDelaySeconds: 60
timeoutSeconds: 30
decoderConfig:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The decoderConfig section is almost a complete duplicate of the engineConfig section, with the main difference being the --disaggregation-mode argument. This much duplication can make maintenance difficult. Consider using a tool like Kustomize overlays to define a common base and patch the differences for engine and decoder. This comment applies to all new pd-rt.yaml files.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Will consider later.

Comment thread config/runtimes/srt/llama-3-1-70b-instruct-pd-rt.yaml
Comment thread config/runtimes/srt/mixtral-8x7b-instruct-pd-rt.yaml Outdated
Comment thread config/runtimes/srt/mixtral-8x7b-instruct-pd-rt.yaml Outdated
nvidia.com/gpu: 2
readinessProbe:
httpGet:
path: /health
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The readiness probe uses /health. For consistency with other new runtime configurations in this PR (e.g., llama-3-1-405b-instruct-fp8-pd-rt.yaml), consider using /health_generate as the health endpoint. This change should also be applied to the liveness and startup probes in this file, and all probes in the decoderConfig for consistency.

          path: /health_generate

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

will change later.

Copy link
Copy Markdown
Collaborator

@CatherineSue CatherineSue left a comment

Choose a reason for hiding this comment

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

Have we tested all these?

image: ghcr.io/moirai-internal/sgl:dev2
image: lmsysorg/sglang:v0.4.8.post1-cu126
env:
- name: SGLANG_MOONCAKE_TRANS_THREAD
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this should be SGLANG_DISAGGREGATION_THREAD_POOL_SIZE in the main branch (or in the lmsysorg/sglang:v0.4.8.post1-cu126)? @whybeyoung @slin1237

@YouNeedCryDear YouNeedCryDear force-pushed the feature/add-router-pd-to-rt branch from 9ef4ede to 81c7945 Compare June 27, 2025 19:17
@YouNeedCryDear YouNeedCryDear force-pushed the feature/add-router-pd-to-rt branch from 81c7945 to 1bb5c6c Compare June 27, 2025 20:36
@YouNeedCryDear
Copy link
Copy Markdown
Collaborator Author

Have we tested all these?

405B failed because of container issue. 90B and 11B failed potentially because of encoder-decoder model architecture. The rest of the models are tested successfully. @CatherineSue

@YouNeedCryDear
Copy link
Copy Markdown
Collaborator Author

@gemini-code-assist review

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 adds routerconfig to runtimes and adds pd runtimes. The changes are consistent, updating images to specific versions and using public images where appropriate. The main area for improvement is to use a specific version tag instead of a floating tag for the image to ensure reproducibility and prevent unexpected changes.

Comment thread config/runtimes/srt/deepseek-rdma-pd-rt.yaml Outdated
Comment thread config/runtimes/srt/deepseek-rdma-rt.yaml Outdated
Comment thread config/runtimes/srt/e5-mistral-7b-instruct-rt.yaml Outdated
Comment thread config/runtimes/srt/llama-3-1-405b-instruct-fp8-pd-rt.yaml Outdated
Comment thread config/runtimes/srt/llama-3-1-405b-instruct-fp8-rt.yaml Outdated
Comment thread config/runtimes/srt/llama-4-maverick-17b-128e-instruct-fp8-rt.yaml Outdated
Comment thread config/runtimes/srt/llama-4-scout-17b-16e-instruct-pd-rt.yaml Outdated
Comment thread config/runtimes/srt/llama-4-scout-17b-16e-instruct-rt.yaml Outdated
Comment thread config/runtimes/srt/mistral-7b-instruct-pd-rt.yaml
Comment thread config/runtimes/srt/mixtral-8x7b-instruct-pd-rt.yaml Outdated
@slin1237 slin1237 force-pushed the feature/add-router-pd-to-rt branch 2 times, most recently from 556e9f0 to 7a98c3c Compare June 28, 2025 01:30
@slin1237 slin1237 force-pushed the feature/add-router-pd-to-rt branch from 7a98c3c to 6fdd662 Compare June 28, 2025 01:33
@slin1237 slin1237 merged commit ed55a09 into main Jun 28, 2025
13 checks passed
@slin1237 slin1237 deleted the feature/add-router-pd-to-rt branch June 28, 2025 01:33
slin1237 pushed a commit that referenced this pull request Dec 22, 2025
* clean up deps

* update router image

* add router config to sglang runtimes

* add pd runtimes

* add decoderconfig to pd runtimes

* add -pd as suffix to runtime names

* use --model-path for consistancy

* replace --tp with --tp-size for consistency

* use latest sgl image in runtimes

* fix image repo

* fix ome manager img name

* cleanup dep

* add pd to runtime kustomize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants