You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the generate function with batched input, the results are inconsistent compared to when the batch size is 1. There will be many empty strings sometimes.
I had this exact same issue. The main problem stems from the internal tokenizer padding on the right, thus using the pad tokens to generate the output. You can fix this by manually changing the tokenizer_padding_side in the model:
When I use the generate function with batched input, the results are inconsistent compared to when the batch size is 1. There will be many empty strings sometimes.
The batch inference results are correct when working with pure text. What could be the cause of this issue, and how can I resolve it? Thank you!
The text was updated successfully, but these errors were encountered: