diff --git a/src/transformers/models/paligemma/processing_paligemma.py b/src/transformers/models/paligemma/processing_paligemma.py index 3362eaaacf6a31..d54ac7f2536dfa 100644 --- a/src/transformers/models/paligemma/processing_paligemma.py +++ b/src/transformers/models/paligemma/processing_paligemma.py @@ -231,6 +231,9 @@ def __call__( pass if suffix is not None and _is_str_or_image(suffix): suffix = [suffix] + if suffix is not None: + suffix = [sfx + self.tokenizer.eos_token for sfx in suffix] + input_strings = [ build_string_from_input( prompt=prompt,