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

[BUG]Megatron-LM doesn't support transformer-engine 1.13 #1280

Open
klhhhhh opened this issue Nov 11, 2024 · 1 comment
Open

[BUG]Megatron-LM doesn't support transformer-engine 1.13 #1280

klhhhhh opened this issue Nov 11, 2024 · 1 comment

Comments

@klhhhhh
Copy link

klhhhhh commented Nov 11, 2024

Describe the bug
Megatron-LM doesn't compatible with transformer-engine 1.13.

in transformer-engine:

https://github.com/NVIDIA/TransformerEngine/blob/2643ba1df43397cc84c9da5fe719a66d87ad9a0a/transformer_engine/pytorch/module/layernorm.py#L62-L70

new parameter normalized_shape was declared, but in Megatron-LM:

instance = te.pytorch.LayerNorm(
hidden_size=hidden_size,
eps=eps,
sequence_parallel=config.sequence_parallel,
zero_centered_gamma=config.layernorm_zero_centered_gamma,
**_get_extra_te_kwargs(config),
)

the new parameter normalized_shape is missing.

To Reproduce
When directly installing transformer-engine with

pip install git+https://github.com/NVIDIA/TransformerEngine.git@stable

transformer engine version will be 1.13, and when you run the scripts in examples, the error will appear.

Environment (please complete the following information):

Fix right now:
install transformer-engine with:

pip install git+https://github.com/NVIDIA/TransformerEngine.git@release_v1.12
@timmoon10
Copy link
Contributor

Thanks for reporting. This regression was introduced in NVIDIA/TransformerEngine#1033 and it should be fixed with NVIDIA/TransformerEngine#1329. Hopefully the integration test in that PR will help catch these kinds of errors in the future.

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

No branches or pull requests

2 participants