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

Fix GroundingDINO, DPR after BERT SDPA update #30506

Merged

Conversation

amyeroberts
Copy link
Collaborator

@amyeroberts amyeroberts commented Apr 26, 2024

What does this PR do?

GroundingDINO and DPR models broke after the merging in of #28802 as they use BERT as a backbone / encoder. SDPA is now selected as the attention implementation for BERT by default, but wasn't supported by these models.

For GroundingDINO, we make sure to pass the current model's config implementation when making the model.
For DPR, as the only attention is from BERT, we say it now supports SDPA.

Fixes failing tests on main e.g. this run: https://app.circleci.com/pipelines/github/huggingface/transformers/91014/workflows/dfdf4b73-b123-4c08-bbc4-bb6214737293/jobs/1188921

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@amyeroberts amyeroberts merged commit e7d52a1 into huggingface:main Apr 26, 2024
20 checks passed
@amyeroberts amyeroberts deleted the fix-grounding-dino-dpr-tests branch April 26, 2024 17:04
@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.

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.

None yet

2 participants