@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6965a392a4
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 12, 17:15 UTC

Fix: Resolve circular import in model_loader/utils.py (#29189)

Signed-off-by: nandan2003 <nandan.vallamdasu@outlook.com> Signed-off-by: Nandan Vallamdasu <nandan.vallamdasu@outlook.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>

Nandan Vallamdasu committed Nov 22, 2025 at 18:28 UTC 6965a392a4cd38ee65ac6a9c2730e0a7c62a658d
1 file changed +7 -6
vllm/model_executor/model_loader/utils.py
+7 -6
@@ -19,12 +19,7 @@ from vllm.model_executor.layers.quantization.base_config import (
19 QuantizationConfig,
20 QuantizeMethodBase,
21 )
22 -from vllm.model_executor.models.adapters import (
23 - as_embedding_model,
24 - as_reward_model,
25 - as_seq_cls_model,
26 - try_create_mm_pooling_model_cls,
27 -)
22 +
23 from vllm.model_executor.models.interfaces import SupportsQuant, supports_multimodal
24 from vllm.utils.platform_utils import is_pin_memory_available
25
@@ -172,6 +167,12 @@ _MODEL_ARCH_BY_HASH = dict[int, tuple[type[nn.Module], str]]()
167
168
169 def _get_model_architecture(model_config: ModelConfig) -> tuple[type[nn.Module], str]:
170 + from vllm.model_executor.models.adapters import (
171 + as_embedding_model,
172 + as_reward_model,
173 + as_seq_cls_model,
174 + try_create_mm_pooling_model_cls,
175 + )
176 architectures = getattr(model_config.hf_config, "architectures", [])
177
178 model_cls, arch = model_config.registry.resolve_model_cls(