mirror of
https://github.com/labmlai/annotated_deep_learning_paper_implementations.git
synced 2025-08-14 09:31:42 +08:00
Merge pull request #226 from MrYxJ/patch-1
Fix a typo in the formula of ALiBi.
This commit is contained in:
@ -19,7 +19,7 @@ Here's the attention formula for $i$-th token,
|
||||
|
||||
\begin{align}
|
||||
\mathbf{a}_i
|
||||
&= \text{softmax} \bigg( \mathbf{q}_i \mathbf{K}^\top + m \cdot \big[-(i-1), \dots, 1, 0 \big] \bigg) \\
|
||||
&= \text{softmax} \bigg( \mathbf{q}_i \mathbf{K}^\top + m \cdot \big[-(i-1), \dots, -1, 0 \big] \bigg) \\
|
||||
&= \text{softmax} \bigg( \mathbf{q}_i \mathbf{K}^\top + m \cdot \big[0, 1, \dots, (i - 1) \big] \bigg)
|
||||
\end{align}
|
||||
|
||||
|
Reference in New Issue
Block a user