From a251cdde10fcefd5792d7de9c6d4a9dc450ed5f8 Mon Sep 17 00:00:00 2001 From: Nick Hill Date: Sun, 24 Mar 2024 15:30:42 -0700 Subject: [PATCH] Fix default min_new_tokens value --- vllm/entrypoints/grpc/grpc_server.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vllm/entrypoints/grpc/grpc_server.py b/vllm/entrypoints/grpc/grpc_server.py index 88fb6578b..b80f8c8e9 100644 --- a/vllm/entrypoints/grpc/grpc_server.py +++ b/vllm/entrypoints/grpc/grpc_server.py @@ -281,9 +281,8 @@ async def _validate_and_convert_params( raise ValueError(f"max_new_tokens ({max_new_tokens}) " f"must be <= {self.max_max_new_tokens}") - min_new_tokens = -1 - if stopping.min_new_tokens > 0: - min_new_tokens = stopping.min_new_tokens + min_new_tokens = max(0, stopping.min_new_tokens) + if min_new_tokens > 0: if max_new_tokens is not None: if min_new_tokens > max_new_tokens: raise ValueError(