Skip to content

Commit 64fe27e

Browse files
Titan-pjianan-gu
authored andcommitted
support qwen3 emebedding (sgl-project#6990)
1 parent deda937 commit 64fe27e

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

python/sglang/srt/models/qwen3.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
333333

334334
params_dict = dict(self.named_parameters())
335335
for name, loaded_weight in weights:
336+
if "Embedding" in self.config.name_or_path:
337+
name = add_prefix(name, "model")
336338
layer_id = get_layer_id(name)
337339
if (
338340
layer_id is not None

test/srt/models/test_embedding_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
("Alibaba-NLP/gte-Qwen2-1.5B-instruct", 1, 1e-5),
2727
("intfloat/e5-mistral-7b-instruct", 1, 1e-5),
2828
("marco/mcdse-2b-v1", 1, 1e-5),
29+
("Qwen/Qwen3-Embedding-8B", 1, 1e-5),
2930
# Temporarily disable before this model is fixed
3031
# ("jason9693/Qwen2.5-1.5B-apeach", 1, 1e-5),
3132
]

0 commit comments

Comments
 (0)