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
799fb5f4
Unverified
Commit
799fb5f4
authored
Mar 16, 2025
by
Yinghai Lu
Committed by
GitHub
Mar 16, 2025
Browse files
400 on empty input_ids (#4481)
parent
25e1816e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/sglang/srt/managers/io_struct.py
python/sglang/srt/managers/io_struct.py
+2
-0
No files found.
python/sglang/srt/managers/io_struct.py
View file @
799fb5f4
...
@@ -103,6 +103,8 @@ class GenerateReqInput:
...
@@ -103,6 +103,8 @@ class GenerateReqInput:
self
.
batch_size
=
len
(
self
.
text
)
self
.
batch_size
=
len
(
self
.
text
)
self
.
input_embeds
=
None
self
.
input_embeds
=
None
elif
self
.
input_ids
is
not
None
:
elif
self
.
input_ids
is
not
None
:
if
len
(
self
.
input_ids
)
==
0
:
raise
ValueError
(
"input_ids cannot be empty."
)
if
isinstance
(
self
.
input_ids
[
0
],
int
):
if
isinstance
(
self
.
input_ids
[
0
],
int
):
self
.
is_single
=
True
self
.
is_single
=
True
self
.
batch_size
=
1
self
.
batch_size
=
1
...
...
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