Skip to content

Revert prepare_model to keep FSDP upcast disablement#2270

Merged
regisss merged 1 commit into
mainfrom
revert-prepare-model
Sep 19, 2025
Merged

Revert prepare_model to keep FSDP upcast disablement#2270
regisss merged 1 commit into
mainfrom
revert-prepare-model

Conversation

@IlyasMoutawwakil
Copy link
Copy Markdown
Member

@IlyasMoutawwakil IlyasMoutawwakil commented Sep 19, 2025

What does this PR do?

starting from transformers 4.43 and accelerate 0.33, upcasting was added for FSDP in mixed precision huggingface/accelerate#2674 making FSDP training more stable by upcasting the model if it is both in half precision and uses mixed precision training, but was kept disabled in optimum-habana temporarily due to torch.compile failure cases.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

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

Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM

@regisss regisss merged commit d48c10b into main Sep 19, 2025
5 of 9 checks passed
@regisss regisss deleted the revert-prepare-model branch September 19, 2025 20:04
@IlyasMoutawwakil IlyasMoutawwakil mentioned this pull request Sep 22, 2025
3 tasks
@astachowiczhabana
Copy link
Copy Markdown
Collaborator

LGTM

gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Oct 15, 2025
… (huggingface#702)

Co-authored-by: Ilyas Moutawwakil <57442720+IlyasMoutawwakil@users.noreply.github.com>
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Nov 6, 2025
… (huggingface#702)

Co-authored-by: Ilyas Moutawwakil <57442720+IlyasMoutawwakil@users.noreply.github.com>
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.

4 participants