-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add model merging callback #2241
Comments
I'm interested in working on this! |
Nice! Thanks @coding-famer. Feel free to open a PR then and request any help if needed |
@lewtun |
Hi @August-murr , happy to see that you have already worked it out! However I noticed that your implementation only allows merge models in the disk after training, this could be done by user using mergekit directly after training. I think the thing here is to merge the model during the training steps/epochs? |
@coding-famer The callback has an optional parameter called |
Sounds great! |
Feature request
Add a
MergeModelCallback
that merges the reference model with the current policy and optionally pushes the merged checkpoint to the Hub. This could be done on step/epoch end and/or the end of training. Implementation-wise, we could use Arcee'smergekit
lib and include it as an optional dependency: https://github.com/arcee-ai/mergekitMotivation
Various papers show that model merging can non-trivially improve performance, especially if the models belong to the same architecture:
Your contribution
Open to the community!
The text was updated successfully, but these errors were encountered: