"Using beam search as a sampling parameter is deprecated, and will be removed in the future release. Please use the `vllm.LLM.use_beam_search` method for dedicated beam search instead, or set the environment variable `VLLM_ALLOW_DEPRECATED_BEAM_SEARCH=1` to suppress this error. For more details, see https://github.com/vllm-project/vllm/issues/8306 ."# noqa
)
self._verify_beam_search()
self._verify_beam_search()
else:
else:
self._verify_non_beam_search()
self._verify_non_beam_search()
...
@@ -273,9 +278,14 @@ class SamplingParams(
...
@@ -273,9 +278,14 @@ class SamplingParams(
self._all_stop_token_ids=set(self.stop_token_ids)
self._all_stop_token_ids=set(self.stop_token_ids)
def_verify_args(self)->None:
def_verify_args(self)->None:
ifnotisinstance(self.n,int):
raiseValueError(f"n must be an int, but is of "
f"type {type(self.n)}")
ifself.n<1:
ifself.n<1:
raiseValueError(f"n must be at least 1, got {self.n}.")
raiseValueError(f"n must be at least 1, got {self.n}.")
assertisinstance(self.best_of,int)
ifnotisinstance(self.best_of,int):
raiseValueError(f'best_of must be an int, but is of '
f'type {type(self.best_of)}')
ifself.best_of<self.n:
ifself.best_of<self.n:
raiseValueError(f"best_of must be greater than or equal to n, "
raiseValueError(f"best_of must be greater than or equal to n, "