Concept

Generation of Query, Key, and Value Vectors in Self-Attention

In a self-attention layer, the Query (Q), Key (K), and Value (V) vectors are not the direct inputs themselves but are generated through linear transformations of the same input sequence. This input is typically the output from the preceding layer. Each vector in the input sequence is multiplied by three distinct weight matrices (WqW_q, WkW_k, and WvW_v) to produce its corresponding Q, K, and V vectors.

0

1

Updated 2025-10-10

Contributors are:

Who are from:

Tags

Ch.5 Inference - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences