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(mlp): enhance mlp_layer_fusion #382

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

yingtongxiong
Copy link
Contributor

Motivation

  1. The mlp_layer_fusion config is useful in MoE; therefore, a warning is added to recommend that users set this config to True in the MoE model.
  2. When testing MoE model, the call of delattr in launch.py will raise the AttributeError even though the attribute exists. Therefore, add the delattr method in Config Class.
  3. Refactor the mlp's forward.

Modification

  1. internlm/core/context/parallel_context.py
  2. internlm/initialize/launch.py
  3. internlm/model/modules/mlp.py

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.

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.

2 participants