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

Detr bettertransformer #1424

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

issamarabi
Copy link

@issamarabi issamarabi commented Oct 1, 2023

What does this PR do?

Fixes #488 and huggingface/transformers#20372

Added BetterTransformer support for DERT architecture.
Added test model for DERT model.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

- Converted DetrEncoderLayer weights to BetterTransformer format.
- Added forward method for inference with BetterTransformer.
- Added validation to ensure proper conversion.

Signed-off-by: Issam Arabi <[email protected]>
Signed-off-by: Issam Arabi <[email protected]>
Signed-off-by: Issam Arabi <[email protected]>
Copy link
Contributor

@fxmarty fxmarty left a comment

Choose a reason for hiding this comment

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

Thank you for the addition, looks fine to me! Let's just check that tests pass.

@fxmarty
Copy link
Contributor

fxmarty commented Oct 10, 2023

@issamarabi Thank you! Can you add timm in

TESTS_REQUIRE = [
?

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.

Community contribution - BetterTransformer integration for more models!
2 participants