Skip to content

[rl] Default to ModelStateDictTransport - #6125

Merged
d4l3k merged 6 commits into
mainfrom
gh/d4l3k/9/head
Nov 17, 2026
Merged

d4l3k merged 6 commits into
mainfrom
gh/d4l3k/9/head

Conversation

@d4l3k

@d4l3k d4l3k commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

Summary (human-written)

Why

ModelStateDictTransport (one-sided torch.distributed._transport reads) replaced TorchStore for cpu_prefetch but was opt-in. It beat TorchStore on every measured axis in two GB300 runs.

GB300 Muse Spark 18 hosts (trainer 10 hosts, 2 generators x 4 hosts, 11 steps):

TorchStore (NIXL) ModelStateDictTransport (Mooncake) ModelStateDictTransport (NIXL)
Trainer push n=1 (median/max) 5.05/5.38 s 0.33/0.33 s 0.33/0.35 s
Trainer push n>=2 (median) 0.39 s 0.33 s 0.33 s
Generator pull n=1 (median/max) 30.4/37.7 s 14.9/26.1 s 1.89/1.97 s
Generator pull n>=2 (median/max) 13.1/19.9 s 11.4/21.0 s 1.91/2.46 s
Full-step tok/s (median) 630 725 743
Trainer RSS steady/peak (median/max) 89.2/89.7 GB 48.0/48.8 GB 47.3/48.5 GB
Trainer node MemAvailable drop, push n=1 168 GB 0 0
Generator RSS steady/peak (median/max) 105.5/105.7 GB 106.6/106.8 GB 105.5/105.6 GB
Trainer GPU peak alloc/reserved 197/248 GB 197/248 GB 197/248 GB
Generator GPU peak alloc/reserved 245/246 GB 245/246 GB 245/246 GB
Setup: trainer staging alloc + pin + register (24-42 GB/rank) none up front (lazy, inside push n=1) 2.2 s 7.0 s
Setup: generator connect to 40 trainer ranks + register prefetch buffers none up front (lazy, inside pull n=1) 30.0 s 8.7 s
Setup: last generator ready -> training loop start (incl. initial push/pull) 45.0 s 60.0 s 19.3 s

Setup is measured from the last generator becoming ready (slowest rank). Pinning is the same code for both backends, so the trainer gap (7.0 vs 2.2 s) is NIXL agent creation and UCX registration. Mooncake's generator connect is the largest setup cost. Trainer registration includes the generator layout RPC.

GB300 Qwen3.5 27B (separate, smaller run; pull is the slowest generator; memory identical across arms; push not recorded):

TorchStore (NIXL) ModelStateDictTransport (Mooncake) ModelStateDictTransport (NIXL)
Generator pull n=1 22.5 s 4.56 s 0.95 s
Generator pull n>=2 15.6-16.8 s 2.2-2.8 s 0.96-1.08 s
tok/s (mean) 13.0k 16.9k 15.7k (one 3.2k outlier step)

Memory is per rank, sampled every 50 ms during push/pull/load. On H100 32x8 Muse (trainer FSDP CPU offload, Mooncake): generator pull n=1 102 -> 8.3 s (median), generator RSS 54.1 -> 56.1 GB (max 54.3 -> 58.2), trainer RSS 124 -> 109 GB, GPU identical. Pulled weights were checked bitwise against the trainer across FSDP/TP/EP layouts (0 mismatches).

What changed

