mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-29 08:07:05 +08:00
[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>
This commit is contained in:
parent
aeb82b1930
commit
9c32df6101
@ -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
|
||||||
for attr in ("lm_head", "logits_processor"):
|
objects_to_clean = [self]
|
||||||
if hasattr(self, attr):
|
if language_model := getattr(self, "language_model", None):
|
||||||
delattr(self, attr)
|
objects_to_clean.append(language_model)
|
||||||
|
|
||||||
|
for obj in objects_to_clean:
|
||||||
|
for attr in ("lm_head", "logits_processor"):
|
||||||
|
if hasattr(obj, 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):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user