From 6965a392a4cd38ee65ac6a9c2730e0a7c62a658d Mon Sep 17 00:00:00 2001 From: Nandan Vallamdasu Date: Sat, 22 Nov 2025 18:28:22 +0530 Subject: [PATCH] Fix: Resolve circular import in model_loader/utils.py (#29189) Signed-off-by: nandan2003 Signed-off-by: Nandan Vallamdasu Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Cyrus Leung --- vllm/model_executor/model_loader/utils.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vllm/model_executor/model_loader/utils.py b/vllm/model_executor/model_loader/utils.py index e74434e9d12cb..1db6337f4c9f9 100644 --- a/vllm/model_executor/model_loader/utils.py +++ b/vllm/model_executor/model_loader/utils.py @@ -19,12 +19,7 @@ from vllm.model_executor.layers.quantization.base_config import ( QuantizationConfig, QuantizeMethodBase, ) -from vllm.model_executor.models.adapters import ( - as_embedding_model, - as_reward_model, - as_seq_cls_model, - try_create_mm_pooling_model_cls, -) + from vllm.model_executor.models.interfaces import SupportsQuant, supports_multimodal from vllm.utils.platform_utils import is_pin_memory_available @@ -172,6 +167,12 @@ _MODEL_ARCH_BY_HASH = dict[int, tuple[type[nn.Module], str]]() def _get_model_architecture(model_config: ModelConfig) -> tuple[type[nn.Module], str]: + from vllm.model_executor.models.adapters import ( + as_embedding_model, + as_reward_model, + as_seq_cls_model, + try_create_mm_pooling_model_cls, + ) architectures = getattr(model_config.hf_config, "architectures", []) model_cls, arch = model_config.registry.resolve_model_cls(