We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef7bc97 commit 7508e80Copy full SHA for 7508e80
vllm/sampling_params.py
@@ -273,9 +273,14 @@ def __post_init__(self) -> None:
273
self._all_stop_token_ids = set(self.stop_token_ids)
274
275
def _verify_args(self) -> None:
276
+ if not isinstance(self.n, int):
277
+ raise ValueError(f"n must be an int, but is of "
278
+ f"type {type(self.n)}")
279
if self.n < 1:
280
raise ValueError(f"n must be at least 1, got {self.n}.")
- assert isinstance(self.best_of, int)
281
+ if not isinstance(self.best_of, int):
282
+ raise ValueError(f'best_of must be an int, but is of '
283
+ f'type {type(self.best_of)}')
284
if self.best_of < self.n:
285
raise ValueError(f"best_of must be greater than or equal to n, "
286
f"got n={self.n} and best_of={self.best_of}.")
0 commit comments