Enable DeepSeek-V3 Wide-EP disaggregated inference + fix DP=32 correctness - #181
Open
raviguptaamd wants to merge 6 commits into
Open
Enable DeepSeek-V3 Wide-EP disaggregated inference + fix DP=32 correctness#181raviguptaamd wants to merge 6 commits into
raviguptaamd wants to merge 6 commits into
Conversation
…del-neutral) Carry the model-agnostic NIAH improvements from the GLM branch onto mainline: multi-seed variance reporting, cold-start JIT warmup + readiness poll, and timeout-vs-wrong-answer distinction. Thinking-model handling is ungated (no GLM name-check) so it applies to any reasoning model. Co-Authored-By: Claude <noreply@anthropic.com>
…submit -e) Let models.yaml env: override image-baked container ENV defaults while a genuine submit-time -e still wins, via MODELS_YAML_PROTECT. Generic mechanism (comments model-neutral); needed so a model's recipe knobs aren't shadowed by a tuned image. Co-Authored-By: Claude <noreply@anthropic.com>
…enchmark selector Slurm captures which recipe knobs the user set at submit (MODELS_YAML_PROTECT, consumed by the driver's 3-tier precedence) and adds BENCHMARK_SCRIPT=niah to select benchmark_niah.sh alongside sweep/long_context. Co-Authored-By: Claude <noreply@anthropic.com>
Without --max-model-len vLLM sizes the attention workspace for the model's full 163840 context, producing a ~128 GiB allocation that OOMs alongside the EP-sharded weights (96.5 GiB/GPU at DP=8). Wire MAX_MODEL_LEN (models.yaml recipe) through the moriio wideEP serve path; set 65536 for DeepSeek-V3 (covers the NIAH 35k-word sweep). Co-Authored-By: Claude <noreply@anthropic.com>
…d vLLM Repin BASE_IMAGE to the shikpate ROCm/vLLM/MoRI-1.2.3 base and VLLM_REPO/REF to raviguptaamd/vllm@dsv3-wideep-clean (the Wide-EP MoRI-IO base minus GLM sparse-DSA commits; DeepSeek-V3 uses standard MLA so DSA is unused). Validated end-to-end: DSv3 serves + NIAH passes at 1P/1D wideEP. Co-Authored-By: Claude <noreply@anthropic.com>
The mori_high_throughput (InterNodeV1) prefill all2all dispatch silently mis-routes MoE tokens at >=32-way expert parallelism, corrupting prefill KV so decode emits empty/wrong output. Validated on DeepSeek-V3 NIAH: 4P/1D and 4P/4D (PREFILL_DP=32) collapse to ~3-4/10 with empty answers on high_throughput, and recover to ~8/10 (matching the DP<=16 baseline) on low_latency; 1P/4D (DECODE_DP=32, PREFILL_DP=8) is clean, isolating the fault to the prefill HT path. Pre-existing in rocm/MAD develop (stock mainline image reproduces it) and NOT fixed by MoRI tip, so select low_latency for prefill when PREFILL_DP_SIZE>=32. Any explicit PREFILL_MORI_BACKEND/VLLM_ALL2ALL_BACKEND override still wins. Co-Authored-By: Claude <noreply@anthropic.com>
raviguptaamd
requested review from
Rohan138,
amathews-amd,
coketaste,
gargrahul and
ppalaniappan-amd
as code owners
July 27, 2026 02:52
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.
Enable DeepSeek-V3 Wide-EP disaggregated inference + fix DP=32 correctness
Related: #176 (complementary; this PR is separate and surgical — #176 is untouched).
Summary
Enables DeepSeek-V3 (671B FP8) on the
vllm_disaggMoRI-EP wide-EP path and fixes asilent MoE token-routing corruption at 32-way expert parallelism (DP=32). Inspired by
and complementary to #176; kept as a separate, surgical PR (7 files, +164/−32) so #176 is
untouched.
Validated end-to-end with NIAH long-context accuracy on MI300X (gfx942) across 1P/1D, 2P/2D,
4P/4D. At DP=32 the fix restores accuracy to the DP≤16 baseline (~8/10, zero empty answers).
What's in here
mori_low_latencywhenPREFILL_DP_SIZE ≥ 32(connectors/moriio.sh)mori_high_throughput(InterNodeV1) prefill dispatch silently mis-routes MoE tokens at ≥32-way EP → corrupt prefill KV → empty/wrong decode.low_latency(which decode already uses) is clean at DP=32. DP≤16 unchanged; any explicit override still wins.--max-model-len(connectors/moriio.sh+models.yamlMAX_MODEL_LEN)docker/vllm_disagg_inference.ubuntu.amd.Dockerfile)models.yamlenv precedence (image-baked < yaml < submit-e) + submit-time protect-list (vllm_disagg.sh,run_xPyD_models.slurm)models.yaml env:recipe override image-baked ENV while a genuine submit-time-estill wins.niahbenchmark selector + generalized NIAH harness (multi-seed, warmup/readiness, timeout-vs-wrong, model-neutral) (run_xPyD_models.slurm,benchmark_niah.{py,sh})Backend / image refs
rocmshared/pytorch-private:vllm-rocm_07_22_2026_shikpate_mori1.2.3(shikpate MoRI-1.2.3 base)https://github.com/raviguptaamd/vllm.git @ dsv3-wideep-clean(Wide-EP MoRI-IO base + a generic crash-safe rmsnorm probe fix; GLM sparse-DSA commits stripped —
DeepSeek-V3 uses standard MLA. Delta vs base = only
vllm/_aiter_ops.py, 2 lines.)This fork/branch is public.
v1.2.1, AITER0.1.16.post3, routerravgupta/discovery-dp-rank-roundrobin.Validation (NIAH mean /10, 2k/8k/20k/35k words, 3 seeds)
Notes / follow-ups
needed to toggle it; explicit
PREFILL_MORI_BACKEND/VLLM_ALL2ALL_BACKENDstill override.stock develop). The
low_latencyprefill path is the low-risk production fix here. The full HT-kernelfix is characterized for the MoRI team separately; open cost is the LL-vs-HT prefill throughput trade,
quantifiable with a perf sweep.
Test plan
WITH_NIXL=0lean is sufficient for the MoRI-EP path).BENCHMARK_SCRIPT=niah,MODEL_NAME=DeepSeek-V3,CONNECTOR=moriio WIDE_EP=1 EP_BACKEND=mori.found=0/10.PREFILL_DP_SIZE=32 >= 32: defaulting prefill backend to mori_low_latency.🤖 Generated with Claude Code