Skip to content

[MoE Refactor] Remove SharedFusedMoE class#35782

Merged
robertgshaw2-redhat merged 5 commits intovllm-project:mainfrom
neuralmagic:remove-shared-fused-moe
Apr 21, 2026
Merged

[MoE Refactor] Remove SharedFusedMoE class#35782
robertgshaw2-redhat merged 5 commits intovllm-project:mainfrom
neuralmagic:remove-shared-fused-moe

Conversation

@bnellnm
Copy link
Copy Markdown
Collaborator

@bnellnm bnellnm commented Mar 2, 2026

Purpose

The SharedFusedMoE class is no longer needed. Its functionality has been moved into FusedMoE, SharedExperts and MoERunnerBase.

Test Plan

CI tests + MoE refactoring tests

Test Result

cc @yzong-rh


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.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify mergify Bot added deepseek Related to DeepSeek models llama Related to Llama models qwen Related to Qwen models nvidia labels Mar 2, 2026
@mergify mergify Bot added the v1 label Mar 2, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 2, 2026

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

@mergify mergify Bot added the needs-rebase label Mar 2, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 is a significant and well-executed refactoring of the Mixture of Experts (MoE) implementation. By removing the SharedFusedMoE and ZeroExpertFusedMoE classes and introducing a more modular design with MoERunner and SharedExperts classes, the code becomes more maintainable and extensible. The new tests for the zero expert functionality are also a great addition. I've found one critical issue in the new chunking runner that could lead to a crash when processing zero tokens, which I've detailed in a specific comment.

Comment thread vllm/model_executor/layers/fused_moe/runner/chunking_moe_runner.py Outdated
Signed-off-by: Bill Nell <bnell@redhat.com>
@bnellnm bnellnm force-pushed the remove-shared-fused-moe branch from 10c87e0 to f4b2e72 Compare April 20, 2026 15:57
@mergify mergify Bot removed the needs-rebase label Apr 20, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 20, 2026

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

@mergify mergify Bot added the needs-rebase label Apr 20, 2026
@mergify mergify Bot removed the needs-rebase label Apr 20, 2026
@robertgshaw2-redhat robertgshaw2-redhat added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 20, 2026
bnellnm added 3 commits April 21, 2026 00:23
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
@robertgshaw2-redhat robertgshaw2-redhat enabled auto-merge (squash) April 21, 2026 22:12
@robertgshaw2-redhat robertgshaw2-redhat merged commit 5e584ce into vllm-project:main Apr 21, 2026
86 checks passed
@github-project-automation github-project-automation Bot moved this to Ready in NVIDIA Apr 21, 2026
@github-project-automation github-project-automation Bot moved this from Ready to Done in NVIDIA Apr 21, 2026
@bnellnm bnellnm deleted the remove-shared-fused-moe branch April 21, 2026 22:35
Copilot AI pushed a commit to hongbolv/vllm that referenced this pull request Apr 22, 2026
Signed-off-by: Bill Nell <bnell@redhat.com>
Co-authored-by: hongbolv <33214277+hongbolv@users.noreply.github.com>
baonudesifeizhai pushed a commit to baonudesifeizhai/vllm that referenced this pull request Apr 23, 2026
Signed-off-by: Bill Nell <bnell@redhat.com>
yzong-rh pushed a commit to yzong-rh/vllm that referenced this pull request Apr 23, 2026
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Yifan <yzong@redhat.com>
avinashsingh77 pushed a commit to avinashsingh77/vllm that referenced this pull request Apr 27, 2026
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Avinash Singh <avinashsingh.rcoem@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek Related to DeepSeek models llama Related to Llama models nvidia qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants