mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-20 09:55:01 +08:00
Fix typo in sampling_params.py (#788)
This commit is contained in:
parent
73b3de79ea
commit
0c04ce3234
@ -77,7 +77,7 @@ class SamplingParams:
|
|||||||
|
|
||||||
self._verify_args()
|
self._verify_args()
|
||||||
if self.use_beam_search:
|
if self.use_beam_search:
|
||||||
self._verity_beam_search()
|
self._verify_beam_search()
|
||||||
elif self.temperature < _SAMPLING_EPS:
|
elif self.temperature < _SAMPLING_EPS:
|
||||||
# Zero temperature means greedy sampling.
|
# Zero temperature means greedy sampling.
|
||||||
self._verify_greedy_sampling()
|
self._verify_greedy_sampling()
|
||||||
@ -109,7 +109,7 @@ class SamplingParams:
|
|||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"logprobs must be non-negative, got {self.logprobs}.")
|
f"logprobs must be non-negative, got {self.logprobs}.")
|
||||||
|
|
||||||
def _verity_beam_search(self) -> None:
|
def _verify_beam_search(self) -> None:
|
||||||
if self.best_of == 1:
|
if self.best_of == 1:
|
||||||
raise ValueError("best_of must be greater than 1 when using beam "
|
raise ValueError("best_of must be greater than 1 when using beam "
|
||||||
f"search. Got {self.best_of}.")
|
f"search. Got {self.best_of}.")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user