Skip to content

Commit

Permalink
🎨 fixup top_p range checks
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Runde <[email protected]>
  • Loading branch information
joerunde committed Mar 28, 2024
1 parent 655fb51 commit a97f2bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vllm/entrypoints/grpc/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def validate_params(params: Parameters, max_max_new_tokens: int):
TGISValidationError.Temperature.error()
if sampling.top_k < 0:
TGISValidationError.TopK.error()
if sampling.top_p < 0 or sampling.top_p > 1:
if not(0 <= sampling.top_p <= 1):
TGISValidationError.TopP.error()
if sampling.typical_p > 1:
TGISValidationError.TypicalP.error()

0 comments on commit a97f2bf

Please sign in to comment.