Learn Before
Determining Weight Matrix Dimensions in Multi-Head Attention
A multi-head attention layer is configured with 12 parallel attention heads. The output of each head is a 64-dimensional vector. After concatenating the outputs from all heads, the resulting vector is multiplied by a final weight matrix to produce the layer's final 768-dimensional output vector. What must be the dimensions of this final weight matrix?
0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Application in Bloom's Taxonomy
Cognitive Psychology
Psychology
Social Science
Empirical Science
Science
Related
A multi-head attention layer in a model has 8 parallel attention heads. For a single input token, the output from each of these 8 heads is a vector with 64 dimensions. The mechanism's next step is to concatenate these 8 vectors into a single, larger vector. This larger vector is then multiplied by a final weight matrix to produce the layer's final output vector for that token. What is the dimensionality of the single vector that results from the concatenation step, before the final matrix multiplication is applied?
After each parallel attention head has computed its individual output vector, what is the correct sequence of operations to produce the final output of the multi-head attention layer?
Determining Weight Matrix Dimensions in Multi-Head Attention