We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
stop_token_ids
1 parent 3241ed5 commit 4b3d449Copy full SHA for 4b3d449
vllm/sampling_params.py
@@ -437,6 +437,10 @@ def _verify_args(self) -> None:
437
and self.truncate_prompt_tokens < 1):
438
raise ValueError(f"truncate_prompt_tokens must be >= 1, "
439
f"got {self.truncate_prompt_tokens}")
440
+ assert isinstance(self.stop_token_ids, list)
441
+ if not all(isinstance(st_id, int) for st_id in self.stop_token_ids):
442
+ raise ValueError(f"stop_token_ids must contain only integers, "
443
+ f"got {self.stop_token_ids}.")
444
assert isinstance(self.stop, list)
445
if any(not stop_str for stop_str in self.stop):
446
raise ValueError("stop cannot contain an empty string.")
0 commit comments