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

Deprecate recompute_granularity in config #76

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Conversation

NouamaneTazi
Copy link
Member

@NouamaneTazi NouamaneTazi commented Feb 19, 2024

Selective recomputation is handled by flash-attn now so there's no need to keep it in config. We still keep the handy @checkpoint_method decorator if we want to activate recomputation for some method

class MyFancyModule(nn.Module):
    def __init__(self):
        ...
        self.do_checkpoint: bool = True

    @checkpoint_method(attr_name="do_checkpoint")
    def forward(self, x):
        ...

@NouamaneTazi NouamaneTazi merged commit 53c3064 into main Feb 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant