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

fix MegatronLayerPolicy to be compatible with the newest ParallelTransformerLayer #4236

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

dc3671
Copy link
Contributor

@dc3671 dc3671 commented Aug 30, 2023

Problem

Currently in DeepSpeed, will try to get client_module.attention while the actual ParallelTransformerLayer has no attention but self_attention according to this file https://github.com/microsoft/Megatron-DeepSpeed/blob/main/megatron/model/transformer.py#L927

The whole structure is:
image

Solution

I followed existed way by modifying version attribute to make it compatible with the newest ParallelTransformerLayer, and change attention to self_attention.

But I'm not sure whether ParallelTransformerLayer is changed or it's a new module, which means changing MegatronLayerPolicy.version is correct.

Copy link
Contributor

@RezaYazdaniAminabadi RezaYazdaniAminabadi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @dc3671

@tjruwase tjruwase added this pull request to the merge queue Aug 30, 2023
Merged via the queue into deepspeedai:master with commit 6cbf666 Aug 31, 2023
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