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
OpenDAS
Megatron-LM
Commits
a7cce320
Commit
a7cce320
authored
Apr 06, 2023
by
Jimmy Zhang
Browse files
dropout variable
parent
254e8815
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
megatron/model/transformer.py
megatron/model/transformer.py
+2
-1
No files found.
megatron/model/transformer.py
View file @
a7cce320
...
...
@@ -384,10 +384,11 @@ class FlashSelfAttention(torch.nn.Module):
is_causal
=
seqlen_q
==
seqlen_k
cu_seqlens_k
=
torch
.
arange
(
0
,
(
batch_size
+
1
)
*
seqlen_k
,
step
=
seqlen_k
,
dtype
=
torch
.
int32
,
device
=
q
.
device
)
self
.
dropout_p
=
0
output
=
flash_attn_unpadded_func
(
q
,
k
,
v
,
cu_seqlens_q
,
cu_seqlens_k
,
seqlen_q
,
seqlen_k
,
0.0
,
self
.
dropout_p
,
softmax_scale
=
self
.
softmax_scale
,
causal
=
is_causal
)
...
...
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