Skip to content

Commit

Permalink
fix boolean for reentrant setting (#500)
Browse files Browse the repository at this point in the history
* fix boolean for reentrant setting

* yapf
  • Loading branch information
dakinggg authored Aug 2, 2023
1 parent 2445274 commit 05c6055
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def validate_config(cfg):
"`cfg.model.ffn_config.ffn_type='te_ln_mlp'` to enable layers using fp8 precision."
)

if (cfg.model.get('fc_type', 'torch') == 'te' or 'te' not in cfg.model.get(
'ffn_config', {}).get('ffn_type', 'mptmlp')):
if (cfg.model.get('fc_type', 'torch') == 'te' or
'te' in cfg.model.get('ffn_config', {}).get('ffn_type', 'mptmlp')):
fsdp_config = cfg.get('fsdp_config', None)
act_ckpt = fsdp_config.get('activation_checkpointing', False)
act_ckpt_reentrant = fsdp_config.get(
Expand Down

0 comments on commit 05c6055

Please sign in to comment.