-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add local saving for whisper largev2 example notebook #163
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
Add local saving for whisper largev2 example notebook #163
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
c5619ba to
5e788b3
Compare
pacman100
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alvanli, Thanks a lot for adding this! 🤗
|
Hey! just implemented this in my flan t5 code! What code would I use to load the model in from the saved checkpoint? |
|
for Whisper, it was something like this |
Thank you! That worked perfectly! |
…ing-whisper-largev2 Add local saving for whisper largev2 example notebook
* adds a hacky peft example * fixes bug due to missing "prepare_model_for_training" * Formatting * adds peft to requirements * Update trl/trainer/ppo_trainer.py Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com> * gpt neo runs * changes requested on the PR * style * updates to prepare_model_for_int8_training PEFT PR huggingface#105 * updates to prepare_model_for_int8_training PEFT PR huggingface#105 * adds missing 8-bit attribute to modeling base * adds lr to example script * adds missing train to trainer * disables caching temporarily while I debug something * debugging issues with unstable training * Fix peft + int8 (huggingface#170) * add fix * another fix * Auto stash before merge of "peft-example" and "origin/peft-example" * adds peft model types to modeling base * reduces memory usage using adapters and no ref model. * adds support for EleutherAI/gpt-neox-20b * example for peft finetune of cm model * removes hacky research code * fixing the rebase and some typos * style * style2 * adds gradient checkpointing to base model * cleans up comments * moves config and other pretrained_model properties to __init__ * make style * added tests * change dependency * Update .github/workflows/tests.yml * fix test * fix style and failing tests * make quality * revert change * rm unneeded change * revert changes * rm changes * rm changes * rm uneeded change * Update trl/models/modeling_base.py * revert uneeded changes * make style * adapt suggestions * fix tests * attempt to fix * fix * fix * add no peft test * revert * remove unneded check * more tests * fix logic * add `save_pretrained` support * fix quality * clean up * clean up * stronger test * refactor comments * make style * attempt to add non-peft tests * remove test runner * format * fix test * move `train` on top * fix peft import * make quality * fixes typo * adds peft example to docs --------- Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com> Co-authored-by: younesbelakda <younesbelkada@gmail.com>
I don't usually directly push the model to hub and I had some trouble with saving the model locally when I relied on the trainer checkpoints in the sample notebook.
Added a callback to save adapter to checkpoints, using the code from here: #96