Why do transformers need padding masks?
Reveal the answer and explore the explanation.
10HardWhy do transformers need padding masks?
Answer
Hard
Why do transformers need padding masks?
Answer
Indicates positions that should not contribute as real tokens.
Practical example
Prevent a transformer from attending to padding.
Reference: Further reading ↗