Closed tilmanbeck closed 5 months ago
cc @Rocketknight1
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
System Info
System Info Python=3.11.5 Transformers= '4.37.2'
In my setup I am initializing a tokenizer and want to pass it to the pipeline. My expectation is that if I set the padding_side directly on tokenizer instance, the pipeline should not print the warning
A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set 'padding_side="left"' when initializing the tokenizer.
Alternatively, I would like to add it as a parameter to the pipeline instantiation, but I think passing tokenizer parameters in the pipeline generator is currently not envisioned, as discussed in https://github.com/huggingface/transformers/issues/12039 https://github.com/huggingface/transformers/issues/24707 https://github.com/huggingface/transformers/pull/22995
Possibly similar issue origin as reported in #29378
@Narsil
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
This prints the warning message: A decoder-only architecture is being used, but right-padding was detected! For correct generation results, please set
padding_side='left'
when initializing the tokenizer.Expected behavior
The warning message should not be printed as
padding_side
was set during tokenizer initialization. Alternatively, I would expect to be able to providepadding_side
parameter directly to the pipeline generation.