Skip to content

Fix peft constructors#45622

Merged
Cyrilvallez merged 1 commit intomainfrom
fix-peft
Apr 27, 2026
Merged

Fix peft constructors#45622
Cyrilvallez merged 1 commit intomainfrom
fix-peft

Conversation

@Cyrilvallez
Copy link
Copy Markdown
Member

What does this PR do?

As per the title. Fixes #45448 (comment)
cc @BenjaminBossan

@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.

@BenjaminBossan
Copy link
Copy Markdown
Member

Thanks for working on a fix, this resolves the failing transformers test. In PEFT, the corresponding tests are still failing, but I will port the changes from here over to PEFT and that should do the trick.

Is there any way we can make all of this more robust? It's not the first time things break. I assume this is because we rely on Transformers-internal implementation details. Is there a public, more stable API that we can use instead?

@Cyrilvallez
Copy link
Copy Markdown
Member Author

Those are indeed relying on internals, which is why it wasn't detected! If you can add a simple fast test performing one of those conversions, it would catch any regresions though!

@Cyrilvallez Cyrilvallez merged commit 545a591 into main Apr 27, 2026
30 checks passed
@Cyrilvallez Cyrilvallez deleted the fix-peft branch April 27, 2026 07:22
@BenjaminBossan
Copy link
Copy Markdown
Member

@Cyrilvallez I could convert test_mixtral_lora_conversion to a normal test instead of a slow test. It uses a tiny model (7.6 MB). Locally, with the model cached, it finishes in 1.5 sec. Would that be all right?

@Cyrilvallez
Copy link
Copy Markdown
Member Author

Yes 100%

ArthurZucker pushed a commit that referenced this pull request Apr 28, 2026
BenjaminBossan added a commit to huggingface/peft that referenced this pull request Apr 29, 2026
After a change in
huggingface/transformers#45448, weight
conversion tests started failing. Transformers provided a fix in
huggingface/transformers#45622 but it needs to
be ported to PEFT too.

This PR, together with the Transformers fix, resolves the issue.
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