Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
"SGLANG_MOONCAKE_STORE_CONTRIBUTOR": "sglang/srt/environ.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
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ identity:
model:
repo: "deepseek-ai/DeepSeek-V4-Pro-0813"
container:
image: "lmsysorg/sglang:nightly-dev-cu13-20260829-89816a21"
image: "lmsysorg/sglang:nightly-dev-cu13-20260916-c9a8fba9"

dynamo:
install: true
Expand All @@ -32,20 +32,35 @@ health_check:
max_attempts: 1440
interval_seconds: 10

# TEMPORARY: the Mooncake external-linker optimizations this Pareto point
# depends on are not in a released SGLang image yet. The gb300-nv runner clones
# the reviewed branch into the srt-slurm configs directory and the servers
# import it from there. The setup script aborts the job when that tree is
# missing, so a run can never silently fall back to the container's SGLang.
# Remove both keys once the optimizations ship in the pinned image.
setup_script: dsv4-gb300-sglang-mooncake-opt.sh

environment:
PYTHONPATH: /configs/sglang-server-args-compat:/configs/sglang-mooncake-opt/python

resources:
gpu_type: gb300
gpus_per_node: 4
services:
- name: etcd
type: etcd
placement:
node: dedicated
- name: nats
type: nats
placement:
node: dedicated
options:
max_payload_mb: 32
- name: etcd
type: etcd
placement:
node: dedicated
- name: nats
type: nats
placement:
node: dedicated
options:
max_payload_mb: 32
- name: mooncake-master
type: mooncake-master
args:
- --eviction_high_watermark_ratio=0.90
frontend:
type: dynamo
nginx_session_affinity: true
Expand Down Expand Up @@ -100,6 +115,15 @@ roles:
SGLANG_REQUEST_STATE_WAIT_TIMEOUT: '60'
SGLANG_NCCL_ALL_GATHER_IN_OVERLAP_SCHEDULER_SYNC_BATCH: '1'

MOONCAKE_PROTOCOL: rdma
MOONCAKE_GLOBAL_SEGMENT_SIZE: 140gb
MOONCAKE_STANDALONE_STORAGE: '0'
MC_STORE_CLIENT_METRIC: '1'
MC_STORE_CLIENT_METRIC_INTERVAL: '5'
MC_ENABLE_DEST_DEVICE_AFFINITY: '1'
WITH_NVIDIA_PEERMEM: '0'
SGLANG_EXTERNAL_LINKER_WRITE_THROUGH_THRESHOLD: '1'
SGLANG_EXTERNAL_LINKER_SWA_RETENTION_INTERVAL: '32768'
args:
host: 0.0.0.0
served-model-name: deepseek-ai/DeepSeek-V4-Pro-0813
Expand All @@ -125,7 +149,7 @@ roles:
page-size: 256
swa-full-tokens-ratio: 0.02
max-running-requests: 256
cuda-graph-max-bs: 256
cuda-graph-max-bs-decode: 256
chunked-prefill-size: 65536
disable-flashinfer-autotune: true
model-loader-extra-config: '{"enable_multithread_load":true,"num_threads":8}'
Expand All @@ -135,11 +159,11 @@ roles:
speculative-num-steps: 1
speculative-eagle-topk: 1
speculative-num-draft-tokens: 7
enable-hierarchical-cache: true
hicache-write-policy: write_back
hicache-ratio: 1
hicache-io-backend: direct

prefill-chunk-size-per-request: 2048
disaggregation-defer-partial-kv-transfer: true
enable-unified-cache-external-linker: true
unified-cache-external-linker-backend: mooncake
hicache-storage-backend-extra-config: '{"enable_group_semantics":true}'
decode:
nodes: 4
workers: 1
Expand Down Expand Up @@ -175,6 +199,13 @@ roles:
SGLANG_LOG_MS: '1'
SGLANG_REQUEST_STATE_WAIT_TIMEOUT: '60'

MOONCAKE_PROTOCOL: rdma
MOONCAKE_GLOBAL_SEGMENT_SIZE: 140gb
MOONCAKE_STANDALONE_STORAGE: '0'
MC_STORE_CLIENT_METRIC: '1'
MC_STORE_CLIENT_METRIC_INTERVAL: '5'
MC_ENABLE_DEST_DEVICE_AFFINITY: '1'
WITH_NVIDIA_PEERMEM: '0'
args:
host: 0.0.0.0
served-model-name: deepseek-ai/DeepSeek-V4-Pro-0813
Expand All @@ -195,12 +226,13 @@ roles:
enable-w4a4-mxfp4-megamoe: true
disaggregation-transfer-backend: mooncake
disaggregation-mode: decode
mooncake-store-contributor: true
load-balance-method: total_tokens
mem-fraction-static: 0.9
page-size: 256
swa-full-tokens-ratio: 0.02
max-running-requests: 3072
cuda-graph-max-bs: 256
cuda-graph-max-bs-decode: 256
disable-flashinfer-autotune: true
model-loader-extra-config: '{"enable_multithread_load":true,"num_threads":8}'
kv-events-config: '{"publisher":"zmq","topic":"kv-events","endpoint":"tcp://*:5567"}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ identity:
model:
repo: "deepseek-ai/DeepSeek-V4-Pro-0813"
container:
image: "lmsysorg/sglang:nightly-dev-cu13-20260829-89816a21"
image: "lmsysorg/sglang:nightly-dev-cu13-20260916-c9a8fba9"

