-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Add BLIP-2 #21441
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 BLIP-2 #21441
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
sgugger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. The general design with the auto-model for the LM work for me, since BLIP-2 supports multiple LMs.
|
@sgugger all comments are addressed, feel free to approve :) |
sgugger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for all your work on this!
add `accelerate` support for `blip2`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this great addition!
accelerate support has been added in NielsRogge#54 - generate + BLIP2 with accelerate is having some issues right now in multi-gpu setting, let's address this in a follow up PR and merge this PR to at least un-lock int8 loading of BLIP2 models (for instance nielsr/blip2-flan-t5-xl can be loaded on a Gcolab (I managed to run it on a NVIDIAT4 16GB))
|
@NielsRogge Curious, what is the timeline for this to make it into a stable release version? |
|
Usually there's a Transformers release once every 1 to 2 months, so at the very least in March. |
|
Hi, thanks for the great work! I'm running into problems trying to use this in the multigpu setting and saw this was mentioned by @younesbelkada earlier -- is there an issue to follow for that? (Specifically, in line 2765 of transformers->generation->utils.py, the devices don't match -- I'm also getting a weirder error where it causes a CUDA illegal memory access error for any model used downstream of it on GPU 0, even when it's given no GPU memory on GPU 0 in max_memory. (This doesn't occur for the original BLIP2, which I'm trying to migrate from.) |
|
Same problem here @sachit-menon |
|
Hi @sachit-menon @xszheng2020 |
|
Hi, @younesbelkada |
What does this PR do?
This PR adds BLIP-2 to the library.
To do:
eos_token_id!AutoModelForSeq2SeqLMonce designed gets approvedcc @younesbelkada