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

Passing in attn_score_scaling_factor into tvm_wrapper #126

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

rickzx
Copy link
Contributor

@rickzx rickzx commented Feb 19, 2024

In GPT-2, attention calculation requires an additional feature scale_attn_by_inverse_layer_idx. It provides a scaling factor per attention layer when calculating the attention score, before applying the softmax function.

This PR supports this additional parameter in tvm_wrapper.

See: apache/tvm#16606

@rickzx
Copy link
Contributor Author

rickzx commented Feb 19, 2024

cc: @MasterJH5574

Copy link
Collaborator

@MasterJH5574 MasterJH5574 left a comment

Choose a reason for hiding this comment

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

Thank you @rickzx!

cc @yzh119 for another look

@yzh119
Copy link
Collaborator

yzh119 commented Feb 19, 2024

Thanks for the patch.

@yzh119 yzh119 merged commit f1f6a0d into flashinfer-ai:main Feb 19, 2024
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.

3 participants