Update src/transformers/generation/configuration_utils.py

This commit is contained in:
Manuel de Prada Corral 2025-05-27 16:33:44 +02:00 committed by GitHub
parent a5f7900b5c
commit eaa2e2d169
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -649,7 +649,7 @@ class GenerationConfig(PushToHubMixin):
if self.do_sample is False:
greedy_wrong_parameter_msg = (
"`do_sample` is set to `False`, so sampling-based generation is disabled. "
"The parameter `{flag_name}={flag_value}` will be ignored, as it only applies to sampling-based generation. "
"The parameter `{flag_name}` is set to `{flag_value}`, but will be ignored as it only applies to sampling-based generation. "
"Consider enabling `do_sample` or removing `{flag_name}`."
)
if self.temperature is not None and self.temperature != 1.0: