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

[ONNX] Add Onnx->Torch lowering for GroupQueryAttention op #4006

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vivekkhandelwal1
Copy link
Collaborator

This commit adds the lowering for Onnx's GroupQueryAttention op.

The lowering is adopted from here: https://github.com/microsoft/onnxruntime/blob/65008cbb7393b121400a40dd8af4cc93d506918f/onnxruntime/contrib_ops/cpu/bert/group_query_attention.cc#L45

The lowering supports the GQA with rotary_embedding.

Signed-off-by: Vivek Khandelwal [email protected]

Add Torch->Linalg for rotary embedding

Add lowering for rotary embedding - rough patch

Add check inputs to rot_emb lowering

Add test for rotary embedding

Rebase fix
This commit adds the lowering for Onnx's GroupQueryAttention op.
The lowering is adopted from here: https://github.com/microsoft/onnxruntime/blob/65008cbb7393b121400a40dd8af4cc93d506918f/onnxruntime/contrib_ops/cpu/bert/group_query_attention.cc#L45
The lowering supports the GQA with rotary_embedding.

Signed-off-by: Vivek Khandelwal <[email protected]>
@vivekkhandelwal1
Copy link
Collaborator Author

This PR also contains the commit for Rotary_embedding since the lowering need that. I will remove it from this PR, once this PR #4002 is merged.

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.

1 participant