Skip to content

Fix MoE for the Transformers modelling backend#34436

Merged
vllm-bot merged 2 commits intovllm-project:mainfrom
hmellor:fix-moe-transformers-backend
Feb 12, 2026
Merged

Fix MoE for the Transformers modelling backend#34436
vllm-bot merged 2 commits intovllm-project:mainfrom
hmellor:fix-moe-transformers-backend

Conversation

@hmellor
Copy link
Member

@hmellor hmellor commented Feb 12, 2026

FusedMoE has 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.

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Copy link
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 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.

@hmellor hmellor enabled auto-merge (squash) February 12, 2026 14:50
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 12, 2026
@hmellor hmellor disabled auto-merge February 12, 2026 16:08
@vllm-bot vllm-bot merged commit 679ca5d into vllm-project:main Feb 12, 2026
54 of 57 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Transformers backend Feb 12, 2026
@hmellor hmellor deleted the fix-moe-transformers-backend branch February 12, 2026 18:04
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants