Unverified Commit 9c32df61 authored by wang.yuqi's avatar wang.yuqi Committed by GitHub
Browse files

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


Signed-off-by: default avatarwang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: default avatarwang.yuqi <noooop@126.com>
Co-authored-by: default avatargemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parent aeb82b19
...@@ -175,9 +175,14 @@ def _create_pooling_model_cls(orig_cls: _T) -> _T: ...@@ -175,9 +175,14 @@ def _create_pooling_model_cls(orig_cls: _T) -> _T:
self.vllm_config = vllm_config self.vllm_config = vllm_config
# These are not used in pooling models # These are not used in pooling models
objects_to_clean = [self]
if language_model := getattr(self, "language_model", None):
objects_to_clean.append(language_model)
for obj in objects_to_clean:
for attr in ("lm_head", "logits_processor"): for attr in ("lm_head", "logits_processor"):
if hasattr(self, attr): if hasattr(obj, attr):
delattr(self, attr) delattr(obj, attr)
# If the model already defines a pooler instance, don't overwrite it # If the model already defines a pooler instance, don't overwrite it
if not getattr(self, "pooler", None): if not getattr(self, "pooler", None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment