Skip to content
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

GEGLU activation for T5 #3694

Merged
merged 8 commits into from
Feb 18, 2022
Merged

GEGLU activation for T5 #3694

merged 8 commits into from
Feb 18, 2022

Conversation

MaximumEntropy
Copy link
Contributor

Signed-off-by: MaximumEntropy [email protected]

What does this PR do ?

Adds the GEGLU activation function for T5

Collection: NLP

Changelog

  • Updates ParallelMLP to instantiate a new linear layer if the activation is GEGLU.
  • Applies the appropriate activation function based on the provided activation arg.

Usage

  • You can potentially add a usage example below

Set model.activation=gelu or model.activation=geglu in megatron_t5_config.yaml

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

Signed-off-by: MaximumEntropy <[email protected]>
Signed-off-by: MaximumEntropy <[email protected]>
Signed-off-by: MaximumEntropy <[email protected]>
Signed-off-by: MaximumEntropy <[email protected]>
Signed-off-by: MaximumEntropy <[email protected]>
ericharper
ericharper previously approved these changes Feb 17, 2022
Copy link
Collaborator

@ericharper ericharper left a comment

Choose a reason for hiding this comment

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

LGTM.

Signed-off-by: MaximumEntropy <[email protected]>
Copy link
Collaborator

@ericharper ericharper left a comment

Choose a reason for hiding this comment

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

LGTM.

@ericharper ericharper merged commit 2ae4d43 into main Feb 18, 2022
@ericharper ericharper deleted the megatron_geglu branch February 18, 2022 02:30
fayejf pushed a commit that referenced this pull request Mar 2, 2022
* GEGLU activation

Signed-off-by: MaximumEntropy <[email protected]>

* Add activation to config

Signed-off-by: MaximumEntropy <[email protected]>

* Style fixes

Signed-off-by: MaximumEntropy <[email protected]>

* Update config

Signed-off-by: MaximumEntropy <[email protected]>

* Update license header

Signed-off-by: MaximumEntropy <[email protected]>
Sign up for free to 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