Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable remat checkpoints to host instead of TPU memory #643

Merged
merged 6 commits into from
Aug 14, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add maxtext example in code comment
  • Loading branch information
samos123 committed Aug 13, 2024
commit cf79c8a9224dd2fc77efdf2585728f385b8c4ba1
5 changes: 4 additions & 1 deletion axlearn/common/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -3904,7 +3904,10 @@ def build_remat_spec(
stack_cfg: A transformer config.
self_attention: Checkpoint self attention layer activations if true.
feed_forward: Checkpoint feed-forward layer activations if true.
offload_dst: Destination of remat checkptoing offloading.
offload_dst: Destination of remat checkptoing offloading. Relevant Maxtext example:
https://github.com/google/maxtext/blob/ebd39aa64d670fa13a313b6f776e01ad9e450321/MaxText/layers/models.py#L230.


samos123 marked this conversation as resolved.
Show resolved Hide resolved

Returns:
None (if no rematerialization is needed) or a RematSpec.
Expand Down