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

[Blip2] Add int8 support for blip2-flan-t5-xxl #21574

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

younesbelkada
Copy link
Contributor

What does this PR do?

Similarly as #20683 - currently the largest blip2 + flan-t5-xxl fails to run in int8 since we forgot to add the patch presented in the aforementioned PR

This PR adds the _keep_in_fp32_modules support for Blip2 so that users can run this model in fp16 and int8 with no performance degradation as the original model trained in bf16

cc @sgugger @NielsRogge

@younesbelkada younesbelkada requested review from sgugger and NielsRogge and removed request for sgugger February 10, 2023 21:11
@younesbelkada younesbelkada changed the title [Blip2] Add int8 support [Blip2] Add int8 support for blip2-flan-t5-xxl Feb 10, 2023
Copy link
Contributor

@NielsRogge NielsRogge left a comment

Choose a reason for hiding this comment

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

LGTM

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Feb 10, 2023

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

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!

@younesbelkada younesbelkada merged commit 75a208e into huggingface:main Feb 10, 2023
@younesbelkada younesbelkada mentioned this pull request Feb 13, 2023
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