Skip to content
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

Add the inline_inbuilt_nn_modules option #1617

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

chaojun-zhang
Copy link
Contributor

@chaojun-zhang chaojun-zhang commented Dec 17, 2024

Disabling the inline_inbuilt_nn_modules switch will restore ALBERT-XXL's performance to PyTorch 2.4 levels

What does this PR do?

Fixes # (issue)

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?

@chaojun-zhang chaojun-zhang marked this pull request as draft December 17, 2024 01:20
@chaojun-zhang chaojun-zhang marked this pull request as ready for review December 17, 2024 01:25
Copy link
Collaborator

@ssarkar2 ssarkar2 left a comment

Choose a reason for hiding this comment

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

Adding notes for my understanding

without this change:
torch._dynamo.config.inline_inbuilt_nn_modules = True
https://github.com/pytorch/pytorch/blob/main/torch/_dynamo/config.py#L412C33-L412C42

with this change we give an option to set it to True or False. We set it to false in case of albert

@libinta libinta added the run-test Run CI for PRs from external contributors label Jan 22, 2025
@ssarkar2
Copy link
Collaborator

ssarkar2 commented Feb 5, 2025

@chaojun-zhang could you please resolve conflict. We'll try to merge it in for 1.20

…ing to performance degradation in certain models(e.g. ALBERT_XXL). A configuration option has been introduced to turn off this behavior
@chaojun-zhang
Copy link
Contributor Author

@chaojun-zhang could you please resolve conflict. We'll try to merge it in for 1.20

Updated

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

@regisss
Copy link
Collaborator

regisss commented Feb 5, 2025

@chaojun-zhang One more merge conflict to solve since I just merged #1619

@ssarkar2
Copy link
Collaborator

ssarkar2 commented Feb 5, 2025

@chaojun-zhang One more merge conflict to solve since I just merged #1619

Libin pushed a commit to resolve conflicts

Copy link

github-actions bot commented Feb 6, 2025

The code quality check failed, please run make style.

Copy link
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 5c7ea15 into huggingface:main Feb 6, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-test Run CI for PRs from external contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants