🚨 [v5] Remove deprecated cache classes#41406
Open
gante wants to merge 1 commit intohuggingface:mainfrom
Open
Conversation
|
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. |
Member
|
Oh damn, I had #41378 as well doing the same, so I will revert the classes and just remove support for legacy in order to wait for peft! Thanks for letting me know! |
BenjaminBossan
added a commit
to BenjaminBossan/transformers
that referenced
this pull request
Oct 27, 2025
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.
5 tasks
BenjaminBossan
added a commit
that referenced
this pull request
Nov 27, 2025
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.
SangbumChoi
pushed a commit
to SangbumChoi/transformers
that referenced
this pull request
Jan 23, 2026
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
🚨🚨🚨 DO NOT MERGE 🚨🚨🚨
Merging this PR will break
from transformers import Traineron the latest PEFT release (0.17.1), which in turn breaks ourmake fixupwhen PEFT is installed. PEFTmainalready sorted this issue (here), but it is yet unreleased as of 7-oct-2025.cc @BenjaminBossan (chatted on slack -- when
transformershas a concrete timeline for v5, we can best evaluate an adequate timing for a PEFT release)cc @Cyrilvallez FYI
This PR removes the deprecated cache classes in
cache_utils.py.