Skip to content

Commit eda27f4

Browse files
[TF generation] Fix typo (huggingface#7582)
* Fixing top_k and min_length assertions, and a typo fix * Apply suggestions from code review Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
1 parent 0257992 commit eda27f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/generation_tf_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def generate(
225225
assert isinstance(do_sample, bool), "`do_sample` should be a boolean."
226226
assert isinstance(early_stopping, bool), "`early_stopping` should be a boolean."
227227
assert isinstance(use_cache, bool), "`use_cache` should be a boolean."
228-
assert isinstance(num_beams, int) and num_beams > 0, "`num_beams` should be a strictely positive integer."
228+
assert isinstance(num_beams, int) and num_beams > 0, "`num_beams` should be a strictly positive integer."
229229
assert temperature > 0, "`temperature` should be strictely positive."
230230
assert isinstance(top_k, int) and top_k >= 0, "`top_k` should be a positive integer."
231231
assert 0 <= top_p <= 1, "`top_p` should be between 0 and 1."

0 commit comments

Comments
 (0)