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 option to remove bias from q,k,v projections in MHA #436

Closed

Conversation

abhinavarora
Copy link
Contributor

Summary: Adds an option to remove bias q,k,v projections in MHA, This diff adds a add_bias arg to MultiHeadAttentionWithCache. The options defaults to True and will not change the behavior of existing use sites.

Reviewed By: ankitade, pikapecan

Differential Revision: D47594542

@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 Jul 19, 2023
@facebook-github-bot
Copy link
Contributor

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

abhinavarora pushed a commit to abhinavarora/multimodal that referenced this pull request Jul 19, 2023
…arch#436)

Summary:
Pull Request resolved: facebookresearch#436

Adds an option to remove bias q,k,v projections in MHA, This diff adds a `add_bias` arg to `MultiHeadAttentionWithCache`. The options defaults to True and will not change the behavior of existing  use sites.

Reviewed By: ankitade, pikapecan

Differential Revision: D47594542

fbshipit-source-id: f2cea27842e2adcb264aed766895676fc723ac1b
@facebook-github-bot
Copy link
Contributor

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

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2023

Codecov Report

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

Comparison is base (fe379e4) 68.59% compared to head (ff92860) 68.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #436      +/-   ##
==========================================
+ Coverage   68.59%   68.65%   +0.05%     
==========================================
  Files         169      169              
  Lines       11338    11350      +12     
==========================================
+ Hits         7777     7792      +15     
+ Misses       3561     3558       -3     
Files Changed 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.
📢 Have feedback on the report? Share it here.

…arch#436)

Summary:
Pull Request resolved: facebookresearch#436

Adds an option to remove bias q,k,v projections in MHA, This diff adds a `add_bias` arg to `MultiHeadAttentionWithCache`. The options defaults to True and will not change the behavior of existing  use sites.

Reviewed By: ankitade, pikapecan

Differential Revision: D47594542

fbshipit-source-id: 667680dd238efb7ecc3531d28da9cfe8f631f2b4
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1940623.

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 Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants