Skip to content

Commit

Permalink
Fix paligemma warning message (huggingface#35486)
Browse files Browse the repository at this point in the history
fix log input
  • Loading branch information
hiyouga authored Jan 2, 2025
1 parent b2b04e8 commit 4286586
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/models/paligemma/modeling_paligemma.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def forward(
# mask out pad-token-ids in labels for BC
if labels is not None and self.pad_token_id in labels:
logger.warning_once(
"`labels` contains `pad_token_id` which will be masked with `config.ignore_index`. ",
"`labels` contains `pad_token_id` which will be masked with `config.ignore_index`. "
"You have to mask out `pad_token_id` when preparing `labels`, this behavior will be removed in v.4.46.",
)
labels = torch.where(input_ids == self.pad_token_id, self.config.ignore_index, labels)
Expand Down

0 comments on commit 4286586

Please sign in to comment.