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
zhaoyu6
sglang
Commits
bc938ea1
"examples/sampling/graphbolt/vscode:/vscode.git/clone" did not exist on "3e13903352a7b83ca0910a818d0715bcb38f15bf"
Unverified
Commit
bc938ea1
authored
Aug 16, 2025
by
Brayden Zhong
Committed by
GitHub
Aug 15, 2025
Browse files
Fix DP load for embedding (#9165)
parent
eff4eb3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
python/sglang/srt/managers/io_struct.py
python/sglang/srt/managers/io_struct.py
+4
-0
python/sglang/srt/managers/session_controller.py
python/sglang/srt/managers/session_controller.py
+1
-1
No files found.
python/sglang/srt/managers/io_struct.py
View file @
bc938ea1
...
@@ -612,6 +612,8 @@ class EmbeddingReqInput:
...
@@ -612,6 +612,8 @@ class EmbeddingReqInput:
if
self
.
sampling_params
is
None
:
if
self
.
sampling_params
is
None
:
self
.
sampling_params
=
[{}]
*
self
.
batch_size
self
.
sampling_params
=
[{}]
*
self
.
batch_size
elif
isinstance
(
self
.
sampling_params
,
dict
):
self
.
sampling_params
=
[
self
.
sampling_params
]
*
self
.
batch_size
for
i
in
range
(
self
.
batch_size
):
for
i
in
range
(
self
.
batch_size
):
self
.
sampling_params
[
i
][
"max_new_tokens"
]
=
0
self
.
sampling_params
[
i
][
"max_new_tokens"
]
=
0
...
@@ -660,6 +662,8 @@ class TokenizedEmbeddingReqInput:
...
@@ -660,6 +662,8 @@ class TokenizedEmbeddingReqInput:
token_type_ids
:
List
[
int
]
token_type_ids
:
List
[
int
]
# Dummy sampling params for compatibility
# Dummy sampling params for compatibility
sampling_params
:
SamplingParams
sampling_params
:
SamplingParams
# For data parallel rank routing
data_parallel_rank
:
Optional
[
int
]
=
None
# For dp balance
# For dp balance
dp_balance_id
:
int
=
-
1
dp_balance_id
:
int
=
-
1
...
...
python/sglang/srt/managers/session_controller.py
View file @
bc938ea1
...
@@ -54,7 +54,7 @@ class SessionReqNode:
...
@@ -54,7 +54,7 @@ class SessionReqNode:
prefix
+=
" -- "
+
self
.
childs
[
0
].
req
.
rid
prefix
+=
" -- "
+
self
.
childs
[
0
].
req
.
rid
ret
=
self
.
childs
[
0
].
_str_helper
(
prefix
)
ret
=
self
.
childs
[
0
].
_str_helper
(
prefix
)
for
child
in
self
.
childs
[
1
:]:
for
child
in
self
.
childs
[
1
:]:
prefix
=
" "
*
len
(
origin_prefix
)
+
" \- "
+
child
.
req
.
rid
prefix
=
" "
*
len
(
origin_prefix
)
+
"
\
\
- "
+
child
.
req
.
rid
ret
+=
child
.
_str_helper
(
prefix
)
ret
+=
child
.
_str_helper
(
prefix
)
return
ret
return
ret
...
...
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