We want to find the self-attention weights assigned to the tokens in the sequence “Attention is everything” using scaled dot product attention. A single head is used. The sequence is of length 3, and the dimensionality of the transformer is 4. Below is the input embedding of shape (3, 4). Note that this embedding is the sum of the token embedding and the position embedding.   X = [1, 2, 3, 4]        [5, 0, 7, 0]        [9, 0, 1, 2]   The weights of the Q, K, and V are:   Wq = [0.3, 0.2, 0.8, 0.9]           [0.4, 0.1, 0.4, 0.5]           [0.5, 0.7, 0.2, 0.8]           [0.8, 0.8, 0.7, 0.4]   Wk = [0.3, 0.9, 0.2, 0.7]           [0.5, 0.4, 0.2, 0.2]           [0.1, 0.7, 0.3, 0.6]           [0.8, 0.4, 0.5, 0.9]   Wv = [0.2, 0.2, 0.3, 0.9]           [0.2, 0.3, 0.8, 0.6]           [0.7, 0.5, 0.9, 0.9]           [1.0, 0.4, 0.2, 0.5]   If a causal mask is applied, what attention weight does “is” assign to “everything” in the sequence “Attention is everything”? Give the answer to 2dp. Hint: Lecture 19 slides 17 - 27数值题

A

0

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!