mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
align formulas in notes with code (#605)
This commit is contained in:
committed by
GitHub
parent
67e0680210
commit
3654571184
@@ -797,9 +797,9 @@
|
||||
"- Implementing the self-attention mechanism step by step, we will start by introducing the three training weight matrices $W_q$, $W_k$, and $W_v$\n",
|
||||
"- These three matrices are used to project the embedded input tokens, $x^{(i)}$, into query, key, and value vectors via matrix multiplication:\n",
|
||||
"\n",
|
||||
" - Query vector: $q^{(i)} = W_q \\,x^{(i)}$\n",
|
||||
" - Key vector: $k^{(i)} = W_k \\,x^{(i)}$\n",
|
||||
" - Value vector: $v^{(i)} = W_v \\,x^{(i)}$\n"
|
||||
" - Query vector: $q^{(i)} = x^{(i)}\\,W_q $\n",
|
||||
" - Key vector: $k^{(i)} = x^{(i)}\\,W_k $\n",
|
||||
" - Value vector: $v^{(i)} = x^{(i)}\\,W_v $\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user