Skip to content

Fix GroundingDINO, DPR after BERT SDPA update#30506

Merged
amyeroberts merged 1 commit intohuggingface:mainfrom
amyeroberts:fix-grounding-dino-dpr-tests
Apr 26, 2024
Merged

Fix GroundingDINO, DPR after BERT SDPA update#30506
amyeroberts merged 1 commit intohuggingface:mainfrom
amyeroberts:fix-grounding-dino-dpr-tests

Conversation

@amyeroberts
Copy link
Copy Markdown
Contributor

@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

@amyeroberts amyeroberts merged commit e7d52a1 into huggingface:main Apr 26, 2024
@amyeroberts amyeroberts deleted the fix-grounding-dino-dpr-tests branch April 26, 2024 17:04
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

2 participants