Transformers 5.24 changes model signatures before retiring old cache keywords
Hugging Face keeps deprecated cache keywords working temporarily, but wrappers that inspect model arguments face an immediate change. PEFT 0.22.0 already includes the compatibility fix.
In this article
Quick answers
Do the old cache arguments stop working in 5.24.0?
No. They remain accepted with warnings during the transition. The documented boundaries are 5.40.0 for forward and prepare_inputs_for_generation, and 6.0.0 for generate.
Why can a wrapper need changes immediately?
A check of model.forward's signature now finds cache rather than the old parameter names. A wrapper that searches only for past_key_values can misidentify support.
The practical takeaway
Check both how an application passes cached state and how it detects model support. Keyword compatibility does not preserve the old inspected signature.
A compatibility window with an immediate exception
Hugging Face Transformers 5.24.0 still accepts deprecated cache keywords, but software that inspects a model's arguments sees the new name immediately. That distinction matters for developers maintaining wrappers around AI models: a call can remain supported while the wrapper's method of detecting support needs changing.
The November 21 release brings the change into the published Python package. Transformers supplies model implementations used for inference and training. Its cache migration is especially relevant to applications that manage generation state directly or use integrations that inspect model interfaces.

What the cache does
When a language model generates text one token at a time, it repeatedly needs information about preceding tokens. A key-value cache retains intermediate calculations so the model can reuse them. Hugging Face's documentation describes several strategies, including a cache that grows during generation and one that reserves a fixed size.
The naming change gives that state one label: cache replaces past_key_values and cache_params in the library's model interfaces and outputs. The older split reflected different model architectures; hybrid models could encounter both names. Choosing a cache strategy remains a separate decision from changing the argument name.
How a working call can fail a support check
Consider a hypothetical application that offers several models through one wrapper. Before passing cached state, the wrapper examines model.forward, the model's computation method, and searches its declared parameters for past_key_values. Assume that this exact name is its only test of cache support.
On the new interface, that search misses cache. Depending on the wrapper's logic, it could refuse the operation or choose a different path before it ever calls the model. Accepting an old keyword at call time cannot repair a decision already made from the parameter list. This is a constructed explanation, not a failure we reproduced.
The distinction appears in Hugging Face's own integration work. A TRL tracking issue opened November 13 describes a prefix-tuning path through older PEFT code that checked the old name and failed. It also reports that TRL's broader suite passed against the referenced development commit. That is evidence of a specific integration boundary, not universal breakage.
PEFT's reported failure already has a fix
The same issue received a material update on November 19: a maintainer reported that PEFT 0.22.0 had shipped with support for cache. That release's changelog includes the compatibility fix. The outstanding item described in the comment was additional RewardTrainer prefix-tuning test coverage.
Transformers 5.24.0's tagged adapter-integration code sets its minimum PEFT version to 0.22.0 and checks that minimum when adapters are used. For an application using this integration, the two installed versions belong in the same upgrade review. The earlier error report should not be read as proof that the current compatible pair remains broken.
The migration has two version boundaries
The release notes retain old keywords, with warnings, until 5.40.0 for forward and prepare_inputs_for_generation. For generate, the boundary is 6.0.0. These are software versions, not announced calendar deadlines. Passing an old keyword together with cache raises ValueError, so adding the new name while retaining the old one is not a valid migration.
Developers maintaining custom model code also need to inspect their cache implementation. Hugging Face says overridden Cache.update methods should accept the additional kwargs argument. Renaming a caller's keyword alone does not cover that separate interface change.
Who can install it
Version 5.24.0 is available on PyPI under Apache 2.0. Its package metadata requires Python 3.11 or later; the installation guidance lists PyTorch 2.6 or later. This is a downloadable library release, with software dependencies rather than a subscription rollout.
For teams using PEFT adapters, checking the installed dependency and exercising the actual adapter path is more informative than treating a successful package installation as compatibility proof. Our reporting establishes the documented requirements and fix history, not the outcome for a particular application.
Sources & method
AI-assisted reporting from release notes, package metadata, implementation code and maintainer discussions. The workflow example is hypothetical; AI Toolcast did not install these releases or run compatibility tests.
- Hugging Face: Transformers v5.24.0 release notesPublished November 21, 2026
- PyPI: Transformers 5.24.0 package and release metadataPublished November 21, 2026
- Hugging Face: Cache rename implementation and compatibility discussion, PR 50585Published November 13, 2026
- Hugging Face Transformers documentation: Cache strategiesAccessed November 23, 2026
- Hugging Face TRL: Cache rename tracking issue, including November 19 PEFT updatePublished November 13, 2026
- Hugging Face: PEFT v0.22.0 release notesPublished November 19, 2026
- Hugging Face: Transformers v5.24.0 PEFT integration implementationAccessed November 23, 2026
Source pages reviewed November 23, 2026. Analysis and suggested evaluation methods are AI Toolcast’s own.
This AI-assisted article contains no sponsored placement or affiliate links. Maintainer reports are attributed evidence, not AI Toolcast test results.
Found a possible error? How to report a correction.


