vllm - 💡(How to fix) Fix [CPU Backend] Refactor CPU FusedMoE to MK flow [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#36739Fetched 2026-04-08 00:35:09
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
added_to_project_v2 ×1labeled ×1project_v2_item_status_changed ×1
RAW_BUFFERClick to expand / collapse

🚀 The feature, motivation and pitch

Migrate CPU FusedMoE to MK flow to reduce maintaince overhead. Ref: #36286

Alternatives

No response

Additional context

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

Fix Plan

To migrate CPU FusedMoE to MK flow, we will focus on modifying the existing implementation to integrate with the MK flow architecture.

Steps to Migrate

  • Update dependencies: Ensure that the MK flow library is installed and imported in the project.
  • Modify the FusedMoE model: Change the model to use MK flow's API for parallelization.
  • Example code snippet:
import mk_flow

# Define the FusedMoE model
class FusedMoE(mk_flow.Model):
    def __init__(self, num_experts, num_layers):
        super(FusedMoE, self).__init__()
        self.experts = mk_flow.ModuleList([mk_flow.Linear(128, 128) for _ in range(num_experts)])
        self.layers = mk_flow.ModuleList([mk_flow.Linear(128, 128) for _ in range(num_layers)])

    def forward(self, x):
        # Use MK flow's parallelize function to parallelize the experts
        expert_outputs = mk_flow.parallelize(self.experts, x)
        # Use MK flow's parallelize function to parallelize the layers
        layer_outputs = mk_flow.parallelize(self.layers, expert_outputs)
        return layer_outputs

# Initialize the FusedMoE model
model = FusedMoE(num_experts=8, num_layers=4)

Verification

To verify that the migration was successful, test the model with a sample input and check that the output is correct.

Extra Tips

  • Refer to the MK flow documentation for more information on how to use the library.
  • Make sure to test the model thoroughly after migration to ensure that it is working as expected.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING