Skip to content

feat(rollout): add --use-output-store with its Mooncake master and the engines' store config - #359

Merged
Rockdu merged 5 commits into
mainfrom
output-store/01-mooncake
Nov 11, 2026
Merged

Rockdu merged 5 commits into
mainfrom
output-store/01-mooncake

Conversation

@zhihengy

@zhihengy zhihengy commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

First of three, on main (the radix_transfer_plugins install 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-store makes 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

  • Flags: --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_args rejects --save-debug-rollout-data (also via --dump-details) and --load-debug-rollout-data with the switch, since stored objects do not outlive their run, and a size flag that is not a size. parse_args gives the run a run_uuid; the store keys of a run share the prefix miles-diffusion-output-store/<run_uuid>.
  • miles/utils/output_store.py: the MooncakeConfig of one client (output_store_backend_config; only a client that puts registers a local buffer), the two ServerArgs fields an engine gets (sglang_output_store_server_args), connect_output_store for a reader in a Ray process, and mooncake_client, a raw Mooncake client.
  • Storage: a Mooncake master holds no data; objects live in memory that clients mount (global_segment_size), and the radix_transfer_plugins backend 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-size for the actor's lifetime; the sum over training nodes bounds what a rollout can store.
  • _compute_server_args passes the store fields to each engine with its own host.
  • execute_train starts mooncake_master on the head node at the port of --output-store-mooncake-master before 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/utils on the full stack: 527 passed, 3 skipped.

@zhihengy
zhihengy force-pushed the output-store/01-mooncake branch from 55456f1 to 8ff79ca Compare November 10, 2026 12:35

@Rockdu Rockdu left a comment

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.

LGTM

@Rockdu
Rockdu merged commit 01869a4 into main Nov 11, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci-e2e Run e2e metric-regression tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants