Skip to content

Commit

Permalink
add eos if suffixes are present
Browse files Browse the repository at this point in the history
  • Loading branch information
molbap committed May 22, 2024
1 parent b08b815 commit e6875a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transformers/models/paligemma/processing_paligemma.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e6875a6

Please sign in to comment.