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

fix #136. Updated eole/bin/model/average_models.py to work with safetensors model format. #137

Merged
merged 14 commits into from
Oct 30, 2024

Conversation

isanvicente
Copy link
Contributor

fix proposal for #136.
Updated eole/bin/model/average_models.py to work with safetensors model format.
The script now takes as input/ouput checkpoint directory paths instead of .pt model files.
I've used model_saver package functions (eole/models/model_saver.py) to load checkpoints.

I tested it with a few models and results seem as expected, but feel free to check if code is correct.

@isanvicente isanvicente changed the title updated eole/bin/model/average_models.py to work with safetensors model format. fix #136. Updated eole/bin/model/average_models.py to work with safetensors model format. Oct 28, 2024
Copy link
Contributor

@francoishernandez francoishernandez 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! Can you just remove the unnecessary comments (mainly referring to the previous implementation)?
Thanks!

Note: agreed on the "maybe better implemented using model_saver classes", we need to create some subclass other than TrainingModelSaver for such purposes at some point.

@isanvicente
Copy link
Contributor Author

isanvicente commented Oct 29, 2024

Sure! done. I deleted all comments except for those in the run function. Can delete those as well if you think those aren't needed.

Cheers,

@francoishernandez francoishernandez merged commit 146c8f9 into eole-nlp:main Oct 30, 2024
2 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.

2 participants