Skip to content

perf: tune Nemotron non-gated MoE on S5000 - #114

Draft
yeahdongcn wants to merge 1 commit into
mainfrom
codex/nemotron35-moe-config-pr-20260915
Draft

yeahdongcn wants to merge 1 commit into
mainfrom
codex/nemotron35-moe-config-pr-20260915

Conversation

@yeahdongcn

Copy link
Copy Markdown
Collaborator

Summary

Add the S5000 Triton 3.2 tuning path for NVIDIA Nemotron 3.5 Lightning's non-gated relu2 MoE and include the first fresh M=8 configuration from the merged vLLM-MUSA performance campaign.

Nemotron shape:

  • E=128
  • K=2688
  • N=1856
  • topk=6
  • non-gated relu2_no_mul

The config uses default tiles for M=1/4/6 and a fresh tuned tile for M=8. This prevents the M=8 tile from being selected for MTP2/MTP4 while targeting the M≈7/8 routed-token bucket used by MTP6.

Validation

  • Fresh S5000/Triton 3.2 M=8 search: 396 candidates, 10 timing iterations per candidate.
  • Microbenchmark: 17.824 ms -> 15.119 ms (15.2%).
  • vLLM-MUSA MTP6 E2E on S5000, TP1/BF16, 4096 input / 1000 output, PCG + full decode graph:
    • baseline: 8.106 ms/token, 9.528 s done latency
    • tuned config: 6.949 ms/token, 8.189 s done latency
    • output hash unchanged: 540ddb72...
  • Remote tests: 17 passed.

Scope and follow-up

This PR includes the non-gated tuner/runtime semantics required to generate and load the config on the post1 Triton 3.2 stack. MTP2/MTP4 long-run validation with the explicit default buckets remains in progress; no claim is made for those modes yet. The config was generated on the current S5000 host and is not copied from the withdrawn historical Triton 3.2 file.

num_tokens = hidden_states.shape[0]
E, N, _ = w1.shape
topk = topk_ids.shape[1]
if (is_gated and activation != "silu") or (not is_gated and activation != "relu2_no_mul"):

@froststeam froststeam Sep 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hard-codes gated=silu / non-gated=relu2_no_mul, so SGLang Gemma (and other gelu/swiglu MoEs) can no longer tune or run through this path. Please keep the Nemotron relu2 path, but don't reject other activations here.

"num_warps": 4,
"num_stages": 2
},
"8": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file only covers M=1/4/6/8, so any larger batch falls back to M=8. That is too small for prefill / high-
concurrency decode. Please also tune larger buckets (16, 32, 64, ..., 4096).

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.

2 participants