Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
451ffe74
Unverified
Commit
451ffe74
authored
Jun 09, 2025
by
uylnap
Committed by
GitHub
Jun 09, 2025
Browse files
support qwen3 emebedding (#6990)
parent
b1e5a33a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
python/sglang/srt/models/qwen3.py
python/sglang/srt/models/qwen3.py
+2
-0
test/srt/models/test_embedding_models.py
test/srt/models/test_embedding_models.py
+1
-0
No files found.
python/sglang/srt/models/qwen3.py
View file @
451ffe74
...
@@ -333,6 +333,8 @@ class Qwen3ForCausalLM(nn.Module):
...
@@ -333,6 +333,8 @@ class Qwen3ForCausalLM(nn.Module):
params_dict
=
dict
(
self
.
named_parameters
())
params_dict
=
dict
(
self
.
named_parameters
())
for
name
,
loaded_weight
in
weights
:
for
name
,
loaded_weight
in
weights
:
if
"Embedding"
in
self
.
config
.
name_or_path
:
name
=
add_prefix
(
name
,
"model"
)
layer_id
=
get_layer_id
(
name
)
layer_id
=
get_layer_id
(
name
)
if
(
if
(
layer_id
is
not
None
layer_id
is
not
None
...
...
test/srt/models/test_embedding_models.py
View file @
451ffe74
...
@@ -26,6 +26,7 @@ MODELS = [
...
@@ -26,6 +26,7 @@ MODELS = [
(
"Alibaba-NLP/gte-Qwen2-1.5B-instruct"
,
1
,
1e-5
),
(
"Alibaba-NLP/gte-Qwen2-1.5B-instruct"
,
1
,
1e-5
),
(
"intfloat/e5-mistral-7b-instruct"
,
1
,
1e-5
),
(
"intfloat/e5-mistral-7b-instruct"
,
1
,
1e-5
),
(
"marco/mcdse-2b-v1"
,
1
,
1e-5
),
(
"marco/mcdse-2b-v1"
,
1
,
1e-5
),
(
"Qwen/Qwen3-Embedding-8B"
,
1
,
1e-5
),
# Temporarily disable before this model is fixed
# Temporarily disable before this model is fixed
# ("jason9693/Qwen2.5-1.5B-apeach", 1, 1e-5),
# ("jason9693/Qwen2.5-1.5B-apeach", 1, 1e-5),
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment