mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 20:04:52 +00:00
Allow top_p == 1.0
This commit is contained in:
parent
3af1a11401
commit
f0d6619d80
@ -87,8 +87,8 @@ class Parameters(BaseModel):
|
||||
|
||||
@validator("top_p")
|
||||
def valid_top_p(cls, v):
|
||||
if v is not None and (v <= 0 or v >= 1.0):
|
||||
raise ValidationError("`top_p` must be > 0.0 and < 1.0")
|
||||
if v is not None and (v <= 0 or v > 1.0):
|
||||
raise ValidationError("`top_p` must be > 0.0 and <= 1.0")
|
||||
return v
|
||||
|
||||
@validator("truncate")
|
||||
|
Loading…
Reference in New Issue
Block a user