Skip to content

Commit

Permalink
Pass accmulate_train_batch_on_tokens through to composer (#1595)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg authored Oct 16, 2024
1 parent 13e0a6d commit fe5890e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llmfoundry/command_utils/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ def train(cfg: DictConfig) -> Trainer:
profiler=profiler,
compile_config=compile_config,
spin_dataloaders=train_cfg.spin_dataloaders,
accumulate_train_batch_on_tokens=train_cfg.
accumulate_train_batch_on_tokens,
)

_sort_callbacks(trainer)
Expand Down
1 change: 1 addition & 0 deletions llmfoundry/utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class TrainConfig:
dist_timeout: Union[int, float] = 600.0
fsdp_config: Optional[dict[str, Any]] = None
tp_config: Optional[dict[str, Any]] = None
accumulate_train_batch_on_tokens: bool = False

# Evaluation parameters
eval_interval: Union[int, str] = 1
Expand Down

0 comments on commit fe5890e

Please sign in to comment.