8000 Prepare 0.15.1 patch by githubnemo · Pull Request #2459 · huggingface/peft · GitHub
[go: up one dir, main page]

Skip to content

Prepare 0.15.1 patch #2459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

githubnemo
Copy link
Collaborator

This release is a patch release to release a fix for #2450 which might result in loss of modules_to_save when trained with deepspeed ZeRO stage 3.

Only the squashed commit from #2456 and the version bump are included in this PR.

githubnemo and others added 2 commits March 27, 2025 14:19
…e#2456)

`AuxiliaryTrainingWrapper.adapter_state_dict` now utilizes an external state dict for the
computation of the module state dict to avoid problems with DeepSpeed (or FSDP) when dealing
with distributed parameters.

It is not possible to simply wrap everything in `GatheredParameters` context managers since
doing that leads to a deadlock when running on more than one process (reasons unclear).
Since transformers, or more specifically, accelerate already handles state dict fetching
for the whole model, it is more economical to use that state dict and rewrite the methods
that before depended on `state_dict()` calls.

(cherry picked from commit 7279a9f)
This release is a patch release to release a fix for huggingface#2450
which might result in loss of `modules_to_save` when trained with
deepspeed ZerO stage 3.
Copy link
Member
@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

@HuggingFaceDocBuilderDev

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.

@githubnemo githubnemo merged commit c42eb22 into huggingface:patch-release-0.15.1 Mar 27, 2025
14 checks passed
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
0