+
Skip to content

Conversation

Narsil
Copy link
Contributor

@Narsil Narsil commented Feb 26, 2023

Tried to implement cat but there were some weird issues, and it was
causing a ton of kernels being called, with each some device to host sync (huge bottleneck).

This PR adds a pretty specific reshape for (qkv, past_key, past_value) useful for
inference run of transformer models. For instance gpt2 (https://github.com/Narsil/fast_gpt2)

@Narsil
Copy link
Contributor Author

Narsil commented Feb 27, 2023

@coreylowman

Copy link
Owner

@coreylowman coreylowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice contribution, thanks! 🚀

@coreylowman coreylowman merged commit 1d8d20a into coreylowman:main Feb 28, 2023
@Narsil Narsil deleted the attention_reshape branch February 28, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载