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

peft_module_casting_to_bf16 util method, append_concat_token flag, remove callback PeftSavingCallback #1110

Merged
merged 4 commits into from
Dec 19, 2023

Conversation

pacman100
Copy link
Contributor

@pacman100 pacman100 commented Dec 19, 2023

What does this PR do?

  1. Inline with QLoRA code when using bf16 here, added peft_module_casting_to_bf16.
  2. Added append_concat_token flag so that datasets which already have eos_token at the end of each sample can skip appending the eos/concat token
  3. Removes the callback PeftSavingCallback and bumps the minimum transformers version to 4.31.0 which handles this by default. The current PeftSavingCallback would fail when using PEFT+DeepSpeed and the trainer handles this properly.

@pacman100
Copy link
Contributor Author

pacman100 commented Dec 19, 2023

cc @lvwerra and @younesbelkada

@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.

@pacman100 pacman100 changed the title peft_module_casting_to_bf16 util method and append_concat_token flag peft_module_casting_to_bf16 util method, append_concat_token flag, remove callback PeftSavingCallback Dec 19, 2023
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 !
OK for me to bump transformers version to 4.31

@younesbelkada younesbelkada merged commit f100ca3 into huggingface:main Dec 19, 2023
9 checks passed
@pacman100 pacman100 deleted the smangrul/trl-fixes branch December 20, 2023 11:02
@younesbelkada younesbelkada mentioned this pull request Jan 22, 2024
lapp0 pushed a commit to lapp0/trl that referenced this pull request May 10, 2024
…, remove callback `PeftSavingCallback` (huggingface#1110)

* SFT Trainer enhancements

* remove the callback `PeftSavingCallback`

* bump the version of transformers to `4.31.0`

* remove `PeftSavingCallback` from all places.
@BenjaminBossan BenjaminBossan mentioned this pull request Sep 13, 2024
5 tasks
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.

4 participants