Fix MoE for the Transformers modelling backend#34436
Merged
vllm-bot merged 2 commits intovllm-project:mainfrom Feb 12, 2026
Merged
Fix MoE for the Transformers modelling backend#34436vllm-bot merged 2 commits intovllm-project:mainfrom
vllm-bot merged 2 commits intovllm-project:mainfrom
Conversation
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the TransformersFusedMoE class to align with recent refactorings in the base FusedMoE layer. The changes involve modifying the __init__ method to pass the custom_routing_function as a keyword argument to the superclass constructor, and updating the transformers_moe_forward function to call self.runner.forward instead of self.forward_impl. These adjustments seem correct and necessary to ensure the Transformers modeling backend for MoE models works with the updated FusedMoE implementation. The changes are logical and well-contained.
Isotr0py
approved these changes
Feb 12, 2026
5 tasks
eldarkurtic
pushed a commit
to eldarkurtic/vllm
that referenced
this pull request
Feb 19, 2026
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Eldar Kurtic <research@neuralmagic.com>
llsj14
pushed a commit
to llsj14/vllm
that referenced
this pull request
Mar 1, 2026
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
tunglinwood
pushed a commit
to tunglinwood/vllm
that referenced
this pull request
Mar 4, 2026
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
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.
FusedMoEhas been being refactor in recent months and the Transformers modelling backend support has not been updated with it.This is understandable because the test (
tests/models/test_transformers.py::test_models[allenai/OLMoE-1B-7B-0924-transformers]) will not run in vLLM CI until we update to Transformers v5.This PR fixes the integration so that users installing Transformers v5 early may benefit from the MoE support.