-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix import error from deprecation in transformers #1415
Conversation
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.
Thanks so much @lewtun !
It says:
ImportError: cannot import name 'TopKLogitsWarper' from 'transformers.generation_utils' (/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/transformers/generation_utils.py)
Do we need to guard the import for transformers main that have TopKLogitsWarper
?
Both logits processors are present as far back as our min required The new import path should work across all of them I think! |
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. |
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.
Thanks so much @lewtun ! 🚀
* don't do mp casting * don't use `prepare_for_kbit` when using fsdp+qlora or dsz3+qlora * changes to enable fsdp+qlora and dsz3+qlora * revert * Update sft_trainer.py * quality * fix deprecation using changes from PR #1415 * fixes * quality * Update trl/trainer/sft_trainer.py Co-authored-by: Younes Belkada <[email protected]> * quality * relaunch tests --------- Co-authored-by: Younes Belkada <[email protected]>
I wonder the statement is |
* don't do mp casting * don't use `prepare_for_kbit` when using fsdp+qlora or dsz3+qlora * changes to enable fsdp+qlora and dsz3+qlora * revert * Update sft_trainer.py * quality * fix deprecation using changes from PR #1415 * fixes * quality * Update trl/trainer/sft_trainer.py Co-authored-by: Younes Belkada <[email protected]> * quality * relaunch tests --------- Co-authored-by: Younes Belkada <[email protected]>
* Fix import error from deprecation in transformers * Fix import path
* don't do mp casting * don't use `prepare_for_kbit` when using fsdp+qlora or dsz3+qlora * changes to enable fsdp+qlora and dsz3+qlora * revert * Update sft_trainer.py * quality * fix deprecation using changes from PR huggingface#1415 * fixes * quality * Update trl/trainer/sft_trainer.py Co-authored-by: Younes Belkada <[email protected]> * quality * relaunch tests --------- Co-authored-by: Younes Belkada <[email protected]>
* Fix import error from deprecation in transformers * Fix import path
* don't do mp casting * don't use `prepare_for_kbit` when using fsdp+qlora or dsz3+qlora * changes to enable fsdp+qlora and dsz3+qlora * revert * Update sft_trainer.py * quality * fix deprecation using changes from PR huggingface#1415 * fixes * quality * Update trl/trainer/sft_trainer.py Co-authored-by: Younes Belkada <[email protected]> * quality * relaunch tests --------- Co-authored-by: Younes Belkada <[email protected]>
The
top_k_top_p_filtering()
method will be deprecated (i.e. removed) fromtransformers >= 4.39
and the simplest solution is to copy the method directly intotrl
Closes #1409