Repository navigation
Conversation
…opies - The MX worker id named the generator's registration, version leases and NIXL agent after `rank_offset + self.rank`. vLLM's worker rank restarts at 0 in every data-parallel engine, so all engines of a DP>1 server registered under the same id, shared one version lease, and the first engine to finish released it for all. The id now uses the device index, as the NCCL worker does. - The sender keeps the state dict it publishes from. Packed parameters' splits are copies (full q/k/v per layer), so they stayed allocated through every training step. The sender now drops the dict after each release; the next broadcast refreshes it. Trainer and inference layouts need not match; the docs list the combinations covered (FSDP, EP, CP, HSDP and uneven shards on the trainer; TP, DP and DP+EP on inference), each checked bit-exact against the weights loaded from disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MX uses the worker id only as an opaque key: the worker's registration, its
version lease (the server derives the lease id from the version and worker
id, one lease per worker and version) and its NIXL agent name. It needs the
id to be unique; nothing in MX expects dense ranks or a worker count.
The id was the device index plus a `rank_offset` the orchestrator assigned
(`index * workers_per_server`). That needed the inference layout
(`inference_world_size`, the same number of GPUs on every server) and assumed
one worker per GPU on visible devices 0..N-1.
Each worker now names itself `{session}:{GPU UUID}:{pid}`. The GPU UUID is
unique across data-parallel engines, external-LB servers, P/D roles and
replicas without any global knowledge. The process id keeps ids unique when
engines share a GPU, and fresh after an engine restarts. The id is stable
within a process, so a repeated `init_broadcaster` (the Dynamo admin plane
sends one before every update) keeps the running client.
- The orchestrator and the Dynamo admin plane send every engine the same
initialization, without `rank_offset` or `inference_world_size`. Dynamo no
longer adds the instance id to the session.
- `/init_broadcaster` passes its body to the worker extension as keyword
arguments, so each transport's extension takes its own fields. The NCCL
request and worker are unchanged and keep `rank_offset`.
- MX no longer reads `weight_broadcast.inference_world_size`; the field stays
for NCCL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `[weight_broadcast] type = "modelexpress"` and `pull = true`, each inference server moves itself onto every
version the trainer publishes, instead of the orchestrator pausing every engine and pushing each update.
- Engine (`inference/vllm/weight_pull.py`). A task in the API server polls ModelExpress for the newest READY
version published after the one it serves. Every worker stages it on a background thread while the engine
serves; once all have, the engines pause with the running requests kept, install it, label the tokens sampled
from then on with its step and resume. The first version of a trainer stages while paused: that stage records
the layout on the live model.
- Groups. `Engines` is the interface (init, can_stage_live, stage, discard, pause, apply, resume). `LocalEngine`
moves this server's engines in process, every data-parallel engine of an internal-LB server included.
`EngineGroup` moves the ranks of an external-LB DP group through new admin routes
(`/modelexpress/{can_stage_live,stage,discard,apply}`, `/pause`, `/resume`), so its first rank pulls for the
group (`weight_broadcast.pull_group`, set by the multi-node template). vLLM's data-parallel pause stops every
rank at the same step. Groups switch independently.
- Failures. A failed stage leaves the live weights untouched and the engines keep serving. A failed install keeps
the engines paused and installs the newest version from scratch until one succeeds; past `timeout` the server
exits.
- `GET /weight_version` returns the label the engine serves.
- Trainer. Each rank publishes from one host copy, so it holds one version. Before publishing the next, the
master marks the previous one RELEASING (no new leases) and every rank waits until the reads in flight end. No
install is awaited, except for the last version at close. A new trainer retires a previous trainer's READY
versions.
- Orchestrator. `ModelExpressPullWeightReceiver` initializes, pauses and pushes nothing: it waits until every
engine serves the version or a newer one of this trainer, then marks it installed. The watcher keeps
dispatching across a swap.
- `rl` rejects pull with Dynamo, draft swaps and rollout checkpoints; SFT rejects it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to ModelExpress - docs/model-express.md: how pull stages, switches and fails, and what the trainer and the orchestrator still do. - The puller retries connecting the engines to ModelExpress until the server answers, so engines may start before it. Its log line now separates reaching the pause from the time paused. - Config tests: pull reaches the engines, the trainer and the orchestrator; the arguments a group leader gets parse; pull rejects rollout checkpoints and transports other than ModelExpress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…served version ids; model name override - `weight_broadcast.pull_group` becomes `weight_broadcast.group`, which no longer needs `pull`: it is the admin URL of every rank of the server's DP group, and the multi-node launcher gives it to the first rank of each group whether or not the engines pull, so anything that moves a group's weights can find its ranks. - `GET /weight_version?uid=true` also returns the ModelExpress version every worker installed last (`modelexpress_served`, cleared while an install runs); `Engines.served()` reads it. The plain route, which the orchestrator polls, stays a label read. - `weight_broadcast.model_name` names the model versions are published under, defaulting to `vllm.model`, and reaches `init_broadcaster`. - `WeightPuller.lock` is held through every switch, for anything else that moves the same engines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An install that failed keeps the engines paused and retries with the newest version. A failure to list the versions then retries the same version instead of leaving the switch while paused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hed engines The first version of a trainer stages after the pause. When that stage fails, no install started, so the live weights are untouched: discard, resume and let the puller retry later, instead of keeping the engines paused as after a failed install, which may leave the weights partly written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`weight_broadcast.staging_host_bytes` gives every inference GPU pinned host memory, on its NUMA node, that receives a whole version while the engines serve. The pause then copies it to the GPU through the bounded staging buffers and installs it, so it takes host-to-device time instead of the wire time of every engine sharing a trainer, with no more GPU memory than bounded staging. The memory is pinned in the background from when the engine connects to ModelExpress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hallerite
force-pushed
the
feat/mx-pull
branch
from
December 3, 2026 22:05
a27ad19 to
d397d5b
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.
weight_broadcast.staging_host_bytesgives every inference GPU pinned host memory, on its NUMA node, that receives a whole version while the engines serve. The pause then only copies the version to the GPU through the bounded staging buffers and installs it.gpu_memory_utilizationstays where it is.Changes:
staging_host_byteson the ModelExpress weight broadcast config, and on the inference config for pulling engines.staging_buffer_bytes.init_broadcasterin both modes: engines that pull, and orchestrator pushes.docs/model-express.md: the option and its memory floor, and the recommendation to setMX_RDMA_NIC_PIN = "auto"in[inference.env_vars]. Without it, reads into host memory converge on a few NICs and take twice as long.It requires a ModelExpress release with
staging_host_bytes; the dependency pin moves when one is out.Results
Setup:
gpu_memory_utilizationin every run; 17 updates per run.Host memory: each engine node pinned about 640 GiB (8 x 80 GiB), in the background in under 25 s.
Stacked on #4822 (engines pull ModelExpress versions). Draft until a ModelExpress release includes
staging_host_bytes.🤖 Generated with Claude Code