Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions paxml/tasks/lm/model_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,12 @@ def task(self) -> pax_fiddle.Config[tasks_lib.SingleTask]:
self.CHECKPOINT_POLICY)
else:
model_p.lm_tpl.stacked_transformer_tpl = stacked_transformer_tpl
if (self.CHECKPOINT_POLICY ==
layers.AutodiffCheckpointType.OFFLOAD_DOT_WITH_NO_BATCH_DIM):
model_p.lm_tpl.stacked_transformer_tpl.checkpoint_policy = (
self.CHECKPOINT_POLICY)
model_p.lm_tpl.stacked_transformer_tpl.remat = True


# Enable bf16.
model_p.fprop_dtype = self.FPROP_DTYPE
Expand Down