Skip to content

Fix int4 MoE tuner config filename - #35260

Merged
BBuf merged 3 commits into
sgl-project:mainfrom
maithilijoshi20:fix/int4-moe-tuner-config-key
Sep 18, 2026
Merged

BBuf merged 3 commits into
sgl-project:mainfrom
maithilijoshi20:fix/int4-moe-tuner-config-key

Conversation

@maithilijoshi20

@maithilijoshi20 maithilijoshi20 commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #35252

Summary

  • Keep the int4_w4a16 tuner config key aligned with the runtime down-projection dimension.
  • Add regression coverage for the emitted config filename.

Testing

  • Focused MoE config test: 3 passed.
  • Ruff, isort, Black, and git diff --check passed.
  • CUDA/Triton smoke check passed on an NVIDIA RTX 3050 in WSL.

The config-only test uses a stub for sgl_kernel because the available binary wheel targets a different GPU architecture; no kernel execution is covered by this change.


CI States

Latest PR Test (Base): ❌ Run #32810867033
Latest PR Test (Extra): ❌ Run #32810866824
Latest PR Test (AMD ROCm 7.2): ❌ Run #32810867026

Signed-off-by: maithilijoshi20 <maithilij2003@gmail.com>
@maithilijoshi20

Copy link
Copy Markdown
Contributor Author

@JeremiahM37 This PR removes the extra int4-specific halving from both the tuner lookup and generated config filename, so the tuner now emits the runtime key (for example, E=256,N=256). Would you be able to try your reproduction and confirm it resolves the issue on your setup?

@JeremiahM37

Copy link
Copy Markdown

Confirmed, this fixes it — thanks for picking it up.

I couldn't re-run the full tune+serve (my ROCm image is gone), so I verified the filename logic directly against the model from the report (E=256, shard_intermediate_size=512):

main     -> E=256,N=128,...,dtype=int4_w4a16.json
this PR  -> E=256,N=256,...,dtype=int4_w4a16.json

which is exactly the key the server was looking for.

Good catch on the second copy in common_utils.py — I'd only cited the one in tuning_fused_moe_triton.py, and fixing that alone would have left the written filename wrong.

@maithilijoshi20

Copy link
Copy Markdown
Contributor Author

@BBuf Could you help review or route this small fused-MoE tuner config fix? The issue reporter validated the filename correction.

@BBuf

BBuf commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

@BBuf Could you help review or route this small fused-MoE tuner config fix? The issue reporter validated the filename correction.

Thanks for your fix.

@BBuf
BBuf merged commit 0dad91d into sgl-project:main Sep 18, 2026
107 of 120 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.

[Bug] MoE tuner writes config files the runtime never reads (int4_w4a16)

3 participants