Skip to content

🚨 [v5] Remove deprecated cache classes#41406

Open
gante wants to merge 1 commit intohuggingface:mainfrom
gante:rm_deprecated_cache_classes
Open

🚨 [v5] Remove deprecated cache classes#41406
gante wants to merge 1 commit intohuggingface:mainfrom
gante:rm_deprecated_cache_classes

Conversation

@gante
Copy link
Copy Markdown
Contributor

@gante gante commented Oct 7, 2025

What does this PR do?

🚨🚨🚨 DO NOT MERGE 🚨🚨🚨

Merging this PR will break from transformers import Trainer on the latest PEFT release (0.17.1), which in turn breaks our make fixup when PEFT is installed. PEFT main already sorted this issue (here), but it is yet unreleased as of 7-oct-2025.

cc @BenjaminBossan (chatted on slack -- when transformers has 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.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

@Cyrilvallez
Copy link
Copy Markdown
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.
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.
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.

3 participants