Repository navigation
Conversation
NCCL has no Float8_e8m0fnu dtype, so EPLB startup fails for MXFP4/MXFP8 experts. Register those tensors as same-storage uint8 views so EPLB moves the raw scale bytes while kernels keep reading the E8M0 parameter. Fixes vllm-project#51567 Co-authored-by: Claude Signed-off-by: zack <51604064+luoyuctl@users.noreply.github.com>
luoyuctl
force-pushed
the
eplb-e8m0-byte-view
branch
from
October 15, 2026 09:13
d31a1eb to
09084f2
Compare
EPLB only copies bytes, so view every 1-byte expert tensor as uint8 instead of special-casing E8M0. This also covers float4_e2m1fn_x2 (ROCm AITER MXFP4), which RCCL does not support either. Co-authored-by: Claude Signed-off-by: zack <51604064+luoyuctl@users.noreply.github.com>
luoyuctl
force-pushed
the
eplb-e8m0-byte-view
branch
from
October 15, 2026 09:30
09084f2 to
fd73d96
Compare
luoyuctl
marked this pull request as ready for review
October 15, 2026 09:33
Contributor
Author
|
@ZJY0516 @ilmarkov @SageMoore hi, do you have time to review? thx |
Contributor
|
Fix looks good to me. Please, add the validation results for mxfp4 model deployment with eplb to PR description. |
Contributor
Author
@ilmarkov i ran a e2e test and full GSM8K eval test , both worked. also added the MXFP4 + EPLB deployment results (DeepSeek-V4.1-Flash, Humming MXFP4 MoE, EP8 with sync EPLB on 8x H20) to the description, you can check it , thanks |
Open
2 of 6 tasks
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.


Purpose
Fixes #51567.
When EPLB is enabled, expert tensors whose dtype NCCL does not support make engine startup fail. MXFP4 and MXFP8 experts store block scales as
torch.float8_e8m0fnu. ROCm AITER MXFP4 also views expert weights astorch.float4_e2m1fn_x2. Neither dtype exists in NCCL or RCCL.I hit this with DeepSeek-V4.1-Flash using MXFP4 experts (Humming MoE backend), TP8 + EP + EPLB, on 8x H20. The crash happens in the first rearrange during memory profiling.
With
communicator=torch_nccl:With
communicator=pynccl:When this triggers
The bug is not tied to a specific model architecture. It depends on the dtype that the MoE backend leaves in the expert parameters after weight post-processing. Startup fails when all of these hold:
EPLB is enabled (
--enable-eplb, with EP).The experts use MX quantization (MXFP4/MXFP8 with E8M0 block scales).
After post-processing, the backend stores an expert tensor in a 1-byte dtype that NCCL/RCCL does not support. For example:
mxfp4_marlin_process_scales()returns scales asfloat8_e8m0fnu.float4_e2m1fn_x2(oracle/mxfp4.py).float8_e8m0fnu.Backends that keep these tensors as
uint8are not affected.The tensor is returned by
get_expert_weights(), so it is registered for EPLB transport.Converting at load time is not enough. DeepSeek-V4/V4.1 loaders already view checkpoint E8M0 scales as
uint8, but the backend's kernel-format conversion writesfloat8_e8m0fnuback into the parameter. The fix therefore belongs where the tensors are registered for EPLB, not in individual loaders or backends.Root cause
EPLB treats expert tensors as opaque payload. It only sends, receives, and all-gathers them, and never reduces them. However, it passes their numeric dtype straight to the communicator. On the first rearrange (the dummy all-gather during
determine_available_memory), the communicator has to map that dtype to an NCCL dtype. NCCL only supportsint8/uint8/int32/int64/fp16/fp32/fp64/bf16and FP8 E4M3/E5M2, so the mapping fails:torch_ncclraisesTypeErrorinsideall_gather.pyncclrejects the dtype earlier, when the communicator is created.Fix
EPLB only copies expert bytes between ranks. It never reduces them, so the numeric dtype does not matter to the transport. In
MixtureOfExperts.set_eplb_state(), every 1-byte expert tensor is now registered asw.view(torch.uint8):FusedMoElayers, models with their ownget_expert_weights()(for example DeepSeek-V4 MegaMoE), and elastic EP re-registration.int8,uint8,float8_e4m3fn) move the same bytes as before.Test Plan
Test Result
Unit test: the new test is parametrized over
float8_e8m0fnuandfloat4_e2m1fn_x2. Both cases pass with this change and fail onmain. pre-commit (ruff, mypy) passes.MXFP4 deployment with EPLB (8x H20, SM90): DeepSeek-V4.1-Flash with MXFP4 experts, Humming MoE backend (
HummingIndexedExperts), TP8 + EP + EPLB (sync,pynccl, 16 redundant experts,step_interval=1500). The image isvllm/vllm-openai:v0.30.0with this PR's diff applied tointerfaces.py. On this setup, startup previously failed with the tracebacks above.Traceback,Float8_e8m0fnu,unsupported dtypes, orTypeError.AI assistance
This PR was prepared with AI assistance (Claude). I reviewed every changed line and ran the tests above.