Skip to content

Commit

Permalink
Fix default length_penalty to 1.0 (vllm-project#2667)
Browse files Browse the repository at this point in the history
  • Loading branch information
zspo authored and jimpang committed Feb 22, 2024
1 parent eb48998 commit c12c5cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vllm/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c12c5cc

Please sign in to comment.