[Bugfix] Fix gemma3 with transformers backend (#23178)

Signed-off-by: raushan <raushan@huggingface.co>
Signed-off-by: Raushan Turganbay <raushan@huggingface.co>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Raushan Turganbay
2025-10-06 18:42:32 +00:00
committed by GitHub
co-authored by Harry Mellor
parent c02058c222
commit 7cd95dc8a3
4 changed files with 72 additions and 59 deletions
@@ -30,7 +30,7 @@ from vllm.model_executor.layers.fused_moe import FusedMoE
from vllm.platforms import current_platform
from vllm.utils import direct_register_custom_op
from .interfaces import MixtureOfExperts
from .interfaces import MixtureOfExperts, SupportsMultiModal
from .transformers import (
TransformersBase,
TransformersForCausalLM,
@@ -335,7 +335,5 @@ class TransformersMoEForCausalLM(TransformersMoEBase, TransformersForCausalLM):
},
enable_if=can_enable_torch_compile,
)
class TransformersMoEForMultimodalLM(
TransformersMoEForCausalLM, TransformersForMultimodalLM
):
pass
class TransformersMoEForMultimodalLM(TransformersMoEBase, TransformersForMultimodalLM):
get_input_embeddings = SupportsMultiModal.get_input_embeddings