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

[gpt2-int8] Add gpt2-xl int8 test #24543

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

younesbelkada
Copy link
Contributor

@younesbelkada younesbelkada commented Jun 28, 2023

What does this PR do?

Addresses: #24504 (comment)

Currently the test is failing because of the following reason (that I need to explore and as discussed offline @sgugger):
1- If a buffer is defined as persistent=False in the modeling file
2- and not present in the state_dict
The dispatch_model seems to fail as I face device mismatch issue. I think a potential fix needs to be addressed on accelerate
Facing the same issue for blip2 int8 tests, as the cos_cached and sin_cached are defined as buffers with persistent=False and not present in the state dict.

Seems that the issue does not happen before 5791d949ff93733c102461ba89c8310745a3fa79 on accelerate

cc @sgugger

EDIT: huggingface/accelerate#1660 should fix the issue I am facing

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 28, 2023

The documentation is not available anymore as the PR was closed or merged.

@younesbelkada
Copy link
Contributor Author

Can confirm all the tests pass now (with the accelerate PR mentioned above)

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks for adding this test!

@younesbelkada younesbelkada merged commit 903b97d into huggingface:main Jun 28, 2023
@younesbelkada younesbelkada deleted the add-gpt2-int8-test branch June 28, 2023 16:02
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