Skip to content

Commit ac77da5

Browse files
authored
Update 2024-08-07-flexattention.md
1 parent c803547 commit ac77da5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_posts/2024-08-07-flexattention.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Alibi is similar to relative positional encodings with one exception \- it has a
131131
alibi_bias = generate_alibi_bias() # [num_heads]
132132

133133
def alibi(score, b, h, q_idx, kv_idx):
134-
bias = alibi_bias[h] * (q_idx - kv_idx)
134+
bias = alibi_bias[h] * (kv_idx - q_idx)
135135
return score + bias
136136
```
137137

@@ -479,4 +479,4 @@ We want to highlight some prior work (and people) that have inspired FlexAttenti
479479
- The Jax team's work on SplashAttention
480480
- Philippe Tillet and Keren Zhou for helping us with Triton
481481
- Ali Hassani for discussions on neighborhood attention
482-
- Everybody who's complained about attention kernels not supporting their favorite attention variant :)
482+
- Everybody who's complained about attention kernels not supporting their favorite attention variant :)

0 commit comments

Comments
 (0)