Repository navigation
feat(rollout): add --use-output-store with its Mooncake master and the engines' store config - #359
Merged
Merged
Conversation
zhihengy
force-pushed
the
output-store/01-mooncake
branch
from
November 6, 2026 22:12
a8e0eb4 to
55456f1
Compare
…e engines' store config
zhihengy
force-pushed
the
output-store/01-mooncake
branch
from
November 10, 2026 12:35
55456f1 to
8ff79ca
Compare
3 of 4 tasks
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.
First of three, on main (the
radix_transfer_pluginsinstall landed in #363/#364). The switch and the Mooncake every client of the output store connects to. Nothing puts or reads yet; #360 carries the rollout tensors through it and #361 reads them on the trainer.Summary
--use-output-storemakes sglang-d engines put a rollout's latents, debug and cond tensors in the run's Mooncake (sgl-project/sglang#48959) and return a ref, so the response, the parser actors, the Ray object store and the train dict carry a few hundred bytes per sample instead of the tensors. This PR adds the switch, its flags and validation, the config each client gets, the Mooncake master the launcher starts, and the memory the store keeps objects in.Changes
--use-output-store,--output-store-mooncake-master host:port(required with the switch, rejected without it),--output-store-local-buffer-size(the engines' put buffer, default 2gb),--output-store-global-segment-size(default 16gb, see below),--output-store-protocol rdma|tcp(default tcp, as miles' Mooncake config),--output-store-device-name.validate_output_store_argsrejects--save-debug-rollout-data(also via--dump-details) and--load-debug-rollout-datawith the switch, since stored objects do not outlive their run, and a size flag that is not a size.parse_argsgives the run arun_uuid; the store keys of a run share the prefixmiles-diffusion-output-store/<run_uuid>.miles/utils/output_store.py: theMooncakeConfigof one client (output_store_backend_config; only a client that puts registers a local buffer), the twoServerArgsfields an engine gets (sglang_output_store_server_args),connect_output_storefor a reader in a Ray process, andmooncake_client, a raw Mooncake client.global_segment_size), and theradix_transfer_pluginsbackend mounts none. As in miles, where the train workers mount it, the first trainer actor of each node (rank % num_gpus_per_node == 0) mounts--output-store-global-segment-sizefor the actor's lifetime; the sum over training nodes bounds what a rollout can store._compute_server_argspasses the store fields to each engine with its own host.execute_trainstartsmooncake_masteron the head node at the port of--output-store-mooncake-masterbefore submitting the job, replacing one left on that port, and fails if it does not listen within 30 s.Tests
tests/fast/utils/test_output_store_args.py(flags, validation, the engine's config, a reader's buffer, the segment client's setup),test_command_utils.py(the master port from the train args);tests/fast/backends,tests/fast/rollout,tests/fast/utilson the full stack: 527 passed, 3 skipped.