mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-23 07:19:13 +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
|
||||
|
||||
# These are not used in pooling models
|
||||
for attr in ("lm_head", "logits_processor"):
|
||||
if hasattr(self, attr):
|
||||
delattr(self, attr)
|
||||
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"):
|
||||
if hasattr(obj, attr):
|
||||
delattr(obj, attr)
|
||||
|
||||
# If the model already defines a pooler instance, don't overwrite it
|
||||
if not getattr(self, "pooler", None):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user