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

ModelCheckpoint callback saves the encoder weights even though they are frozen #723

Closed
nkaenzig opened this issue Dec 5, 2024 · 0 comments · Fixed by #724
Closed

ModelCheckpoint callback saves the encoder weights even though they are frozen #723

nkaenzig opened this issue Dec 5, 2024 · 0 comments · Fixed by #724
Assignees

Comments

@nkaenzig
Copy link
Collaborator

nkaenzig commented Dec 5, 2024

During evals, we currently use lightning.pytorch.callbacks.ModelCheckpoint to save the best model checkpoints during fit. While we only fit the decoder / head on the downstream tasks, the encoder usually remains frozen, so it's not necessary to include it into the saved checkpoints.

Furthermore, for big encoders (e.g. ViT-G), this becomes a major bottleneck in terms of runtime, taking up to 30 seconds to save the checkpoint, while the GPU remains idle:
Image

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 a pull request may close this issue.

1 participant