GPT2 attention mask and output masking
## ❓ Questions & Help

<!-- A clear and concise description of the question. -->

I have couple of questions:
1. In the original gpt2 they didn't pad the sequence, so they didn't need a  attention mask, but in other cases where we our input sequence is small and we pad the input, don't we need a attention mask?
2. I have padded the labels in the left with -1, in the cost function how do I skip the padded elements in labels? and same for logits how do I skip the padded elements ? 
Closing this because I found my answer<|||||>Hi, would you mind sharing what the answer you found is? Thank you so much!<|||||>Sorry for the delay. Gpt2 was trained as a CLM model with a fixed block size of data. So there was no need for attention mask. (That is what I understood). 