Skip to content

Commit 52029bd

Browse files
authored
Fix warmup error when dp=1 (#4753)
1 parent eb934bd commit 52029bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/sglang/srt/entrypoints/http_server.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,14 @@ def _wait_and_warmup(
761761
}
762762
if server_args.skip_tokenizer_init:
763763
json_data["input_ids"] = [[10, 11, 12] for _ in range(server_args.dp_size)]
764+
# TODO Workaround the bug that embedding errors for list of size 1
765+
if server_args.dp_size == 1:
766+
json_data["input_ids"] = json_data["input_ids"][0]
764767
else:
765768
json_data["text"] = ["The capital city of France is"] * server_args.dp_size
769+
# TODO Workaround the bug that embedding errors for list of size 1
770+
if server_args.dp_size == 1:
771+
json_data["text"] = json_data["text"][0]
766772

767773
# Debug dumping
768774
if server_args.debug_tensor_dump_input_file:

0 commit comments

Comments
 (0)