Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 2e50fb5

Browse files
zspoalexm-redhat
authored andcommitted
Fix default length_penalty to 1.0 (vllm-project#2667)
1 parent 4115939 commit 2e50fb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def get_cumulative_logprob(self) -> float:
196196
return self.data.cumulative_logprob
197197

198198
def get_beam_search_score(self,
199-
length_penalty: float = 0.0,
199+
length_penalty: float = 1.0,
200200
seq_len: Optional[int] = None,
201201
eos_token_id: Optional[int] = None) -> float:
202202
"""Calculate the beam search score with length penalty.

0 commit comments

Comments
 (0)