Repository navigation
Conversation
…ke client setup (ENG-9128)
…red prime-rl entrypoints The SLURM templates built mooncake_master and mooncake_client command lines and the standalone-store JSON in bash (_mooncake_store.sh.j2), a second copy of what prime_rl.entrypoints.mooncake does for Kubernetes. The two had already drifted (device-name precedence). - The head node runs `python -m prime_rl.entrypoints.mooncake @ <inference config>`, with `--role-configs inference-prefill.json inference-decode.json` under P/D. - New `python -m prime_rl.entrypoints.mooncake_client`: one node's client from its resolved engine config, reusing setup_mooncake_client. SLURM runs one `inference` per DP rank, so the template runs it once per node in the background and waits for MOONCAKE_CONFIG_PATH before starting the ranks; the ranks never start a client (MOONCAKE_MASTER_HOST stays unset). A client that dies now fails the job through the template's wait -n loop. - A stale config from an earlier attempt is removed first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cabrinha
force-pushed
the
feat/k8s-mooncake-offload-eng-9128
branch
from
December 3, 2026 21:00
3f18da8 to
54d3af0
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #4916. With this, the SLURM launch starts Mooncake the same way the Kubernetes operator does: both go through the shared prime-rl entrypoints, and neither builds
mooncake_masterormooncake_clientflags in shell.Change
python -m prime_rl.entrypoints.mooncake @ inference.json. Under P/D it adds--role-configs inference-prefill.json inference-decode.json. With an RLmulti_nodedeployment, SLURM'sinference.jsonhas nodeployment, so the master can't read the per-role offloads from it and is handed the role configs instead. The master's-default_kv_lease_ttl(the larger role'slease_ttl_s) and its ports now come from one place.python -m prime_rl.entrypoints.mooncake_client @ <role config> --master-host <head>. It callssetup_mooncake_client: it waits for the master, startsmooncake_clientwith the node'scpu.num_bytes, writes the standalone-store JSON toMOONCAKE_CONFIG_PATH, then stays in the foreground and forwards SIGTERM/SIGINT to the client. On SLURM one client runs per node, not per rank, so the vLLM ranks don't getMOONCAKE_MASTER_HOSTandinference_localdoesn't start a client of its own._mooncake_store.sh.j2now only places these two processes. It waits for the config file and fails the job, with the client's log tail, if the client dies first.inference.sbatch.j2pointsMC_BASE_CONFIGat the standaloneinferenceconfig.--role-configsappears only under P/D and that no raw master/client flags remain, and runbash -non the result.Tested on research-main (SLURM, H200, partition
all, 2 nodes)Colocated:
multi_node× 2, Qwen3-0.6B,cpu.num_bytes = 8 GiB(job 22455)-rpc_port=50051 -enable_http_metadata_server … -default_kv_lease_ttl=30000. Both nodes joined the pool:Clients: 2,Mem Storage: … / 16.00 GB.[mooncake] node N … role=all joined shared pool: master=…-030:50051 contributed_bytes=8589934592.External prefix cache hit rate: 98%,load_get_failed_keys=0,load_get_error_count=0.P/D:
disaggregated, 1 prefill node + 1 decode node, Qwen3-30B-A3B (job 22472)python -m prime_rl.entrypoints.mooncake @ inference.json --role-configs inference-prefill.json inference-decode.json.role=prefill/role=decode joined shared pool. Completions through the P/D router came back fine, the store held 50 keys, and the ranks loggedExternal prefix cache hit rate: 100%.Local:
pytest tests/unit/test_pd_launch.pypasses (10 tests).🤖 Generated with Claude Code