Skip to content

Commit 320fb59

Browse files
committed
Update citation
1 parent e2e4333 commit 320fb59

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,13 @@ If you use this codebase, or otherwise found our work valuable, please cite:
400400
@inproceedings{dao2022flashattention,
401401
title={Flash{A}ttention: Fast and Memory-Efficient Exact Attention with {IO}-Awareness},
402402
author={Dao, Tri and Fu, Daniel Y. and Ermon, Stefano and Rudra, Atri and R{\'e}, Christopher},
403-
booktitle={Advances in Neural Information Processing Systems},
403+
booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
404404
year={2022}
405405
}
406-
@article{dao2023flashattention2,
406+
@inproceedings{dao2023flashattention2,
407407
title={Flash{A}ttention-2: Faster Attention with Better Parallelism and Work Partitioning},
408408
author={Dao, Tri},
409-
year={2023}
409+
booktitle={International Conference on Learning Representations (ICLR)},
410+
year={2024}
410411
}
411412
```

flash_attn/utils/generation.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
from einops import rearrange, repeat
1313
from torch import Tensor
1414
from torch.profiler import ProfilerActivity, profile, record_function
15-
from transformers.generation import GreedySearchDecoderOnlyOutput, SampleDecoderOnlyOutput
15+
16+
try:
17+
from transformers.generation import GreedySearchDecoderOnlyOutput, SampleDecoderOnlyOutput
18+
except ImportError:
19+
GreedySearchDecoderOnlyOutput = namedtuple("GreedySearchDecoderOnlyOutput", ["sequences", "scores"])
20+
SampleDecoderOnlyOutput = namedtuple("SampleDecoderOnlyOutput", ["sequences", "scores"])
1621

1722

1823
@dataclass

0 commit comments

Comments
 (0)