Skip to content
RED SAG Skills
hardStudy question · answer published in Transformers interview questions, so no pointstransformersattention

NaNs from a fully masked row

Training is fine until a batch contains an example that is entirely padding. The loss becomes NaN. Your mask fills masked scores with −inf. What is the likely cause?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions