A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 17, 05:30 UTC
Fix default length_penalty to 1.0 (#2667)
zspo committed
Feb 2, 2024 at 07:59 UTC
0e163fce18594c7e29dc5a143dd6b33d213fcbf3
1 file changed
+1
-1
vllm/sequence.py
+1
-1
@@ -196,7 +196,7 @@ class Sequence:
196
return self.data.cumulative_logprob
197
198
def get_beam_search_score(self,
199
- length_penalty: float = 0.0,
199
+ length_penalty: float = 1.0,
200
seq_len: Optional[int] = None,
201
eos_token_id: Optional[int] = None) -> float:
202
"""Calculate the beam search score with length penalty.