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

Fixing a bug where a wrong parameter name is used for the offload_folder #257

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

toncho11
Copy link
Contributor

@toncho11 toncho11 commented Apr 3, 2023

It should be "offload_folder" instead of "offload_dir".

Fixes huggingface/accelerate#1281

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Nice catch! In transformers indeed offload_folder is used, however in the signature of dispatch_model it is offload_dir that is used. I don't have any strong opinion on that, I will let @pacman100 decide here!

EDIT, I went through the PR you have mentioned, this fix sounds good to me!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 3, 2023

The documentation is not available anymore as the PR was closed or merged.

@toncho11
Copy link
Contributor Author

toncho11 commented Apr 3, 2023

Transformers uses "offload_folder". So peft should use the same name "offload_folder" instead of "offload_dir"?
Otherwise there will be two parameter names - one for Transformers and one for Peft which will problematic as in may case where no error is reported until later.

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Thanks a lot! I am ok with this PR in principle that we should be consistent with the kwargs of transformers' from_pretrained

@younesbelkada younesbelkada requested a review from pacman100 April 3, 2023 16:37
Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

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

Thank you @toncho11 for all the deep dive and a super quick fix! 🚀

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.

Errror even if offload_dir is provided (actually 2 errors)
4 participants