-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Support Tensorrt-LLM MoE fp4 for low-latency #21331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
This pull request has merge conflicts that must be resolved before it can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds support for TensorRT-LLM and FlashInfer CUTLASS FP4 MoE kernels, which is a great step for improving performance. The changes include a significant and well-structured refactoring of the MoE framework to be more modular.
However, I've found a few critical issues, primarily in the new TensorRT-LLM integration path. The implementation in flashinfer_trtllm_moe.py
seems incomplete and will cause runtime errors due to undefined variables and unreachable code. Similarly, the invocation of this kernel in modelopt.py
is missing arguments. These issues must be addressed before this PR can be merged.
This pull request has merge conflicts that must be resolved before it can be |
f01e9d7
to
b25d113
Compare
This pull request has merge conflicts that must be resolved before it can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a preliminary look. I have limited context on this but in general looks good. The logic is fairly complex in some files (modelopt.py
) and the MoE code is getting unwieldly overall. It would be good to look for some refactoring and simplification opportunities where possible. It would also be good to have some tests for coverage as well. There are also some places with missing return value typing.
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]>
Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: Po-Han Huang <[email protected]>
Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: Po-Han Huang <[email protected]>
Signed-off-by: Xin Li. <[email protected]> Signed-off-by: XIn Li <[email protected]> Signed-off-by: Po-Han Huang <[email protected]>
Head branch was pushed to by a user without write access
rebased again... |
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
)" This reverts commit 8e049be.
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: jingyu <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: Jinzhen Lin <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: Noam Gat <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: Avery Yingyi Huang <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: Paul Pak <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: Boyuan Feng <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: Diego-Castan <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: Xiao Yu <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]> Signed-off-by: Xiao Yu <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
Signed-off-by: Shu Wang <[email protected]> Signed-off-by: Po-Han Huang <[email protected]> Signed-off-by: Shu Wang. <[email protected]> Signed-off-by: XIn Li <[email protected]> Co-authored-by: XIn Li <[email protected]>
co-authored by: @xinli-git
patched partially #22073 to fix DSR1 weight loading.
Llama4:
DSR1-FP4:
Perf:
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.Purpose
Test Plan
Test Result
(Optional) Documentation Update