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

Replace _expand_mask with _prepare_4d_attention_mask #604

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

denis-ismailaj
Copy link

Fixes #603

Copy link

salesforce-cla bot commented Dec 2, 2023

Thanks for the contribution! Before we can merge this, we need @denis-ismailaj to sign the Salesforce Inc. Contributor License Agreement.

@denis-ismailaj
Copy link
Author

I have signed the CLA

@denis-ismailaj
Copy link
Author

This does raise the dependency requirement of LAVIS to be transformers>=4.35 though.
If that is an issue, _expand_mask could be copied instead.

@coffeeexistence
Copy link

Updating transformers gives me the following error:

line 24, in __init__
    assert transformers_version < version.parse("4.27"), "BLIP models are not compatible with transformers>=4.27, run pip install transformers==4.25 to downgrade"

@coffeeexistence
Copy link

It's worth noting that both modeling_llama.py and modeling_opt.py in this repo have copied _expand_mask from transformers. Perhaps there is an opportunity for consolidation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CLIP] cannot import name '_expand_mask'
2 participants