Skip to content

Commit

Permalink
make sure to enable fsdp activation checkpointing
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Mar 30, 2024
1 parent ad47dbf commit c4ad7a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/axolotl/utils/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ def calc_sample_packing_eff_est(estimates: List[float]):

def setup_fsdp_envs(cfg):
os.environ["ACCELERATE_USE_FSDP"] = "true"
if cfg.fsdp_config.fsdp_activation_checkpointing:
os.environ["FSDP_ACTIVATION_CHECKPOINTING"] = "true"
if cfg.fsdp_config.fsdp_offload_params:
os.environ["FSDP_OFFLOAD_PARAMS"] = "true"
if cfg.fsdp_config.fsdp_sync_module_states:
Expand Down

0 comments on commit c4ad7a8

Please sign in to comment.