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
6b7038ba
Unverified
Commit
6b7038ba
authored
Mar 25, 2025
by
fzyzcjy
Committed by
GitHub
Mar 24, 2025
Browse files
Speedup warmup when DP > 1 (#4695)
parent
57eec0bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
python/sglang/srt/entrypoints/http_server.py
python/sglang/srt/entrypoints/http_server.py
+9
-10
No files found.
python/sglang/srt/entrypoints/http_server.py
View file @
6b7038ba
...
...
@@ -730,9 +730,9 @@ def _wait_and_warmup(
},
}
if
server_args
.
skip_tokenizer_init
:
json_data
[
"input_ids"
]
=
[
10
,
11
,
12
]
json_data
[
"input_ids"
]
=
[
[
10
,
11
,
12
]
for
_
in
range
(
server_args
.
dp_size
)]
else
:
json_data
[
"text"
]
=
"The capital city of France is"
json_data
[
"text"
]
=
[
"The capital city of France is"
]
*
server_args
.
dp_size
# Debug dumping
if
server_args
.
debug_tensor_dump_input_file
:
...
...
@@ -743,14 +743,13 @@ def _wait_and_warmup(
json_data
[
"sampling_params"
][
"max_new_tokens"
]
=
0
try
:
for
i
in
range
(
server_args
.
dp_size
):
res
=
requests
.
post
(
url
+
request_name
,
json
=
json_data
,
headers
=
headers
,
timeout
=
600
,
)
assert
res
.
status_code
==
200
,
f
"
{
res
}
"
res
=
requests
.
post
(
url
+
request_name
,
json
=
json_data
,
headers
=
headers
,
timeout
=
600
,
)
assert
res
.
status_code
==
200
,
f
"
{
res
}
"
except
Exception
:
last_traceback
=
get_exception_traceback
()
if
pipe_finish_writer
is
not
None
:
...
...
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