Skip to content

Revert transformers autocast_smart_context_manager#2265

Merged
regisss merged 2 commits into
mainfrom
revert-smart-autocast-manager
Sep 17, 2025
Merged

Revert transformers autocast_smart_context_manager#2265
regisss merged 2 commits into
mainfrom
revert-smart-autocast-manager

Conversation

@IlyasMoutawwakil
Copy link
Copy Markdown
Member

What does this PR do?

Seems like we still can't remove this autocast manager for now, there a few edge cases where the performance seems to be degraded when this manager is not overwritten with custom hpu logic, however this shouldn't be the cases because transformers no longer handles autocast with this function but rather rely on accelerate with forward wrapper.

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.

@regisss regisss merged commit 57d7b18 into main Sep 17, 2025
6 of 9 checks passed
@regisss regisss deleted the revert-smart-autocast-manager branch September 17, 2025 15:39
@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#700)

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#700)

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