From b4951acd2bc3335d69db4a431107a0f7632639d9 Mon Sep 17 00:00:00 2001 From: zspo Date: Fri, 2 Feb 2024 07:59:39 +0800 Subject: [PATCH] Fix default length_penalty to 1.0 (#2667) --- vllm/sequence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/sequence.py b/vllm/sequence.py index 7b1c9a77a1e02..9669562cfeac5 100644 --- a/vllm/sequence.py +++ b/vllm/sequence.py @@ -196,7 +196,7 @@ def get_cumulative_logprob(self) -> float: return self.data.cumulative_logprob def get_beam_search_score(self, - length_penalty: float = 0.0, + length_penalty: float = 1.0, seq_len: Optional[int] = None, eos_token_id: Optional[int] = None) -> float: """Calculate the beam search score with length penalty.