Fix Qwen3-Omni MoE backend selection

Signed-off-by: hsliuustc0106 <liuhongsheng4@huawei.com>
This commit is contained in:
hsliuustc0106 committed 2026-09-03 17:03:18 +00:00
1 parent dff28e6867
commit 5f762dcffe
9 files changed
+36 -26

No files matched your search

+7 -7
View File
@@ -763,13 +763,14 @@ def prepare_engine_environment() -> None:
pass
def _maybe_set_qwen3_omni_moe_env(engine_args_dict: dict[str, Any]) -> None:
def _maybe_set_qwen3_omni_moe_backend(engine_args_dict: dict[str, Any]) -> None:
"""Choose the stable MoE backend when Qwen3-Omni has no explicit choice."""
if (
engine_args_dict.get("model_arch") == "Qwen3OmniMoeForConditionalGeneration"
and "VLLM_USE_FLASHINFER_MOE_FP16" not in os.environ
and engine_args_dict.get("moe_backend", "auto") == "auto"
):
os.environ["VLLM_USE_FLASHINFER_MOE_FP16"] = "0"
logger.info("[stage_init] Set VLLM_USE_FLASHINFER_MOE_FP16=0 for Qwen3-Omni stage")
engine_args_dict["moe_backend"] = "triton"
logger.info("[stage_init] Set moe_backend=triton for Qwen3-Omni stage")
def split_devices_for_replicas(
@@ -1280,9 +1281,8 @@ def _finalize_engine_args_dict(
engine_args_dict["has_sampling_extra_args"] = has_sampling_extra_args
engine_args_dict["sampling_extra_args_keys"] = sampling_extra_args_keys
# TODO: Remove this after the performance regression is fixed
# Set VLLM_USE_FLASHINFER_MOE_FP16=0 for Qwen3-Omni to avoid performance regression
_maybe_set_qwen3_omni_moe_env(engine_args_dict)
# Select the typed backend option during stage argument finalization.
_maybe_set_qwen3_omni_moe_backend(engine_args_dict)
return engine_args_dict