Unverified Commit 799fb5f4 authored by Yinghai Lu's avatar Yinghai Lu Committed by GitHub
Browse files

400 on empty input_ids (#4481)

parent 25e1816e
......@@ -103,6 +103,8 @@ class GenerateReqInput:
self.batch_size = len(self.text)
self.input_embeds = 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):
self.is_single = True
self.batch_size = 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment