-
Notifications
You must be signed in to change notification settings - Fork 117
Add skip layer normalization #3865
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
Closed
TedThemistokleous
wants to merge
15
commits into
add_attention_contrib_op
from
add_skip_layer_normalization
Closed
Add skip layer normalization #3865
TedThemistokleous
wants to merge
15
commits into
add_attention_contrib_op
from
add_skip_layer_normalization
Conversation
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
needs work on input dimensions
…dLayerNormalization with added beta input
94f3908 to
9709f30
Compare
…t to reflect this Required that both mean and variance outputs are float type and not converted. This works as epsilon as well as this attribute is always float as well. Removes a bunch of extra converts when this operator is reduce precision (Float16/bf,etc)
beta and bias were flipped. Sorted this out and updated parser. captured testing beta path in parser test
Needs to have values checked. Currently working out data. Just grabbed the skip_simplied_layernorm portion and reused this while modying tests to add in beta and bias values We should be performing the following operation to verify data via numpy https://pytorch.org/docs/stable/generated/torch.nn.LayerNorm.html
994ce5d to
b90c76b
Compare
Collaborator
Author
|
Moved to 3917 to get that into develop by @ahsan-ca |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Onnx Operators
Adding or modifying an Onnx Operator in the MIGraphX codebase
roadmap
Tasks to finish for a release
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.
Needed to support customer models. Seen in optimized versions of BERT or optimizations using the Onnxruntime toolset
Currently built off the add_attention_contrib_op branch as this is used to parse in an optimized bert model
official Doc here: https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#com.microsoft.SkipLayerNormalization
Other useful descriptions (this vs say simplified case)
https://pytorch.org/docs/stable/generated/torch.nn.RMSNorm.html#torch.nn.RMSNorm (also known as simplified)
https://sh-tsang.medium.com/review-layer-normalization-ln-6c2ae88bae47