Closed arxyzan closed 1 month ago
We can look at supporting this but it would be very limited to just save_model and specifically would be incompatible with other areas of the library such as save and load state.
This is because we’re consistent across transformers and accelerate in regards to naming conventions.
Dear @muellerzr, thanks for the fast response.
You're right and I do know that it's because of the naming conventions that there would be no need for such feature.
But if someone actually wants to use this method in their own library (e.g, an in-house library in the company that has different naming conventions) they would need to either reimplement the whole checkpoint sharding and names mapping themselves or implement such feature in a custom fork of accelerate
to be able to save weights under different names than the ones in Transformers.
But overall, if you think this would be a limited and over-specific feature, I don't mind closing this issue.🤗
Hello dear 🤗Accelerate team!
As far as I know, there is no option for defining any other weights file name other than the default
pytorch_model.bin
ormodel.safetensors
files when usingaccelerator.save_model()
. Is it possible to add an argument to this method to accept other filenames?Note: According to the current procedures in the code, the filenames must either end with
.bin
or.safetensors
.This feature would help people who want to migrate their own code bases or libraries to 🤗Accelerate.