Before After
Controller.Config.model_state_dict_transport default None (TorchStore) ModelStateDictTransport.Config() (NIXL)
generator.model_state_dict_load_mode="gpu_fetch" works by default requires model_state_dict_transport=None (ValueError says so)
  • ModelStateDictTransport.Config.backend defaults to "nixl" instead of "mooncake". On a GB200 devserver, Mooncake's default RDMA path took 25-39 s per small read vs about 1 ms for NIXL, and RL CI (torch 2026-11-07) cannot load Mooncake (transport 'mooncake' is not supported) and lacks the Mooncake fix [Transport] [Mooncake] Don't drop a reused batch id when settling a transfer pytorch#203623.
  • Mooncake doc: set MC_FORCE_TCP=1 on hosts without RDMA devices (Mooncake's NVLink fallback cannot read pinned CPU memory).
  • Run 2 of the rl_grpo_checkpoint_resume integration test sets model_state_dict_transport=None, so CI keeps covering TorchStore until it is deleted; run 1 covers ModelStateDictTransport.
  • Docs and README updated.

Lines: implementation +20/-14 (controller +10/-6, transport +1/-1, docs +9/-7), tests +8/-4.

Test plan:

  • pytest tests/rl/unit_tests/cpu --ignore=tests/rl/unit_tests/cpu/test_vllm_wrapper.py: 657 passed; 4 failures are a local env ImportError (torch_checkpointing.CallbackArgs), unrelated.
  • Audited in-repo Controller.Config users: no recipe or integration test uses gpu_fetch; existing gpu_fetch tests build engines directly.
  • NIXL and Mooncake real-backend read smoke on GB200 (pinned CPU and GPU buffers, packed and contiguous keys, bitwise compare): both pass.
  • RL integration tests (NIXL in every entry except run 2 of rl_grpo_checkpoint_resume, which uses TorchStore): via ciflow/rl CI.

[ghstack-poisoned]
[ghstack-poisoned]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
[ghstack-poisoned]
d4l3k added a commit that referenced this pull request Nov 16, 2026
## Summary (human-written)
<!-- Write this yourself, not with an AI tool. 2-5 sentences: the problem, why
     this approach, and what you checked yourself. -->

## Why
`ModelStateDictTransport` (one-sided `torch.distributed._transport` reads) replaced TorchStore for `cpu_prefetch` but was opt-in. On GB300 Muse18 (trainer 10 hosts, 2 generators x 4 hosts, 11 steps, Mooncake backend) it beats TorchStore on every measured axis:

| | TorchStore | ModelStateDictTransport |
|---|---|---|
| Trainer push n=1 (median/max) | 5.05/5.38 s | 0.33/0.33 s |
| Trainer push n>=2 (median) | 0.39 s | 0.33 s |
| Generator pull n=1 (median/max) | 30.4/37.7 s | 14.9/26.1 s |
| Generator pull n>=2 (median/max) | 13.1/19.9 s | 11.4/21.0 s |
| Trainer RSS steady | 89.2 GB | 48.0 GB |
| Full-step tok/s (median) | 630 | 725 |

On a GB300 27B run, NIXL pulled faster than Mooncake (first pull 0.95 s vs 4.56 s; TorchStore 22.5 s). GPU memory is identical in both arms. Pulled weights were checked bitwise against the trainer across FSDP/TP/EP layouts (0 mismatches).

## What changed
| | Before | After |
|---|---|---|
| `Controller.Config.model_state_dict_transport` default | `None` (TorchStore) | `ModelStateDictTransport.Config()` (NIXL) |
| `generator.model_state_dict_load_mode="gpu_fetch"` | works by default | requires `model_state_dict_transport=None` (ValueError says so) |

- `ModelStateDictTransport.Config.backend` defaults to `"nixl"` instead of `"mooncake"`. On a GB200 devserver, Mooncake's default RDMA path took 25-39 s per small read vs about 1 ms for NIXL, and RL CI (torch 2026-11-07) cannot load Mooncake (`transport 'mooncake' is not supported`) and lacks the Mooncake fix pytorch/pytorch#203623.
- Docs, README and a test comment updated.

Lines: implementation +20/-14 (controller +10/-6, transport +1/-1, docs +9/-7), tests +1/-1.

Test plan:
- `pytest tests/rl/unit_tests/cpu --ignore=tests/rl/unit_tests/cpu/test_vllm_wrapper.py`: 657 passed; 4 failures are a local env ImportError (`torch_checkpointing.CallbackArgs`), unrelated.
- Audited in-repo `Controller.Config` users: no recipe or integration test uses `gpu_fetch`; existing `gpu_fetch` tests build engines directly.
- NIXL and Mooncake real-backend read smoke on GB200 (pinned CPU and GPU buffers, packed and contiguous keys, bitwise compare): both pass.
- RL integration tests: via `ciflow/rl` CI.
ghstack-source-id: ddb205d
Pull-Request: #6125
@d4l3k
d4l3k marked this pull request as ready for review November 16, 2026 22:10
@pytorch-bot pytorch-bot Bot added the ciflow/fake-pg Run 1-GPU Fake PG integration tests label Nov 16, 2026
@github-actions
github-actions Bot requested a review from pzhan9 November 16, 2026 22:10
@tushar00jain

tushar00jain commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor
  • What about generator RSS? GPU memory for both trainer and generator? What about peak?
  • And only push seems faster not pull?

@tianyu-l

Copy link
Copy Markdown
Contributor

@claude review

@claude

claude Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @tianyu-l's task in 1m 34s —— View job


Approve -- please fill in the human-written summary before merging. Review

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Approve -- please address the items below before merging. Making the faster transport the default is a small, well-measured change, and the gpu_fetch combination it doesn't support now fails with a ValueError at config time.

What this PR does. Controller.Config.model_state_dict_transport now defaults to ModelStateDictTransport.Config() instead of None (TorchStore), and ModelStateDictTransport.Config.backend now defaults to "nixl" instead of "mooncake". Anyone who relies on generator.model_state_dict_load_mode="gpu_fetch" must now set model_state_dict_transport=None explicitly, and the error message says so. The rest of the PR updates docs and comments.

Example.

# Before: Controller.Config() -> TorchStore put/get for weight transfer
# After:  Controller.Config() -> ModelStateDictTransport(backend="nixl")

cfg = Controller.Config(..., generator=Generator.Config(model_state_dict_load_mode="gpu_fetch"))
# Before: OK (TorchStore)
# After:  ValueError: model_state_dict_transport requires ...="cpu_prefetch";
#         set model_state_dict_transport=None to use TorchStore with "gpu_fetch"

Must fix

  1. PR description -- the "Summary (human-written)" section is empty. Per CONTRIBUTING.md, the author has to fill it in.

Should consider

  • torchtitan/rl/controller/controller.py:368 -- no CI job runs the TorchStore path anymore, and it is still the only path for gpu_fetch (see inline comment).
  • torchtitan/rl/README.md:64 -- the wording suggests gpu_fetch switches to TorchStore automatically; it actually needs model_state_dict_transport=None (see inline comment).
  • torchtitan/rl/MODEL_STATE_DICT_TRANSPORT.md:33 -- the MC_FORCE_TCP note is unrelated to this change (see inline comment).

Questions

  • The default is NIXL, but the main Muse Spark comparison only measures Mooncake ("NIXL arm pending"). On Qwen3.5 27B, NIXL pulls faster but its mean tok/s is lower (15.7k vs 16.9k, with one outlier step). Will the Muse Spark NIXL numbers be posted before this lands, so the default is backed by data from the larger run?
Details
  • @tushar00jain asked about generator RSS, GPU memory and peaks, and whether pull got faster. The updated description answers all of these: there are rows for generator RSS steady/peak, trainer and generator GPU peak alloc/reserved, and generator pull at n=1 and n>=2. Pull is faster in every reported configuration.
  • Callsite audit: none of the recipes in torchtitan_recipes/tests/rl/alphabet_sort.py sets model_state_dict_transport or gpu_fetch, so the new default breaks no in-repo config. scripts/install_rl_env.sh installs nixl==1.5.0/nixl-cu13==1.5.0, and all three RL integration workflows run it.
  • The batch-invariant RL integration tests check trainer/generator bitwise parity, so they now also cover the NIXL path's numerics.

Not verified: whether NIXL/UCX reads work on the single-node CI runners (results pending on ciflow/rl). A maintainer still needs to review.

Comment on lines +368 to +370
model_state_dict_transport: ModelStateDictTransport.Config | None = field(
default_factory=ModelStateDictTransport.Config
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No recipe in torchtitan_recipes/tests/rl/ sets model_state_dict_transport, so this default moves every RL integration test (8gpu, H100, B200) from TorchStore to NIXL. After this PR, no CI job runs the TorchStore path (initialize_torchstore, put_state_dict, the generator's StorageVolume reads). That path is still the only one that supports gpu_fetch. The gpu_fetch GPU unit tests (e.g. test_sglang_bitwise_parity.py) build engines directly and never touch TorchStore.

If the TorchStore path needs to keep working until the TODO lands, add model_state_dict_transport=None plus model_state_dict_load_mode="gpu_fetch" to one existing entry in tests/integration_tests/rl.py, e.g. one run of rl_grpo_checkpoint_resume. Don't add a new entry. If the path is allowed to go untested until it's deleted, say so in the PR description.

Comment thread torchtitan/rl/README.md Outdated

- **[Monarch](https://github.com/meta-pytorch/monarch) as the controller:** orchestrates trainers and generators on separate GPU meshes with asynchronous communication.
- **[TorchStore](https://github.com/meta-pytorch/torchstore) for model state dict transfer:** efficiently publishes the model state dict from the trainer to generators, including direct GPU-to-GPU RDMA transfers.
- **[`ModelStateDictTransport`](MODEL_STATE_DICT_TRANSPORT.md) for model state dict transfer:** generators read the trainer's model state dict with one-sided RDMA reads over `torch.distributed._transport` (NIXL or Mooncake). [TorchStore](https://github.com/meta-pytorch/torchstore) is still used with `model_state_dict_load_mode="gpu_fetch"`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"TorchStore is still used with gpu_fetch" makes it sound like the switch is automatic. It isn't: with the new default, gpu_fetch raises ValueError in Controller.Config.__post_init__ unless the user also sets model_state_dict_transport=None. Suggested wording:

Suggested change
- **[`ModelStateDictTransport`](MODEL_STATE_DICT_TRANSPORT.md) for model state dict transfer:** generators read the trainer's model state dict with one-sided RDMA reads over `torch.distributed._transport` (NIXL or Mooncake). [TorchStore](https://github.com/meta-pytorch/torchstore) is still used with `model_state_dict_load_mode="gpu_fetch"`.
- **[`ModelStateDictTransport`](MODEL_STATE_DICT_TRANSPORT.md) for model state dict transfer:** generators read the trainer's model state dict with one-sided RDMA reads over `torch.distributed._transport` (NIXL or Mooncake). `model_state_dict_load_mode="gpu_fetch"` requires `model_state_dict_transport=None`, which uses [TorchStore](https://github.com/meta-pytorch/torchstore) instead.

Comment on lines +33 to +35
hostnames over IPv4. Without RDMA devices Mooncake falls back to its NVLink
transport, which cannot read pinned CPU memory, and reads fail with
`Mooncake transfer submission failed`; set `MC_FORCE_TCP=1`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Mooncake troubleshooting note (fall back to MC_FORCE_TCP=1 when there are no RDMA devices) is unrelated to changing the default, and it now documents the non-default backend. The PR description doesn't mention it either. Move it to its own PR, or list it under "What changed".

d4l3k added a commit that referenced this pull request Nov 17, 2026
## Summary (human-written)
<!-- Write this yourself, not with an AI tool. 2-5 sentences: the problem, why
     this approach, and what you checked yourself. -->

## Why
`ModelStateDictTransport` (one-sided `torch.distributed._transport` reads) replaced TorchStore for `cpu_prefetch` but was opt-in. It beat TorchStore on every measured axis in two GB300 runs.

GB300 Muse Spark 18 hosts (trainer 10 hosts, 2 generators x 4 hosts, 11 steps). ModelStateDictTransport NIXL arm pending:

| | TorchStore (NIXL) | ModelStateDictTransport (Mooncake) |
|---|---|---|
| Trainer push n=1 (median/max) | 5.05/5.38 s | 0.33/0.33 s |
| Trainer push n>=2 (median) | 0.39 s | 0.33 s |
| Generator pull n=1 (median/max) | 30.4/37.7 s | 14.9/26.1 s |
| Generator pull n>=2 (median/max) | 13.1/19.9 s | 11.4/21.0 s |
| Full-step tok/s (median) | 630 | 725 |
| Trainer RSS steady/peak (median/max) | 89.2/89.7 GB | 48.0/48.8 GB |
| Trainer node MemAvailable drop, push n=1 | 168 GB | 0 |
| Generator RSS steady/peak (median/max) | 105.5/105.7 GB | 106.6/106.8 GB |
| Trainer GPU peak alloc/reserved | 197/248 GB | 197/248 GB |
| Generator GPU peak alloc/reserved | 245/246 GB | 245/246 GB |

GB300 Qwen3.5 27B (separate, smaller run; pull is the slowest generator; memory identical across arms; push not recorded):

| | TorchStore (NIXL) | ModelStateDictTransport (Mooncake) | ModelStateDictTransport (NIXL) |
|---|---|---|---|
| Generator pull n=1 | 22.5 s | 4.56 s | 0.95 s |
| Generator pull n>=2 | 15.6-16.8 s | 2.2-2.8 s | 0.96-1.08 s |
| tok/s (mean) | 13.0k | 16.9k | 15.7k (one 3.2k outlier step) |

Memory is per rank, sampled every 50 ms during push/pull/load. On H100 32x8 Muse (trainer FSDP CPU offload, Mooncake): generator pull n=1 102 -> 8.3 s (median), generator RSS 54.1 -> 56.1 GB (max 54.3 -> 58.2), trainer RSS 124 -> 109 GB, GPU identical. Pulled weights were checked bitwise against the trainer across FSDP/TP/EP layouts (0 mismatches).

## What changed
| | Before | After |
|---|---|---|
| `Controller.Config.model_state_dict_transport` default | `None` (TorchStore) | `ModelStateDictTransport.Config()` (NIXL) |
| `generator.model_state_dict_load_mode="gpu_fetch"` | works by default | requires `model_state_dict_transport=None` (ValueError says so) |

- `ModelStateDictTransport.Config.backend` defaults to `"nixl"` instead of `"mooncake"`. On a GB200 devserver, Mooncake's default RDMA path took 25-39 s per small read vs about 1 ms for NIXL, and RL CI (torch 2026-11-07) cannot load Mooncake (`transport 'mooncake' is not supported`) and lacks the Mooncake fix pytorch/pytorch#203623.
- Mooncake doc: set `MC_FORCE_TCP=1` on hosts without RDMA devices (Mooncake's NVLink fallback cannot read pinned CPU memory).
- Run 2 of the `rl_grpo_checkpoint_resume` integration test sets `model_state_dict_transport=None`, so CI keeps covering TorchStore until it is deleted; run 1 covers `ModelStateDictTransport`.
- Docs and README updated.

Lines: implementation +20/-14 (controller +10/-6, transport +1/-1, docs +9/-7), tests +8/-4.

Test plan:
- `pytest tests/rl/unit_tests/cpu --ignore=tests/rl/unit_tests/cpu/test_vllm_wrapper.py`: 657 passed; 4 failures are a local env ImportError (`torch_checkpointing.CallbackArgs`), unrelated.
- Audited in-repo `Controller.Config` users: no recipe or integration test uses `gpu_fetch`; existing `gpu_fetch` tests build engines directly.
- NIXL and Mooncake real-backend read smoke on GB200 (pinned CPU and GPU buffers, packed and contiguous keys, bitwise compare): both pass.
- RL integration tests (NIXL in every entry except run 2 of `rl_grpo_checkpoint_resume`, which uses TorchStore): via `ciflow/rl` CI.
ghstack-source-id: d3fa5c6
Pull-Request: #6125
@dataclass(kw_only=True, slots=True)
class Config(Configurable.Config):
backend: Literal["mooncake", "nixl"] = "mooncake"
backend: Literal["mooncake", "nixl"] = "nixl"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anecdotally I also heard NIXL should be faster than MoonCake

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

results with muse spark open show it at 8x faster, will follow up with the mooncake team on why

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the perf gap may be in our Mooncake integration

d4l3k added a commit that referenced this pull request Nov 17, 2026
## Summary (human-written)
<!-- Write this yourself, not with an AI tool. 2-5 sentences: the problem, why
     this approach, and what you checked yourself. -->

## Problem

`ModelStateDictTransport` (the default since #6125) only supports `model_state_dict_load_mode="cpu_prefetch"`; `gpu_fetch` (for hosts with little CPU memory, e.g. GB300) raises at config time and must fall back to TorchStore (#6070).

## Change

With `gpu_fetch`, each generator rank registers one GPU fetch buffer sized to the largest FSDP load group. During the load, `fetch_` reads each group's pieces from the trainer's pinned CPU staging buffers into it (one-sided RDMA, deadline `read_timeout_s`) and copies them into the sharded params, unpacking packed keys. Trainer GPU -> trainer pinned CPU -> generator GPU; no generator CPU copy.

- `ModelStateDictTransport.connect_fetching_generator` / `fetch_`.
- `ModelStateDictLoader.load_groups` (+ engine property) gives the per-group layouts.
- `Generator` uses them for its layout and for the gpu_fetch load; TorchStore remains the `None` path.
- Removes the cpu_prefetch-only `ValueError`.

Depends on #6097 (packed reads) and #6125.

| | Before | After |
|---|---|---|
| `gpu_fetch` + transport | `ValueError` | RDMA reads into GPU |

Lines: impl +223/-50 (incl. docs), tests +66/-6.

Numerics: unchanged; reads are exact copies (checked bitwise).

Test plan:
- `pytest tests/rl/unit_tests/cpu`: 658 passed (4 pre-existing env failures). New `test_gpu_fetch`: 4 trainer -> 2 generator ranks, contiguous bf16, packed stacked and preserved-fp32 keys across two groups.
- Real NIXL/Mooncake GB200 smoke (trainer pinned CPU -> generator GPU fetch buffer, packed + contiguous keys): bitwise match.
- RL integration tests via `ciflow/rl` (regression only: no CI config runs `gpu_fetch` with the transport; the GB200 smoke above is the end-to-end check).
ghstack-source-id: b0c51d2
Pull-Request: #6127
@d4l3k
d4l3k changed the base branch from gh/d4l3k/9/base to main November 17, 2026 16:20
@d4l3k
d4l3k merged commit 49dbf7a into main Nov 17, 2026
d4l3k added a commit that referenced this pull request Nov 17, 2026
d4l3k added a commit that referenced this pull request Nov 17, 2026
## Summary (human-written)
<!-- Write this yourself, not with an AI tool. 2-5 sentences: the problem, why
     this approach, and what you checked yourself. -->

## Problem

`ModelStateDictTransport` (the default since #6125) only supports `model_state_dict_load_mode="cpu_prefetch"`; `gpu_fetch` (for hosts with little CPU memory, e.g. GB300) raises at config time and must fall back to TorchStore (#6070).

## Change

With `gpu_fetch`, each generator rank registers one GPU fetch buffer sized to the largest FSDP load group. During the load, `fetch_` reads each group's pieces from the trainer's pinned CPU staging buffers into it (one-sided RDMA, deadline `read_timeout_s`) and copies them into the sharded params, unpacking packed keys. Trainer GPU -> trainer pinned CPU -> generator GPU; no generator CPU copy.

- `ModelStateDictTransport.connect_fetching_generator` / `fetch_`.
- `ModelStateDictLoader.load_groups` (+ engine property) gives the per-group layouts.
- `Generator` uses them for its layout and for the gpu_fetch load; TorchStore remains the `None` path.
- Removes the cpu_prefetch-only `ValueError`.

Depends on #6097 (packed reads) and #6125.

| | Before | After |
|---|---|---|
| `gpu_fetch` + transport | `ValueError` | RDMA reads into GPU |

Lines: impl +223/-50 (incl. docs), tests +66/-6.

Numerics: unchanged; reads are exact copies (checked bitwise).

Test plan:
- `pytest tests/rl/unit_tests/cpu`: 658 passed (4 pre-existing env failures). New `test_gpu_fetch`: 4 trainer -> 2 generator ranks, contiguous bf16, packed stacked and preserved-fp32 keys across two groups.
- Real NIXL/Mooncake GB200 smoke (trainer pinned CPU -> generator GPU fetch buffer, packed + contiguous keys): bitwise match.
- RL integration tests via `ciflow/rl` (regression only: no CI config runs `gpu_fetch` with the transport; the GB200 smoke above is the end-to-end check).
ghstack-source-id: 3be2885
Pull-Request: #6127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/fake-pg Run 1-GPU Fake PG integration tests ciflow/rl CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants