Unverified Commit f8f9c0ba authored by Alex Brooks's avatar Alex Brooks Committed by GitHub
Browse files

[Bugfix] Don't set an upper bound on repetition penalty (#16403)


Signed-off-by: default avatarAlex-Brooks <Alex.Brooks@ibm.com>
Co-authored-by: default avatarNick Hill <nhill@redhat.com>
parent dda81102
...@@ -385,9 +385,10 @@ class SamplingParams( ...@@ -385,9 +385,10 @@ class SamplingParams(
if not -2.0 <= self.frequency_penalty <= 2.0: if not -2.0 <= self.frequency_penalty <= 2.0:
raise ValueError("frequency_penalty must be in [-2, 2], got " raise ValueError("frequency_penalty must be in [-2, 2], got "
f"{self.frequency_penalty}.") f"{self.frequency_penalty}.")
if not 0.0 < self.repetition_penalty <= 2.0: if self.repetition_penalty <= 0.0:
raise ValueError("repetition_penalty must be in (0, 2], got " raise ValueError(
f"{self.repetition_penalty}.") "repetition_penalty must be greater than zero, got "
f"{self.repetition_penalty}.")
if self.temperature < 0.0: if self.temperature < 0.0:
raise ValueError( raise ValueError(
f"temperature must be non-negative, got {self.temperature}.") f"temperature must be non-negative, got {self.temperature}.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment