Skip to content

Conversation

@Nzteb
Copy link
Contributor

@Nzteb Nzteb commented Aug 22, 2020

Functionality to freeze embeddings during training as discussed with Adrian. A file containing ids for the entities or relations can be loaded, these embeddings are held constant during training. What is an open question is how the save/resume functionality for frozen models should be. Right now, the frozen and not-frozen parameters are saved. This requires loading functionality for a frozen model. An alternative would be to save the model as a standard model e.g. by unfreezing it first. This would, however, loose the optimizer state and a training process where parameters are held constant could not be continued.

@rgemulla
Copy link
Member

@adrian, do you want to do the initial review?

@rgemulla
Copy link
Member

rgemulla commented Aug 24, 2020

As for loading, I think the model should be stored as is (including the frozen parameters). Not sure what kind of "loading functionality" is required for this, though. Only the embedder is affected, right?

Copy link
Collaborator

@AdrianKs AdrianKs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just some small points.
We should check if resuming still works correctly with frozen embeddings. Also we need to extend the package functionality (maybe not in this PR) to handle models with frozen embeddings.

@Nzteb Nzteb force-pushed the freeze_embeddings branch 3 times, most recently from 48975fc to 57a651e Compare September 1, 2020 13:40
@Nzteb Nzteb force-pushed the freeze_embeddings branch from 57a651e to 2317dbd Compare September 1, 2020 13:51
@Nzteb
Copy link
Contributor Author

Nzteb commented Sep 1, 2020

As it is now, models are saved with the frozen parameters and resuming the training works.

@AdrianKs AdrianKs mentioned this pull request May 12, 2021
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.

3 participants