Fix typo in comments (#10157)

This commit is contained in:
Manuel Romero
2021-02-13 14:26:01 +01:00
committed by GitHub
parent c9837a0d27
commit c969366870

View File

@@ -1245,7 +1245,7 @@ class GenerationMixin:
outputs, model_kwargs, is_encoder_decoder=self.config.is_encoder_decoder outputs, model_kwargs, is_encoder_decoder=self.config.is_encoder_decoder
) )
# stop when there is a </s> in each sentence, or if we exceed the maximul length # stop when there is a </s> in each sentence, or if we exceed the maximum length
if unfinished_sequences.max() == 0: if unfinished_sequences.max() == 0:
break break
@@ -1451,7 +1451,7 @@ class GenerationMixin:
sequence_lengths, unfinished_sequences, cur_len, next_tokens == eos_token_id sequence_lengths, unfinished_sequences, cur_len, next_tokens == eos_token_id
) )
# stop when there is a </s> in each sentence, or if we exceed the maximul length # stop when there is a </s> in each sentence, or if we exceed the maximum length
if unfinished_sequences.max() == 0: if unfinished_sequences.max() == 0:
break break