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

in peft finetune, only the trainable parameters need to be saved #27825

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

sywangyi
Copy link
Contributor

@sywangyi sywangyi commented Dec 4, 2023

to reduce the storage size and also save the time of checkpoint saving while using deepspeed for training

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@sywangyi
Copy link
Contributor Author

sywangyi commented Dec 4, 2023

@younesbelkada @pacman100 please help review the PR.

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.

LGTM, what do you think @pacman100 ?

@younesbelkada
Copy link
Contributor

@sywangyi can you try to merge your branch with upstream main? Perhaps it will fix the current failing CI

@sywangyi
Copy link
Contributor Author

sywangyi commented Dec 5, 2023

@younesbelkada I have rebased to main. the code quality check failure is not related with the PR

@younesbelkada
Copy link
Contributor

@sywangyi can you try to re-run make fixup with pip uninstall black && pip install -U ruff==0.1.5 ?

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.

In principle this looks good! Would like to hear @pacman100 's thoughts before a core maintainer approval

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@sywangyi
Copy link
Contributor Author

@pacman100 could you help review the PR? Thanks.

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 @sywangyi for enabling only the trainable parameters to be saved during intermediate checkpointing when using PEFT with DeepSpeed, LGTM! 🚀

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for enabling this!

to reduce the storage size and also save the time of checkpoint saving while using deepspeed for training

Signed-off-by: Wang, Yi <[email protected]>
@amyeroberts amyeroberts merged commit e6cb8e0 into huggingface:main Dec 18, 2023
21 checks passed
staghado pushed a commit to staghado/transformers that referenced this pull request Jan 15, 2024
…gingface#27825)

to reduce the storage size and also save the time of checkpoint saving while using deepspeed for training

Signed-off-by: Wang, Yi <[email protected]>
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.

5 participants