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
a6ec1782
Commit
a6ec1782
authored
Dec 27, 2022
by
Tri Dao
Browse files
Bump to v0.2.6
parent
63670fd8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
flash_attn/modules/mha.py
flash_attn/modules/mha.py
+1
-1
flash_attn/utils/generation.py
flash_attn/utils/generation.py
+1
-1
setup.py
setup.py
+1
-1
No files found.
flash_attn/modules/mha.py
View file @
a6ec1782
...
...
@@ -436,7 +436,7 @@ class MHA(nn.Module):
kv
=
self
.
_update_kv_cache
(
qkv
[:,
:,
1
:],
inference_params
)
# If we're processing the prompt, causal=None (use self.causal).
# If we're decoding, then causal=False.
causal
=
Fals
e
if
inference_params
.
sequence_len_offset
==
0
else
Non
e
causal
=
Non
e
if
inference_params
.
sequence_len_offset
==
0
else
Fals
e
context
=
self
.
inner_cross_attn
(
q
,
kv
,
causal
=
causal
)
else
:
if
not
self
.
return_residual
:
...
...
flash_attn/utils/generation.py
View file @
a6ec1782
...
...
@@ -40,7 +40,7 @@ def greedy_decode(input_ids, model, max_length):
inference_params
.
sequence_len_offset
=
seqlen_og
while
True
:
position_ids
=
torch
.
full
((
batch_size
,
1
),
inference_params
.
sequence_len_offset
,
dtype
=
torch
.
long
,
device
=
input_ids
.
device
)
dtype
=
torch
.
long
,
device
=
input_ids
.
device
)
logits
=
model
(
rearrange
(
next_token
,
'b -> b 1'
),
position_ids
=
position_ids
,
inference_params
=
inference_params
).
logits
[:,
-
1
]
scores
.
append
(
logits
)
...
...
setup.py
View file @
a6ec1782
...
...
@@ -156,7 +156,7 @@ ext_modules.append(
setup
(
name
=
"flash_attn"
,
version
=
"0.2.
5
"
,
version
=
"0.2.
6-1
"
,
packages
=
find_packages
(
exclude
=
(
"build"
,
"csrc"
,
"include"
,
"tests"
,
"dist"
,
"docs"
,
"benchmarks"
,
"flash_attn.egg-info"
,)
),
...
...
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