A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 14:45 UTC
[Bugfix] Don't set an upper bound on repetition penalty (#16403)
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com> Co-authored-by: Nick Hill <nhill@redhat.com>
Alex Brooks committed
Apr 11, 2025 at 00:19 UTC
f8f9c0ba6280a700501e23746b3a6230b549eabe
1 file changed
+4
-3
vllm/sampling_params.py
+4
-3
@@ -385,9 +385,10 @@ class SamplingParams(
385
if not -2.0 <= self.frequency_penalty <= 2.0:
386
raise ValueError("frequency_penalty must be in [-2, 2], got "
387
f"{self.frequency_penalty}.")
388
- if not 0.0 < self.repetition_penalty <= 2.0:
389
- raise ValueError("repetition_penalty must be in (0, 2], got "
390
- f"{self.repetition_penalty}.")
388
+ if self.repetition_penalty <= 0.0:
389
+ raise ValueError(
390
+ "repetition_penalty must be greater than zero, got "
391
+ f"{self.repetition_penalty}.")
392
if self.temperature < 0.0:
393
raise ValueError(
394
f"temperature must be non-negative, got {self.temperature}.")