Skip to content

Fix layernorm in GQA - #434

Merged
ksivaman merged 13 commits into
NVIDIA:mainfrom
cyanguwa:fix-gqa-ln
Sep 23, 2023
Merged

Fix layernorm in GQA#434
ksivaman merged 13 commits into
NVIDIA:mainfrom
cyanguwa:fix-gqa-ln

Conversation

@cyanguwa

@cyanguwacyanguwa commented Sep 15, 2023

Copy link
Copy Markdown
Collaborator

This is based on #394 and has a few more changes in order to complete the functionality and pass the CI tests.

Marks101and others added 7 commits September 7, 2023 15:35
fixesNVIDIA#392
Signed-off-by: Markus Schnoes <markus.schnoes@gmx.de>
…r to support splitting with different sizes as required by unfused GQA.
Signed-off-by: Markus Schnoes <markus.schnoes@gmx.de>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
@cyanguwa
cyanguwa marked this pull request as ready for review September 15, 2023 00:22
@cyanguwa

Copy link
Copy Markdown
CollaboratorAuthor

Pipeline 9820505

Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
@cyanguwa

cyanguwa commented Sep 15, 2023

Copy link
Copy Markdown
CollaboratorAuthor

Pipeline 9827724 is green.

Comment threadtransformer_engine/pytorch/module/base.py Outdated
Comment threadtransformer_engine/pytorch/module/base.py Outdated
Comment threadtransformer_engine/pytorch/attention.py Outdated
Comment threadtransformer_engine/pytorch/attention.py Outdated
Comment threadtransformer_engine/pytorch/attention.py Outdated
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
@cyanguwa

Copy link
Copy Markdown
CollaboratorAuthor

Pipeline 9936670

@timmoon10timmoon10 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

@ksivaman
ksivaman merged commit db58951 into NVIDIA:mainSep 23, 2023
ptrendx pushed a commit that referenced this pull request Oct 2, 2023
* [PyTorch] Implement GQA based on fused q, k, v projection. Additionally fixes#392
Signed-off-by: Markus Schnoes <markus.schnoes@gmx.de>
* [PyTorch] Extend parameters_split option in Linear and LayerNormLinear to support splitting with different sizes as required by unfused GQA.
Signed-off-by: Markus Schnoes <markus.schnoes@gmx.de>
* fix parameters split
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
* fix noop cat to bypass torch.cat and support uneven split
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
* fix unit tests
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
* fix torch.split args
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
* fix cuda graph due to noop_cat
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
* fix lint
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
* remove the use of enumerate when possible
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
* fix strides in SplitAlongDim
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
---------
Signed-off-by: Markus Schnoes <markus.schnoes@gmx.de>
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
Co-authored-by: Markus Schnoes <markus.schnoes@gmx.de>
@cyanguwa
cyanguwa deleted the fix-gqa-ln branch February 22, 2024 00:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@cyanguwa@timmoon10@ksivaman@Marks101