[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>
This commit is contained in:
Alex Brooks 2025-04-11 00:19:40 -06:00 committed by GitHub
parent dda811021a
commit f8f9c0ba62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -385,9 +385,10 @@ class SamplingParams(
if not -2.0 <= self.frequency_penalty <= 2.0:
raise ValueError("frequency_penalty must be in [-2, 2], got "
f"{self.frequency_penalty}.")
if not 0.0 < self.repetition_penalty <= 2.0:
raise ValueError("repetition_penalty must be in (0, 2], got "
f"{self.repetition_penalty}.")
if self.repetition_penalty <= 0.0:
raise ValueError(
"repetition_penalty must be greater than zero, got "
f"{self.repetition_penalty}.")
if self.temperature < 0.0:
raise ValueError(
f"temperature must be non-negative, got {self.temperature}.")