Skip to content

[Kernels] Integration for DeepGEMM MegaMoE kernel - #40833

Draft
bnellnm wants to merge 23 commits into
vllm-project:mainfrom
neuralmagic:mega-moe
Draft

bnellnm wants to merge 23 commits into
vllm-project:mainfrom
neuralmagic:mega-moe

Conversation

@bnellnm

@bnellnm bnellnm commented Apr 24, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Integration for DeepGEMM MegaMoE kernel.

Weight creation/prep in the quant method is not right. I'm not sure if I should create a whole new quant method or hack up the existing create_weights or add some further processing step, .e.g. cast_grouped_weights_to_fp4

TODO: consider making "deep_gemm_mega_moe" backend?

Test Plan

Added unit test
TODO: test on mxfp4 model.

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)

@bnellnm bnellnm changed the title Mega moe [Kernels] Integration for DeepGEMM MegaMoE kernel Apr 24, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request implements the DeepGemmMegaExperts modular kernel, integrating DeepGEMM's mega_moe kernel for MXFP4 MoE. The changes include the new expert class, comprehensive unit tests, and FP4 quantization utilities. Review feedback focuses on improving code quality by removing redundant math utilities in favor of existing vLLM helpers and cleaning up dead code, placeholder comments, and unimplemented methods in the new implementation.

Comment thread tests/kernels/moe/utils.py Resolved
Comment thread tests/kernels/moe/utils.py Resolved
@ivanium ivanium mentioned this pull request Apr 26, 2026
10 of 32 tasks
bnellnm added 23 commits April 27, 2026 12:56
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
@mergify

mergify Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @bnellnm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant