Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add packed QKV and rotary embedding within GroupQueryAttention to model builder #245

Merged
merged 14 commits into from
Apr 8, 2024

Conversation

kunal-vaishnavi
Copy link
Contributor

Description

This PR adds the fusion of rotary embeddings in GroupQueryAttention and combines the Q/K/V MatMuls and Q/K/V Adds into packed QKV MatMuls and packed QKV Adds.

Motivation and Context

The fusion of rotary embeddings in GroupQueryAttention helps improve model performance on large sequence lengths. Combining the individual Q/K/V MatMuls and Q/K/V Adds into packed QKV MatMuls and packed QKV Adds helps improve model performance in general.

@natke natke merged commit 18adb67 into main Apr 8, 2024
10 of 11 checks passed
@natke natke deleted the kvaishnavi/rotemb-in-gqa branch April 8, 2024 23:47
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