[BugFix] fix qwen3-embedding model tp>1 (#4223)

* support qwen3-embedding

* fix ci bug

* fix

* fix ci bug

* fix ci bug

* fix

* fix qwen3-embedding

* fix

* fix

* fix
This commit is contained in:
lizexu123
2025-09-24 14:13:26 +08:00
committed by GitHub
parent 3161014e49
commit e8318b7477
3 changed files with 11 additions and 4 deletions

View File

@@ -22,7 +22,6 @@ import paddle.nn as nn
from fastdeploy.config import ModelConfig
from fastdeploy.model_executor.layers.activation import get_act_fn
from fastdeploy.model_executor.models.interfaces_base import is_pooling_model
from fastdeploy.transformer_utils.config import get_hf_file_to_dict
_T = TypeVar("_T", bound=type[nn.Layer])
@@ -191,6 +190,8 @@ def as_embedding_model(cls: _T) -> _T:
please implement your own model if this is not the case.
"""
# Avoid modifying existing embedding models
from fastdeploy.model_executor.models.interfaces_base import is_pooling_model
if is_pooling_model(cls):
return cls