[LoRA] Support FusedMoE LoRA Triton kernel for mxfp4#29708
Merged
jeejeelee merged 7 commits intovllm-project:mainfrom Nov 30, 2025
Merged
[LoRA] Support FusedMoE LoRA Triton kernel for mxfp4#29708jeejeelee merged 7 commits intovllm-project:mainfrom
jeejeelee merged 7 commits intovllm-project:mainfrom
Conversation
Signed-off-by: Xin Yang <xyangx@amazon.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
There was a problem hiding this comment.
Code Review
This pull request re-introduces support for FusedMoE LoRA with Triton kernels for mxfp4 quantization, which was previously reverted. The changes are well-structured and mainly involve:
- Adding an
UnfusedOAITritonExpertsclass to allow for LoRA injection by separating GEMM, activation, and reduction steps. - Updating the mxfp4 backend selection logic to enable the Triton backend for LoRA when available.
- Adding a comprehensive test suite to validate the new unfused Triton kernel against a PyTorch reference implementation.
The changes look solid and align with the goal of modularizing the MoE kernels. I have a couple of suggestions for improving maintainability and robustness.
jeejeelee
reviewed
Nov 29, 2025
3e5e554 to
b55736c
Compare
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com> Signed-off-by: Xin Yang <105740670+xyang16@users.noreply.github.com>
jeejeelee
approved these changes
Nov 30, 2025
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR is to support FusedMoE LoRA Triton kernel for mxfp4 model.
y[dst_indx // n_expts_act, :] += x[src_indx, :], so that scatter sum across multiple experts, and collapseM * topktoMrows. Therefore, we need to setrouting_data.n_expts_actto 1, so it doesn't sum across multiple experts, in order unfuse moe_sum in the second matmul_ogs.Test Plan
Test Result
Tests passed.
Benchmark
Baseline (marlin):
PR (triton):
Install triton_kernels
Accuracy Testing
Note:
#28971 got reverted by #29697 because of breaking tests. This PR redo #28971.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.@jeejeelee @DarkLight1337 Please take a look. Thanks a lot for reviewing!