Skip to content

Commit

Permalink
make estimated score default
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiscode committed Dec 12, 2024
1 parent b1e907c commit cd5bd8d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/text_utils/inference/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def beam_search(
logit_fns: list[LogitFn] | None = None,
kwargs_select_fn: MaskSelectFn | None = None,
kwargs_update_fn: MaskUpdateFn | None = None,
stop_condition: str | None = None,
stop_condition: str = "estimated_score",
max_new_tokens: int | None = None,
return_incomplete: bool = False,
yield_intermediate: bool = False,
Expand All @@ -43,8 +43,6 @@ def beam_search(
assert (
max_new_tokens is None or max_new_tokens > 0
), "max_new_tokens must be None or positive"
if stop_condition is None:
stop_condition = "max_score"
assert stop_condition in {
"max_score",
"estimated_score",
Expand Down

0 comments on commit cd5bd8d

Please sign in to comment.