Unverified Commit 0e163fce authored by zspo's avatar zspo Committed by GitHub
Browse files

Fix default length_penalty to 1.0 (#2667)

parent 96b6f475
......@@ -196,7 +196,7 @@ class Sequence:
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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment