Skip to content

Commit

Permalink
pre-shard with pjit
Browse files Browse the repository at this point in the history
  • Loading branch information
fattorib committed Jun 6, 2023
1 parent 496adf4 commit fc7c8b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ def compute_tokens_seen(absolute_step, max_context):
import gc
gc.collect()

params = pjit(lambda x:x, out_axis_resources=param_spec)(params)
opt_state = pjit(lambda x:x, out_axis_resources=opt_state_spec)(opt_state)


else:
raise NotImplementedError(
"Checkpointing not currently implemented for GPU."
Expand Down

0 comments on commit fc7c8b7

Please sign in to comment.