Repository navigation
[Kernel] Support SiTU in UnfusedOAITritonExperts - #63978
Gelato1337 wants to merge 1 commit into
Conversation
UnfusedOAITritonExperts runs the activation as a separate step through apply_moe_activation, which implements SiTU, but its supported-activation list left SiTU out. Kimi-K3 MoE layers therefore had no native MXFP4 backend on GPUs without an AITER SiTU kernel, such as MI250X (gfx90a). Add a numeric test against a torch reference with Kimi-K3's SiTU parameters. make_weights() gains an interleave_gate_up switch: SiTU takes the [gate | up] layout, which needs each half padded separately. Assisted-by: Claude Signed-off-by: Joonatan Laato <jlaato@gmail.com>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
Overview
UnfusedOAITritonExpertsnow accepts SiTU, giving Kimi-K3 MXFP4 MoE layers a native backend on GPUs without an AITER SiTU kernel, e.g. MI250X (gfx90a).Claims
moonshotai/Kimi-K3, MXFP4) serves on 4 nodes x 8 MI250X GCDs with--moe-backend triton_unfused; without this change no native backend accepts SiTU there andEMULATIONis used.apply_moe_activation.Validation
New
test_unfused_oai_triton_moe_situintests/kernels/moe/test_modular_oai_triton_moe.pycompares the unfused Triton MoE with SiTU (Kimi-K3'sbeta=4.0,linear_beta=25.0) against a torch reference, for the existing MNK cases.On 1x MI250X GCD, vLLM v0.31.0 ROCm image with this change bind-mounted:
Model evaluation, Kimi-K3, 4 nodes x 8 MI250X (LUMI), TP=8 PP=4,
--enable-expert-parallel --moe-backend triton_unfused, CUDA graphs, max-model-len 8192:--gpu-memory-utilization 0.88Without this change (same setup, automatic selection) the engine selects
EMULATION.Details
UnfusedOAITritonExpertsruns GEMM1, then the activation through the baseactivation()→apply_moe_activation(which implements SiTU withactivation_situ_beta/activation_situ_linear_betafrom the MoE config), then GEMM2. Its_supports_activationlist omitted SiTU.[gate | up]layout (as SiLU does), not the interleaved layout of SWIGLUOAI; the MXFP4 weight conversion forTRITON_UNFUSEDalready keeps that layout. This matches the contiguous[w1; w3]layout listed for SiTU onTRITON_UNFUSEDin [Quantization] Clarify MXFP4 MoE W13 layout requirement from backends #52240. The test helpermake_weights()gains aninterleave_gate_upswitch and pads each half separately so the split point stays in the middle; existing callers are unchanged.Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.