Skip to content

[PyTorch] Linear and LayerNormLinear bug fix for excess weight and bias buffers - #570

Merged
ptrendx merged 3 commits into
NVIDIA:mainfrom
denera:pytorch-linear-excess-buffer-fix
Dec 18, 2023
Merged

[PyTorch] Linear and LayerNormLinear bug fix for excess weight and bias buffers#570
ptrendx merged 3 commits into
NVIDIA:mainfrom
denera:pytorch-linear-excess-buffer-fix

Conversation

@denera

Copy link
Copy Markdown
Collaborator

Linear and LayerNormLinear initialization leaves behind unused copies of the weight and bias tensors when there is no parameter split. This PR removes these buffers at the end of the initialization.

…of init when there is no parameter split
Signed-off-by: Alp Dener <adener@nvidia.com>
@deneradenera self-assigned this Dec 15, 2023
@denera

Copy link
Copy Markdown
CollaboratorAuthor

/te-ci pytorch

Signed-off-by: Alp Dener <adener@nvidia.com>
Signed-off-by: Alp Dener <adener@nvidia.com>
@denera

Copy link
Copy Markdown
CollaboratorAuthor

/te-ci pytorch

@ptrendxptrendx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ptrendx
ptrendx merged commit 82555b3 into NVIDIA:mainDec 18, 2023
Quentin-Anthony pushed a commit to EleutherAI/TransformerEngine that referenced this pull request Jan 4, 2024
…as buffers (NVIDIA#570)
* Linear and LayerNormLinear weight and bias buffer cleanup at the end of init when there is no parameter split
Signed-off-by: Alp Dener <adener@nvidia.com>
* fixed typo in tensor name
Signed-off-by: Alp Dener <adener@nvidia.com>
* fixed typo in tensor name
Signed-off-by: Alp Dener <adener@nvidia.com>
---------
Signed-off-by: Alp Dener <adener@nvidia.com>
Signed-off-by: Quentin Anthony <qganthony@yahoo.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@denera@ptrendx