Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Chin Fabian Lim <flim@sg.ibm.com>
  • Loading branch information
fabianlim committed Aug 25, 2024
1 parent 329c4d0 commit a203039
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,16 @@ def get_callbacks_and_ready_for_train(
accelerator is not None
and getattr(accelerator.state, "fsdp_plugin", None) is not None
):
# - use an internal function call to get the no split
# - use an internal function call to get the no split
# module names, which are typically layers
_layers = model._get_no_split_modules('')
accelerator.state.fsdp_plugin.ignored_modules = [
getattr(layer, name)
for name in moe_component_module_names
for name in self._moe_component_module_names
for layer in model.modules()
if layer.__class__.__name__ in _layers
]

FSDP(
model,
ignored_modules=ignored_modules,
)

return callbacks


Expand Down

0 comments on commit a203039

Please sign in to comment.