dynamo:
install: true
Expand All @@ -32,20 +32,35 @@ health_check:
max_attempts: 1440
interval_seconds: 10

# TEMPORARY: the Mooncake external-linker optimizations this Pareto point
# depends on are not in a released SGLang image yet. The gb300-nv runner clones
# the reviewed branch into the srt-slurm configs directory and the servers
# import it from there. The setup script aborts the job when that tree is
# missing, so a run can never silently fall back to the container's SGLang.
# Remove both keys once the optimizations ship in the pinned image.
setup_script: dsv4-gb300-sglang-mooncake-opt.sh

environment:
PYTHONPATH: /configs/sglang-server-args-compat:/configs/sglang-mooncake-opt/python

resources:
gpu_type: gb300
gpus_per_node: 4
services:
- name: etcd
type: etcd
placement:
node: dedicated
- name: nats
type: nats
placement:
node: dedicated
options:
max_payload_mb: 32
- name: etcd
type: etcd
placement:
node: dedicated
- name: nats
type: nats
placement:
node: dedicated
options:
max_payload_mb: 32
- name: mooncake-master
type: mooncake-master
args:
- --eviction_high_watermark_ratio=0.90
frontend:
type: dynamo
nginx_session_affinity: true
Expand Down Expand Up @@ -100,6 +115,15 @@ roles:
SGLANG_NCCL_ALL_GATHER_IN_OVERLAP_SCHEDULER_SYNC_BATCH: '1'
SGLANG_DSV4_MHC_PREWARM: '1'

MOONCAKE_PROTOCOL: rdma
MOONCAKE_GLOBAL_SEGMENT_SIZE: 140gb
MOONCAKE_STANDALONE_STORAGE: '0'
MC_STORE_CLIENT_METRIC: '1'
MC_STORE_CLIENT_METRIC_INTERVAL: '5'
MC_ENABLE_DEST_DEVICE_AFFINITY: '1'
WITH_NVIDIA_PEERMEM: '0'
SGLANG_EXTERNAL_LINKER_WRITE_THROUGH_THRESHOLD: '1'
SGLANG_EXTERNAL_LINKER_SWA_RETENTION_INTERVAL: '32768'
args:
host: 0.0.0.0
served-model-name: deepseek-ai/DeepSeek-V4-Pro-0813
Expand All @@ -125,7 +149,7 @@ roles:
page-size: 256
swa-full-tokens-ratio: 0.02
max-running-requests: 256
cuda-graph-max-bs: 256
cuda-graph-max-bs-decode: 256
chunked-prefill-size: 65536
disable-flashinfer-autotune: true
model-loader-extra-config: '{"enable_multithread_load":true,"num_threads":8}'
Expand All @@ -135,11 +159,11 @@ roles:
speculative-num-steps: 1
speculative-eagle-topk: 1
speculative-num-draft-tokens: 7
enable-hierarchical-cache: true
hicache-write-policy: write_back
hicache-ratio: 1
hicache-io-backend: direct

prefill-chunk-size-per-request: 2048
disaggregation-defer-partial-kv-transfer: true
enable-unified-cache-external-linker: true
unified-cache-external-linker-backend: mooncake
hicache-storage-backend-extra-config: '{"enable_group_semantics":true}'
decode:
nodes: 4
workers: 1
Expand Down Expand Up @@ -177,6 +201,13 @@ roles:
SGLANG_REQUEST_STATE_WAIT_TIMEOUT: '60'
SGLANG_DSV4_MHC_PREWARM: '1'

MOONCAKE_PROTOCOL: rdma
MOONCAKE_GLOBAL_SEGMENT_SIZE: 140gb
MOONCAKE_STANDALONE_STORAGE: '0'
MC_STORE_CLIENT_METRIC: '1'
MC_STORE_CLIENT_METRIC_INTERVAL: '5'
MC_ENABLE_DEST_DEVICE_AFFINITY: '1'
WITH_NVIDIA_PEERMEM: '0'
args:
host: 0.0.0.0
served-model-name: deepseek-ai/DeepSeek-V4-Pro-0813
Expand All @@ -197,12 +228,13 @@ roles:
enable-w4a4-mxfp4-megamoe: true
disaggregation-transfer-backend: mooncake
disaggregation-mode: decode
mooncake-store-contributor: true
load-balance-method: total_tokens
mem-fraction-static: 0.9
page-size: 256
swa-full-tokens-ratio: 0.02
max-running-requests: 3072
cuda-graph-max-bs: 256
cuda-graph-max-bs-decode: 256
disable-flashinfer-autotune: true
model-loader-extra-config: '{"enable_multithread_load":true,"num_threads":8}'
kv-events-config: '{"publisher":"zmq","topic":"kv-events","endpoint":"tcp://*:5567"}'
Expand Down
Loading
Loading