Repository navigation
[Config] [Perf] Tune DeepSeek V4.1 EP16 A4W4 for routed and shared experts - #7389
Conversation
Signed-off-by: james-huang09 <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
|
@valar-cop review |
valar-cop
left a comment
There was a problem hiding this comment.
some changes needed..
need the fused_moe log showing one of these rows selected for EP16, and the source tuning report for these numbers (24 local experts?)
ci green.
…perts (#7389) * [Perf] Add DeepSeek V4.1 EP16 A4W4 MoE tuning configs Signed-off-by: james-huang09 <[email protected]> * [Config] Retune DSV4.1 EP16 A4W4 and add shared expert configs * [Config] Keep DSV4.1 EP16 PR limited to tuning table --------- Signed-off-by: james-huang09 <[email protected]> Co-authored-by: yzhou103 <[email protected]>
Add DSV4.1 Flash EP16 A4W4 tuning rows to
dsv41_fp4_tuned_fmoe.csv.1. Configurations
Hidden size 5120, intermediate size 2304, BF16 output, MXFP4 activations/weights, per-32 scaling, SiLU and G1U1.
The router selects six routed experts. In 25/7, shared is appended as the seventh slot with weight 1.
Both configurations cover 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 and 131072 tokens, for 18 rows total.
2. Tuning
flydsl_moe1_*andflydsl_moe2_layout_*, using a bounded search with balanced local routing, five warmups and 30 profiler iterations.The E24/K6 source input and log are archived under
/home/hzm/d41tune/, with explicitexpert=24, topk=6entries. New inputs, results and measurement logs are under/home/hzm/dsv41_ep16_review_20261105/(input.csv,tuned42.csv,tune42.log,tune42_chunked.log). The untimed sorted-reference gather uses equivalent batching, verified bitwise against the original on CPU and gfx950.3. EP Validation
36 cases passed: 18 EP configuration lookups and 18 numerical
fused_moecalls across all token buckets with realexpert_mask. All calls select the configured kernel pair. The 25/7 cases include an always-active shared expert.Full outputs are finite. The independent Torch reference checks 32 sampled rows and both quantization boundaries; maximum mean row cosine error is 0.00080180, below 0.01.
Validation log
Validation covers one rank's compute in an EP16 layout. Full 16-GPU ATOM deployment and inter-node performance were not measured; tuning uses uniform local routing rather than the shared expert's deployment load.
4. Checks
CSV schema, block-M consistency, unique lookup keys and merged-table collisions checked. The original 137 rows are preserved.
Local checks passed over the full repository and complete PR scope: Black 26.10.1, Ruff 0.16.0, repository pre-commit, dependency pre-check and diff whitespace checks.
PR Self-Review
Reviewed revision
2c9557c508d9a1de5af7f8274c1a471541365570Behavior and intent
18 DSV4.1 EP16 A4W4 tuning rows for the configurations in Section 1.
Validation and unverified scope
See Sections 3 and 4 for validation results and deployment scope.
PR-specific question
expert_maskselects the tuned pairs for all 18 configurations.Changed op tests
None. The validation harness and logs are retained separately; this PR contains only the tuning table.