You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move the MoE CPU offload roadmap and its images to docs/moe-cpu-offload/.
Remove the obsolete docs/next_steps/ hierarchy.
Restore the two exploratory routing graphs, their interpretation, and links to the merged foundation PRs.
Split the remaining implementation into fixed kernel-order hybrid inference followed by adaptive swaps.
Define nonblocking end-of-inference swaps, CPU-first transfer ordering, and a two-exchange pinned-buffer/staging-slot limit.
Limit the deferred measurements to token throughput and peak CPU/CUDA memory for now.
Motivation and Context
The session-global expert counters landed in #32738. The roadmap now reflects the remaining work and separates hybrid inference correctness from dynamic placement changes.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The roadmap presents planned options as available and defines conflicting equal-counter placement ordering.
Review effort: Balanced Findings: None
Previously missed (2)
In code that hasn't changed since last review
Align documented session options with implementation status
docs/moe-cpu-offload/README.md:57
This says all four entries are already exposed, but the session-option header currently defines only alpha and beta; the offload target and epsilon are still listed as future work in Steps 1 and 2. As written, readers may try unsupported keys. Please distinguish implemented options from planned ones and specify whether future offload automatically enables the existing opt-in expert-counting mode or requires that toggle separately.
Define deterministic tie-breaking for expert redistribution
docs/moe-cpu-offload/README.md:103
This tie order conflicts with the redistribution objective below. With equal counters, sorting by expert_id before node identity spreads CUDA slots across nodes, whereas lines 198–200 require maximizing fully CUDA-resident nodes and put node index before expert ID. Define separate per-node/global ranking rules or use one consistent global tie order so equal-counter placement has an unambiguous deterministic result.
The reason will be displayed to describe this comment to others. Learn more.
Approved as a roadmap: validating fixed-placement hybrid inference before adaptive swaps is the right sequence. I would treat these as go/no-go checkpoints for implementation rather than blockers for this documentation PR:
At the start of Step 1, demonstrate that a mixed QMoE node can initialize and run when available GPU memory is less than the complete expert-weight requirement. The current planner places whole initializers, and CUDA QMoE prepacking can allocate buffers for all experts. Include initialization-time peak memory, packed weights, scales, and scratch; decide early whether the proposed internal operator/input-memory fallback is needed.
Define the initially supported dtypes, quantization modes, and weight layouts. CPU and CUDA QMoE use different packed representations, and the CPU implementation does not support every CUDA configuration (for example BF16 inputs or mixed-width QMoE). Test the same quantized experts on both devices for prefill and decode, and specify what CPU-ready representation is retained or produced when an expert leaves CUDA; copying CUDA-packed bytes to host alone is not sufficient.
Move reproducible throughput and peak CPU/GPU memory measurements to the end of Step 1, separating prefill and decode. Routing concentration is promising but does not establish that the more complex asynchronous swap/redistribution policy will improve end-to-end performance. Compare adaptive placement with fixed placement at the same memory envelope before committing to the full Step 2 machinery.
These gates would strengthen an otherwise sensible progression without changing the proposed scope of this PR.
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
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.
Description
docs/moe-cpu-offload/.docs/next_steps/hierarchy.Motivation and Context
The session-global expert counters landed in #32738. The roadmap now reflects the remaining work and separates hybrid inference correctness from dynamic placement changes.
Documentation-only change; no tests were run.