where Q, K, and V represent the query, key, and value matrices, respectively. Here, d k is the dimensionality of the key vectors. The multi-head attention is obtained by concatenating multiple such attention heads. The multi-head self-attention mechanism allows the model to focus on different parts of the input sequence when computing the output for a particular token.