Hi, thanks for your response.
So what I understand is that adding padding=True allows that for those two inputs, padding is added so that all of them have the same amount of tokens as the max in that batch (adding padding and mask with zeros).
But what I don’t understand is for example in that case, supposing that the first string has 4 tokens and the second one 3 tokens (I think distilbert uses sentence-piece tokenization but for the sake of simplicity).
How does that sequence for example (without including the tensors part for simplicity):
[[1,6,22,56],[1,6,278, pad_token_id]] gets processed in the forward pass before being feed to the model as both sequences have length 4 which doesn’t match the 512 window input of the model?