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

Remove redundant layer norm operation #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

owmohamm
Copy link

@owmohamm owmohamm commented Dec 5, 2020

In the pre-layernorm version of BERT, the application of layernorm on the embeddings is redundant since it is applied by the first transformer layer as well.

For reference: https://github.com/NVIDIA/Megatron-LM/blob/19301985dd31c8b612095cbad15bd903e8ddd497/megatron/model/language_model.py#L165

@owmohamm
Copy link
Author

owmohamm commented Dec 8, 2020

I don't have permissions to merge the pull request. So could someone else from the deepspeed team do that?

@RezaYazdaniAminabadi
Copy link
Contributor

Hi Owais,

Thanks again for pointing this possible bug in the deepspeed example. We are discussing this in the team and will merge it soon if there is no accuracy impact!

Thanks,
Reza

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.

3 participants