@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 9c32df6101
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 11, 18:45 UTC

[Bugfix] Qwen 3 VL Embedding loading (#30303)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: wang.yuqi <noooop@126.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

wang.yuqi committed Dec 9, 2025 at 16:04 UTC 9c32df6101b24040c824dee5b0e5543a94dc6f45
1 file changed +8 -3
vllm/model_executor/models/adapters.py
+8 -3
@@ -175,9 +175,14 @@ def _create_pooling_model_cls(orig_cls: _T) -> _T:
175 self.vllm_config = vllm_config
176
177 # These are not used in pooling models
178 - for attr in ("lm_head", "logits_processor"):
179 - if hasattr(self, attr):
180 - delattr(self, attr)
178 + objects_to_clean = [self]
179 + if language_model := getattr(self, "language_model", None):
180 + objects_to_clean.append(language_model)
181 +
182 + for obj in objects_to_clean:
183 + for attr in ("lm_head", "logits_processor"):
184 + if hasattr(obj, attr):
185 + delattr(obj, attr)
186
187 # If the model already defines a pooler instance, don't overwrite it
188 if not getattr(self, "pooler", None):