Skip to content

[DeepEP] support MXFP4 quant#566

Merged
kaniel-outis merged 6 commits into
sgl-project:mainfrom
zuje123:br_dp_ll_mxfp4
Jul 13, 2026
Merged

[DeepEP] support MXFP4 quant#566
kaniel-outis merged 6 commits into
sgl-project:mainfrom
zuje123:br_dp_ll_mxfp4

Conversation

@zuje123

@zuje123 zuje123 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

DeepEP supports MXFP4 quantization (for 910D)

Test Results
================ test_low_latency.py ================
[rank 0] raw_num_tokens: 16, aligned_num_tokens: 16
[rank 1] raw_num_tokens: 16, aligned_num_tokens: 16
[testing] Running with quant_type='mxfp4', data=rand ...
[test] rank=0, low_latency_dispatch, simulated_gemm_x.shape=torch.Size([256, 7168]), simulated_gemm_x.dtype=torch.bfloat16
[test] rank=1, low_latency_dispatch, simulated_gemm_x.shape=torch.Size([256, 7168]), simulated_gemm_x.dtype=torch.bfloat16
[test] rank=0, low_latency_dispatch, packed_recv_count.shape=torch.Size([8]), packed_recv_count=tensor([15, 15, 20, 16, 15, 15, 18, 9], device='npu:0')
[test] rank=0, low_latency_dispatch, packed_recv_x[0].dtype=torch.float4_e2m1fn_x2, packed_recv_x[0].shape=torch.Size([256, 3584])
[test] rank=0, low_latency_dispatch, packed_recv_x[1].dtype=torch.float8_e8m0fnu, packed_recv_x[1].shape=torch.Size([57344])
[test] rank=1, low_latency_dispatch, packed_recv_count.shape=torch.Size([8]), packed_recv_count=tensor([22, 16, 18, 15, 16, 11, 16, 19], device='npu:1')
[test] rank=1, low_latency_dispatch, packed_recv_x[0].dtype=torch.float4_e2m1fn_x2, packed_recv_x[0].shape=torch.Size([256, 3584])
[test] rank=1, low_latency_dispatch, packed_recv_x[1].dtype=torch.float8_e8m0fnu, packed_recv_x[1].shape=torch.Size([57344])
[rank1]:[W623 05:25:23.427888390 compiler_depend.ts:41] Warning: Device do not support double dtype now, dtype cast replace with float. (function operator())
[rank0]:[W623 05:25:23.428825150 compiler_depend.ts:41] Warning: Device do not support double dtype now, dtype cast replace with float. (function operator())
rank 0 PASSED [quant_type='mxfp4'] avg_diff=0.00004, max_diff=1.98265, cosine_diff=0.00775
rank 1 PASSED [quant_type='mxfp4'] avg_diff=-0.00031, max_diff=1.98790, cosine_diff=0.00768
passed

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Comment thread csrc/deepep/ops/op_kernel/moe_distribute_dispatch_v2_a5.h Outdated
Comment thread csrc/deepep/ops/op_kernel/moe_distribute_dispatch_v2_a5.h Outdated
kaniel-outis

This comment was marked as duplicate.

@kaniel-outis kaniel-outis merged commit be6b5e7 into sgl-project:main Jul 13, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants