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

Attention with caching #429

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pikapecan
Copy link

Summary:
as title
adding attention with F.scaled_dot_product_attention, this class can be used for both self-attention and cross-attention.

details in https://docs.google.com/document/d/1a32JYAmXuwNX4c9HaZmrP1lrKlR_3A1skmzW6uAE7iM/edit#heading=h.vgbzma4xcyfm

Reviewed By: ankitade

Differential Revision: D46377616

Summary:
as title
adding attention with F.scaled_dot_product_attention, this class can be used for both self-attention and cross-attention.

details in https://docs.google.com/document/d/1a32JYAmXuwNX4c9HaZmrP1lrKlR_3A1skmzW6uAE7iM/edit#heading=h.vgbzma4xcyfm

Reviewed By: ankitade

Differential Revision: D46377616

fbshipit-source-id: 8b35bd2f9c35cf6544db96ed4862eb5c385e496d
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jun 7, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46377616

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.24 🎉

Comparison is base (d646d16) 68.38% compared to head (b1af51e) 68.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #429      +/-   ##
==========================================
+ Coverage   68.38%   68.62%   +0.24%     
==========================================
  Files         169      169              
  Lines       11259    11340      +81     
==========================================
+ Hits         7699     7782      +83     
+ Misses       3560     3558       -2     
Impacted Files Coverage Δ
tests/modules/layers/test_multi_head_attention.py 100.00% <100.00%> (ø)
...hmultimodal/modules/layers/multi_head_attention.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants