FIX Prefix tuning after transformers PR 38635#2662
Merged
BenjaminBossan merged 2 commits intohuggingface:mainfrom Jul 22, 2025
Merged
Conversation
Due to huggingface/transformers#38635, several tests involving prefix tuning broke: https://github.com/huggingface/peft/actions/runs/16417140904/job/46385751329 This PR fixes this by resoling two issues: 1. The _supports_cache_class attribute was removed, we can now assume that it is True if the attribute does not exist. 2. We had special handling of past_key_values for GPTBigCodeForCausalLM which is no longer required (nor valid) after that PR, so it is removed depending on the transformers version.
|
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. |
BenjaminBossan
added a commit
to BenjaminBossan/peft
that referenced
this pull request
Jul 28, 2025
Due to huggingface/transformers#38635, several tests involving prefix tuning broke: https://github.com/huggingface/peft/actions/runs/16417140904/job/46385751329 This PR fixes this by resoling two issues: 1. The _supports_cache_class attribute was removed, we can now assume that it is True if the attribute does not exist. 2. We had special handling of past_key_values for GPTBigCodeForCausalLM which is no longer required (nor valid) after that PR, so it is removed depending on the transformers version.
cyyever
pushed a commit
to cyyever/peft
that referenced
this pull request
Sep 4, 2025
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.
Due to huggingface/transformers#38635, several tests involving prefix tuning broke.
This PR fixes this by resolving two issues:
The
_supports_cache_classattribute was removed, we can now assume that it is True if the attribute does not exist.We had special handling of
past_key_valuesforGPTBigCodeForCausalLMwhich is no longer required (nor valid) after that PR, so it is removed depending on the transformers version.