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

Refactoring: in CachedMultiHeadAttention call MHA methods instead of recoding the attention calculation #1684

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

apehex
Copy link
Contributor

@apehex apehex commented Jul 6, 2024

Here's a small refactoring, as explained in #1683 👾

I propose to call the parent class methods instead of reimplementing the calculations.

Copy link

google-cla bot commented Jul 6, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the refactor.

@mattdangerw mattdangerw added the kokoro:force-run Runs Tests on GPU label Jul 8, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Runs Tests on GPU label Jul 8, 2024
@mattdangerw
Copy link
Member

It looks like this needs a reformat. Just pushed the results of running the format script directly to this branch.

@mattdangerw mattdangerw added the kokoro:force-run Runs Tests on GPU label Jul 8, 2024
@kokoro-team kokoro-team removed kokoro:force-run Runs Tests on GPU labels Jul 8, 2024
@mattdangerw mattdangerw merged commit 29c85c0 into keras-team:master Jul 8, 2024
8 checks passed
@apehex
Copy link
Contributor Author

apehex commented Jul 9, 2024

Sorry I'll check format next time!

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