-
Notifications
You must be signed in to change notification settings - Fork 309
[NV] Move GB300 DeepSeek-V4-Pro AgentX disagg to the Mooncake external linker / 将 GB300 DeepSeek-V4-Pro AgentX 分离式配置切换到 Mooncake external linker #3187
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
weireweire
wants to merge
2
commits into
main
Choose a base branch
from
perf/dsv4-gb300-agentx-mooncake-opt
base: main
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
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
51 changes: 51 additions & 0 deletions
51
...cex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/dsv4-gb300-sglang-mooncake-opt.sh
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,51 @@ | ||
| #!/usr/bin/env bash | ||
| # TEMPORARY: verify the SGLang source tree carrying the DSV4 Mooncake | ||
| # external-linker optimizations before any server starts. | ||
| # | ||
| # The recipes put ${SGLANG_SRC}/python on PYTHONPATH so the servers import the | ||
| # reviewed branch instead of the container's installed SGLang, while still | ||
| # using the container's compiled kernels. If the runner failed to clone the | ||
| # tree, PYTHONPATH silently resolves to the stock package and the job would | ||
| # benchmark the wrong code, so fail loudly here instead. | ||
| # | ||
| # Delete this script, its runner wiring, and the recipes' setup_script and | ||
| # environment keys once the optimizations ship in the pinned image. | ||
| set -euo pipefail | ||
|
|
||
| SGLANG_SRC="${SGLANG_MOONCAKE_OPT_SRC:-/configs/sglang-mooncake-opt}" | ||
| INIT="${SGLANG_SRC}/python/sglang/__init__.py" | ||
|
|
||
| if [ ! -f "${INIT}" ]; then | ||
| echo "ERROR: SGLang optimization source missing at ${INIT}." >&2 | ||
| echo "The runner must clone it before submitting; refusing to run against" >&2 | ||
| echo "the container's stock SGLang." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| python3 - "${SGLANG_SRC}" <<'PYEOF' | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| root = Path(sys.argv[1]) / "python" | ||
| required = { | ||
| "SGLANG_EXTERNAL_LINKER_SWA_RETENTION_INTERVAL": "sglang/srt/environ.py", | ||
| "mooncake_store_contributor": "sglang/srt/arg_groups/fields/memory.py", | ||
| } | ||
| for token, relative in sorted(required.items()): | ||
| path = root / relative | ||
| if token not in path.read_text(): | ||
| raise SystemExit(f"ERROR: {token} not found in {path}; wrong revision") | ||
| print(f"[sglang-mooncake-opt] verified source tree at {root}") | ||
| PYEOF | ||
|
|
||
| COMPAT_SHIM="${SGLANG_MOONCAKE_OPT_COMPAT:-/configs/sglang-server-args-compat}/sitecustomize.py" | ||
| if [ ! -f "${COMPAT_SHIM}" ]; then | ||
| echo "ERROR: Dynamo compatibility shim missing at ${COMPAT_SHIM}." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| resolved=$(PYTHONPATH="${SGLANG_SRC}/python:${PYTHONPATH:-}" python3 -c 'import sglang; print(sglang.__file__)') | ||
| case "${resolved}" in | ||
| "${SGLANG_SRC}"/*) echo "[sglang-mooncake-opt] sglang resolves to ${resolved}" ;; | ||
| *) echo "ERROR: sglang resolves to ${resolved}, not ${SGLANG_SRC}" >&2; exit 1 ;; | ||
| esac |
27 changes: 27 additions & 0 deletions
27
...enchmarks/multi_node/srt-slurm-recipes/configs/sglang-server-args-compat/sitecustomize.py
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,27 @@ | ||
| """TEMPORARY: restore ServerArgs.get_model_config for the pinned Dynamo wheel. | ||
|
|
||
| The reviewed SGLang branch these recipes import moved model-config resolution | ||
| out of ServerArgs, but the pinned Dynamo wheel still calls | ||
| ``server_args.get_model_config()`` while parsing worker arguments. Re-attach | ||
| the accessor so the wheel keeps working against the newer source tree. | ||
|
|
||
| This file is picked up because its directory is on PYTHONPATH, so it is | ||
| imported by every interpreter in the job, including ones that never import | ||
| SGLang. Failing to import SGLang there is expected and must stay silent. | ||
|
|
||
| Remove this directory, its PYTHONPATH entry, and the rest of the temporary | ||
| source override once the optimizations ship in the pinned image. | ||
| """ | ||
|
|
||
| try: | ||
| from sglang.srt.arg_groups.model_override_base import model_config_of | ||
| from sglang.srt.server_args import ServerArgs | ||
| except Exception: # noqa: BLE001 - non-SGLang interpreters legitimately fail here | ||
| pass | ||
| else: | ||
| if not hasattr(ServerArgs, "get_model_config"): | ||
|
|
||
| def get_model_config(self): | ||
| return model_config_of(self) | ||
|
|
||
| ServerArgs.get_model_config = get_model_config |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 (optional) Operators reading nvidia-master.yaml lose the Mooncake component version that CONFIGS.md requires, making sweep provenance for this backend unrecoverable if the pinned Mooncake build ever needs to be identified after the fact. All four new entries set
kv-offload-backend: { name: mooncake }with noversion, but configs/CONFIGS.md:136-137 explicitly names Mooncake as an example of an independently-versioned backend that should supplyversion(unlike framework-native vLLM/HiCache). The Pydantic validator (KVOffloadBackendMetadatain infx/matrix/validation.py:127-132) doesn't enforce this, so nothing blocks the omission. …Extended reasoning...
…Fix: add a non-image
version(e.g. the Mooncake release/commit) for the mooncake kv-offload-backend entries, covering all four sites (configs/nvidia-master.yaml:9066,9084,9102,9120), or update CONFIGS.md if this backend is now treated as framework-native.configs/CONFIGS.md:133-138 says kv-offload-backend requires non-empty name, version optional only for framework-native backends (vLLM built-in, SGLang HiCache), and explicitly lists Mooncake as needing version since it's independently versioned. The new entries at lines 9066, 9084, 9102, 9120 all set { name: mooncake } with no version key. infx/matrix/validation.py's KVOffloadBackendMetadata makes version fully Optional with no name-based branching (confirmed by reading lines 127-143, and by utils/matrix_logic/test_validation.py tests that never require version for any specific backend name). So CI will not fail, but the documented provenance convention is silently violated: nobody can tell from the master config which Mooncake build/commit these Pareto points were validated against, unlike the equivalent LMCache examples in…
Verification: nit. The deviation is real but the consequence is mild/overstated. CONFIGS.md:135-138 states version is optional only for framework-native backends and explicitly directs "Supply
versionfor independently versioned backends such as LMCache or Mooncake." All four new search-space entries in configs/nvidia-master.yaml (lines 9066, 9084, 9102, 9120) setkv-offload-backend: { name: mooncake }…