Skip to content

Commit 36a374e

Browse files
authored
Merge pull request labmlai#226 from MrYxJ/patch-1
Fix a typo in the formula of ALiBi.
2 parents 07b5782 + 830161b commit 36a374e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

labml_nn/transformers/alibi/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
\begin{align}
2121
\mathbf{a}_i
22-
&= \text{softmax} \bigg( \mathbf{q}_i \mathbf{K}^\top + m \cdot \big[-(i-1), \dots, 1, 0 \big] \bigg) \\
22+
&= \text{softmax} \bigg( \mathbf{q}_i \mathbf{K}^\top + m \cdot \big[-(i-1), \dots, -1, 0 \big] \bigg) \\
2323
&= \text{softmax} \bigg( \mathbf{q}_i \mathbf{K}^\top + m \cdot \big[0, 1, \dots, (i - 1) \big] \bigg)
2424
\end{align}
2525

0 commit comments

Comments
 (0)