Multi-Head Attention Layer Implementation#2172
Closed
MaximilianSchreff wants to merge 25 commits intoapache:mainfrom
Closed
Multi-Head Attention Layer Implementation#2172MaximilianSchreff wants to merge 25 commits intoapache:mainfrom
MaximilianSchreff wants to merge 25 commits intoapache:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2172 +/- ##
============================================
- Coverage 71.97% 71.86% -0.11%
- Complexity 43855 44427 +572
============================================
Files 1441 1445 +4
Lines 166018 168173 +2155
Branches 32396 32827 +431
============================================
+ Hits 119494 120865 +1371
- Misses 37294 38019 +725
- Partials 9230 9289 +59 ☔ View full report in Codecov by Sentry. |
Contributor
|
Thanks for the patch @MaximilianSchreff. Can you please add the missing license header to the java test file? |
Contributor
Author
|
@phaniarnab, sorry forgot that. Now added. |
Contributor
|
Thanks for the changes. I will merge it in. @MaximilianSchreff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces multi-head attention layers as a built in layer with forward and backward pass.
Description
The multi-head attention layer is the base layer of all most Transformer models, with many variations for different models. This implementation is in-line with the basic BERT attention layer. The functionality is currently kept to a minimum without features like attention masking, head masking, cross-attention, etc.
Testing
Notes
This PR is the first in a number of PRs in an effort to support the BERT model in SystemDS and other transformer models in the future.