Uh oh!
There was an error while loading. Please reload this page.
Zero-centered gamma support in LayerNorm (LayerNorm1p) - #67
Merged
Conversation
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
ptrendx
commented
Feb 7, 2023
MemberAuthor
/te-ci |
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Signed-off-by: Przemyslaw Tredak <ptredak@nvidia.com>
ptrendx
commented
Feb 7, 2023
MemberAuthor
/te-ci |
mikolajblaz
commented
Feb 8, 2023
@ptrendx I noticed that none of the backward kernels receive the From my limited understanding of kernels, those are the 2 places that might need a |
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
ptrendx
commented
Feb 9, 2023
MemberAuthor
/te-ci |
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
ptrendx
commented
Feb 14, 2023
MemberAuthor
/te-ci |
ksivaman
commented
Feb 15, 2023
Member
ci errors are unrelated (ONNX) |
nzmora-nvidia pushed a commit
to nzmora-nvidia/TransformerEngine
that referenced
this pull request
Feb 15, 2023
* C++ implementation of LayerNorm1P Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Expose zero centered gamma to pyTorch Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Fix Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Fix ONNX export Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Fix ONNX export and tests Signed-off-by: Przemyslaw Tredak <ptredak@nvidia.com> * Fix lint Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Fix backward handling - C++ part Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Fix for backward - Python side Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Fix FP8 path Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Reenable the pylint check Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Fix the NVTX marker Signed-off-by: Przemek Tredak <ptredak@nvidia.com> * Change in the bwd kernel Signed-off-by: Przemek Tredak <ptredak@nvidia.com> --------- Signed-off-by: Przemek Tredak <ptredak@nvidia.com> Signed-off-by: Przemyslaw Tredak <ptredak@nvidia.com>
This was referenced Feb 22, 2023
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 freeto 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 adds a new option to LayerNorm (and other APIs that use LN) to initialize gamma parameter to 0 and use (1+gamma) instead of gamma.
This improves the precision characteristics of LN parameters and makes some techniques, like the weight decay, easier to implement for LN parameters.