Skip to content
ml-recall

#attention-mask

2 questions from Attention & Transformers, PyTorch

Timed test

2 questions · 2 min · score and explanations at the end

Take a test
Q 1 / 2Score 0 / 0

Question 1: Single choice

easyAI-checkedAttention & Transformers

In self-attention, A=softmax(QK⊤/dk)A = \mathrm{softmax}(QK^\top / \sqrt{d_k}) row by row, and token ii must not attend to token jj. What do you do to the score in row ii, column jj so that Aij=0A_{ij} = 0 and every row of AA still sums to 1?

Choose one option