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] Why is the initialization of the router and experts different in the MoE part? #1302

Open
mxymxy77 opened this issue Nov 27, 2024 · 1 comment

Comments

@mxymxy77
Copy link

Why is the initialization of the router and experts different in the MoE part?
The weight parameters of the router are initialized in FP32, while the expert weights are initialized in param_dtype (assuming mixed precision training, the expert weights are initialized in BF16).
Reference link:

  1. router init:https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/transformer/moe/router.py#L43
  2. experts init:https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/transformer/moe/experts.py#L145
@lk137095576
Copy link

same question

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