🚨 [v5][PEFT] Bump min version requirement of PEFT to 0.18.0#41889
🚨 [v5][PEFT] Bump min version requirement of PEFT to 0.18.0#41889BenjaminBossan merged 12 commits intohuggingface:mainfrom
Conversation
PEFT is an optional dependency of transformers with a min version of 0.5.0. However, starting with transformers v5, older PEFT versions will not work anymore (see huggingface#41406). The minimum PEFT version will be 0.18.0. This PR updates the PEFT integration to require PEFT 0.18.0. This allows us to eliminate some obsolete checks and tests that were required for backwards compatibility. Note: PEFT 0.18.0 is not yet released, so **don't merge** this PR yet. However, we will release it once we have tested it with the transformers v5 release candidate, before the transformers v5 released.
| """ | ||
| check_peft_version(min_version=MIN_PEFT_VERSION) | ||
|
|
||
| if not is_peft_available(): |
There was a problem hiding this comment.
I deleted this check because check_peft_version already checks if PEFT is available, meaning it is redundant. This change is not strictly related to the min version bump.
|
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. |
githubnemo
left a comment
There was a problem hiding this comment.
Looks good from my side
|
This PR should be included in the v5 release. Not sure who can best review it, ping @ydshieh. The failing tests seem to be unrelated to this PR. |
ArthurZucker
left a comment
There was a problem hiding this comment.
Happy to merge, wondering why we don't update the dependency_table and setup.py ? 🤗
PEFT is an optional dependency, as such there is no entry there. |
You can still put it in those files. Most of them are optional dependency, even The benefits is that an user could do something like But it's just minor, up to you. |
|
@ydshieh I didn't know that, I added PEFT to that list. The failing CI looks unrelated. |
|
@ArthurZucker I updated the PR, could you please give a final review? |
|
Merged the latest main, the failing test looks unrelated to this PR. |
…ace#41889) PEFT is an optional dependency of transformers with a min version of 0.5.0. However, starting with transformers v5, older PEFT versions will not work anymore (see huggingface#41406). The minimum PEFT version will be 0.18.0. This PR updates the PEFT integration to require PEFT 0.18.0. This allows us to eliminate some obsolete checks and tests that were required for backwards compatibility.
….x compat peft 0.17.0 imports HybridCache from transformers, which was removed in transformers 5.x. peft>=0.18.0 drops this import and is required by transformers v5 (huggingface/transformers#41889). Made-with: Cursor
….x compat peft 0.17.0 imports HybridCache from transformers, which was removed in transformers 5.x. peft>=0.18.0 drops this import and is required by transformers v5 (huggingface/transformers#41889).
….x compat peft 0.17.0 imports HybridCache from transformers, which was removed in transformers 5.x. peft>=0.18.0 drops this import and is required by transformers v5 (huggingface/transformers#41889).
What does this PR do?
PEFT is an optional dependency of transformers with a min version of 0.5.0. However, starting with transformers v5, older PEFT versions will not work anymore (see #41406). The minimum PEFT version will be 0.18.0.
This PR updates the PEFT integration to require PEFT 0.18.0. This allows us to eliminate some obsolete checks and tests that were required for backwards compatibility.
Note:
ImportErrorwithout indication what's wrong. Therefore, I would highly recommend to merge this before the v5 release.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.