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
320fb594
Commit
320fb594
authored
May 26, 2024
by
Tri Dao
Browse files
Update citation
parent
e2e4333c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
README.md
README.md
+4
-3
flash_attn/utils/generation.py
flash_attn/utils/generation.py
+6
-1
No files found.
README.md
View file @
320fb594
...
...
@@ -400,12 +400,13 @@ If you use this codebase, or otherwise found our work valuable, please cite:
@inproceedings{dao2022flashattention,
title={Flash{A}ttention: Fast and Memory-Efficient Exact Attention with {IO}-Awareness},
author={Dao, Tri and Fu, Daniel Y. and Ermon, Stefano and Rudra, Atri and R{\'e}, Christopher},
booktitle={Advances in Neural Information Processing Systems},
booktitle={Advances in Neural Information Processing Systems
(NeurIPS)
},
year={2022}
}
@
article
{dao2023flashattention2,
@
inproceedings
{dao2023flashattention2,
title={Flash{A}ttention-2: Faster Attention with Better Parallelism and Work Partitioning},
author={Dao, Tri},
year={2023}
booktitle={International Conference on Learning Representations (ICLR)},
year={2024}
}
```
flash_attn/utils/generation.py
View file @
320fb594
...
...
@@ -12,7 +12,12 @@ import torch.nn.functional as F
from
einops
import
rearrange
,
repeat
from
torch
import
Tensor
from
torch.profiler
import
ProfilerActivity
,
profile
,
record_function
from
transformers.generation
import
GreedySearchDecoderOnlyOutput
,
SampleDecoderOnlyOutput
try
:
from
transformers.generation
import
GreedySearchDecoderOnlyOutput
,
SampleDecoderOnlyOutput
except
ImportError
:
GreedySearchDecoderOnlyOutput
=
namedtuple
(
"GreedySearchDecoderOnlyOutput"
,
[
"sequences"
,
"scores"
])
SampleDecoderOnlyOutput
=
namedtuple
(
"SampleDecoderOnlyOutput"
,
[
"sequences"
,
"scores"
])
@
dataclass
...
...
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