Skip to content

Commit

Permalink
Add missing space in generation/utils.py (huggingface#26121)
Browse files Browse the repository at this point in the history
Add missing space in utils.py

Warning now reads as "...  to control thegeneration length. We ..."
  • Loading branch information
jbochi authored and EduardoPach committed Nov 18, 2023
1 parent c898ca1 commit 21b412d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/generation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ def _validate_generated_length(self, generation_config, input_ids_length, has_de
if has_default_max_length and generation_config.max_new_tokens is None and generation_config.max_length == 20:
# 20 is the default max_length of the generation config
warnings.warn(
f"Using the model-agnostic default `max_length` (={generation_config.max_length}) to control the"
f"Using the model-agnostic default `max_length` (={generation_config.max_length}) to control the "
"generation length. We recommend setting `max_new_tokens` to control the maximum length of the "
"generation.",
UserWarning,
Expand Down

0 comments on commit 21b412d

Please sign in to comment.