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

[QUESTION] is there any restriction to use allgather with moe_expert_capacity_factor? #1277

Open
Louis-J opened this issue Nov 7, 2024 · 0 comments

Comments

@Louis-J
Copy link

Louis-J commented Nov 7, 2024

Your question
Ask a clear and concise question about Megatron-LM.

There is an assert in megatron/core/transformer/transformer_config.py: 401

        if self.moe_expert_capacity_factor is not None:
           ** if self.moe_token_dispatcher_type not in ["alltoall", "alltoall_seq"]:**
                raise ValueError(
                    'moe_expert_capacity_factor only works with alltoall token dispatcher'
                )

The code to process with capacity_factor and pad in router.py seems it won't change the output tensor's dimsize. And I don't see any different process to do with capacity_factor in token_dispatcher.py. So why should I use only 'alltoall' or 'alltoall_seq' with moe_expert_capacity_factor?

thanks for reply.

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

1 participant