Repository navigation
Conversation
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
# Conflicts: # docs/design/module/ffn_runtime.md # tests/unit/model_executor/models/test_qwen3_moe_construction.py
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
The pre-commit mypy run (pinned 1.11.1, follow-imports=skip for tests) flagged two issues the local dev env run missed: - The new M2N EPLB test annotated fake-dist buffers with torch.Tensor; under follow-imports=skip torch is not resolvable. Drop the annotations. - metadata.py, touched by the EPLB change, still carried pre-existing one-argument Generator[...] annotations that mypy 1.11 rejects; complete them to Generator[..., None, None].
vLLM logs EPLB balancedness from EplbState.step, which the M2N driver never runs (routing, and load recording, are on Attention). Wire the existing log_balancedness eplb-config flag to the M2N boundary instead: when set, FFN world rank 0 logs, per MoE layer, the logical experts each FFN rank holds after a rearrangement, the replicated ones, and the recorded per-rank token load that drove the choice.
The placement log added for DeepEP M2N now also runs on the P2P path, where EplbState.step commits rearrangements itself: GPUFFNModelRunner's eplb_step snapshots the committed map only on steps where the counter boundary or a pending async transfer can commit, and logs the placement (plus vLLM's balancedness stats, which log_balancedness already drove) when the map actually changed, on EP rank 0 only. The placement formatters move to afd_plugin/distributed/eplb.py so the shared runner and the DeepEP M2N connector module use one implementation without the runner importing an M2N-specific module.
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
# Conflicts: # docs/design/module/model_integration.md # tests/unit/connectors/test_p2p_connector.py # tests/unit/model_executor/models/test_deepseek_v2_proxy.py # tests/unit/model_executor/models/test_qwen3_5_contract.py # tests/unit/model_executor/models/test_qwen3_moe_construction.py # tests/unit/v1/worker/test_ffn_model_runner.py # tests/unit/v1/worker/test_ffn_routed_experts_model_runner.py # tests/unit/v1/worker/test_model_runner_v2.py
Signed-off-by: Shlomit Koyfman <shlomitk@il.ibm.com>
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.
Purpose
Enable FFN-side EPLB (Expert Parallel Load Balancing) for CUDA AFD deployments on the pinned vLLM 0.30.0.
The FFN role now owns vLLM's native EPLBController and follows the upstream GPUModelRunner wiring: the loaded model registers its native DeepseekV2MoE layers (via the inherited MixtureOfExperts protocol), and every connector-driven step prepares the router's unpadded token count and steps the EPLB state. Rearrangement, load-window all-reduce, in-place map
commit (CUDA-graph compatible), and expert-weight transfer (nixl/torch_gloo auto-selected) all run in upstream EplbState machinery — no plugin duplication.
Two deployment recipes enable EPLB on DeepSeek-V2-Lite (2A2F colocation, single-node and multipod) with 32 redundant experts (96 physical, 48 per FFN rank at EP size 2).
Design notes: docs/design/module/ffn_runtime.md ("FFN-side EPLB" section).
Issue
Scope
Implementation Notes
(as in the recipes).
commit (ced6857afa0ea7b2e3f0846a62e1394e90f15607).
collectives hang.
extracted to avoid a third copy of the connector's expansion rules.
Test Plan
CPU-only (this PR):
GPU-gated (follow-up, not run here): serve both recipes' commands against DeepSeek-V2-Lite, confirm the FFN log shows EPLB is enabled for MoE part of model, a Rearranging experts line after step_interval - step_interval/4 steps, and GSM8K smoke accuracy; then wire an E2E scenario.
Test Result
Docs Impact
────────────────────────────────────────────────────────────────────────────────
Essential PR Checklist
────────────────────────────────────────────────────────────────────────────────