Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
flash-attention
Commits
45ba93cd
Commit
45ba93cd
authored
Aug 24, 2023
by
Tri Dao
Browse files
Add newlines to README
parent
9e5e8bc9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
README.md
README.md
+22
-20
No files found.
README.md
View file @
45ba93cd
...
@@ -141,13 +141,15 @@ flash_attn_func(q, k, v, dropout_p=0.0, softmax_scale=None, causal=False)
...
@@ -141,13 +141,15 @@ flash_attn_func(q, k, v, dropout_p=0.0, softmax_scale=None, causal=False)
If seqlen_q != seqlen_k and causal=True, the causal mask is aligned to the
If seqlen_q != seqlen_k and causal=True, the causal mask is aligned to the
bottom right corner of the attention matrix, instead of the top-left corner.
bottom right corner of the attention matrix, instead of the top-left corner.
For example, if seqlen_q = 2 and seqlen_k = 5, the causal mask (1 = keep, 0 = masked out) is:
For example, if seqlen_q = 2 and seqlen_k = 5, the causal mask (1 = keep, 0 =
masked out) is:
v2.0:
v2.0:
1 0 0 0 0
1 0 0 0 0
1 1 0 0 0
1 1 0 0 0
v2.1:
v2.1:
1 1 1 1 0
1 1 1 1 0
1 1 1 1 1
1 1 1 1 1
If seqlen_q = 5 and seqlen_k = 2, the causal mask is:
If seqlen_q = 5 and seqlen_k = 2, the causal mask is:
v2.0:
v2.0:
1 0
1 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment