File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 6060_ENABLE_SP = None
6161_HAS_LAYER_IDX = None
6262
63- _MULTI_MODAL_MODEL_ARCH_KEY_WORDS = ["VL" , "Omni" ]
64-
6563
6664def is_310p ():
6765 global _IS_310P
@@ -718,13 +716,18 @@ def is_moe_model(vllm_config: VllmConfig):
718716 if _IS_MOE_MODEL is None :
719717 model_configs = vllm_config .model_config .hf_config .to_dict ()
720718
721- global _MULTI_MODAL_MODEL_ARCH_KEY_WORDS
722- if (any (mm_arch in model_configs ["architectures" ][0 ]
723- for mm_arch in _MULTI_MODAL_MODEL_ARCH_KEY_WORDS )
719+ if ("VL" in model_configs ["architectures" ][0 ]
724720 and "text_config" in model_configs ):
725- # Check multi-modal models
721+ # Check VL multi-modal models
726722 _IS_MOE_MODEL = any ("experts" in key .lower ()
727723 for key in model_configs ["text_config" ])
724+ elif ("Omni" in model_configs ["architectures" ][0 ]
725+ and "talker_config" in model_configs
726+ and "text_config" in model_configs ["talker_config" ]):
727+ # Check Omni multi-modal models
728+ _IS_MOE_MODEL = any (
729+ "experts" in key .lower ()
730+ for key in model_configs ["talker_config" ]["text_config" ])
728731 else :
729732 # Check text-only models
730733 _IS_MOE_MODEL = any ("experts" in key .lower ()
You can’t perform that action at this time.
0 commit comments