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

Adjust support for register tokens and add support for DINOv2 backbones with registers #2011

Closed

Conversation

patricklabatut
Copy link

  • Make applying positional encoding to register tokens optional (not done in DINOv2)
  • Add missing initialization for register tokens
  • Add support for DINOv2 backbones with registers (from Vision Transformers Need Registers)

Test: loaded DINOv2 backbones w/ registers with both timm and DINOv2's reference codebase and matched inference results to 1e-4 absolute tolerance (same as for DINOv2 backbones w/o registers) .

… support for DINOv2 backbones with registers
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 27, 2023

The documentation is not available anymore as the PR was closed or merged.

@patricklabatut
Copy link
Author

looking into fixing the 10 broken tests...

@rwightman
Copy link
Collaborator

@patricklabatut so thanks for the quick turnaround on this, I already have a local draft of this and took a different approach, did not agree with their split of class vs reg embeddings and the ick logic it'd create so I just updated the weight adapter to make the reg ones no_embed_class compatible (model code does not change).

@patricklabatut
Copy link
Author

@rwightman OK, shall I just drop this PR, then? If so, no problem, just looking forward to seeing the support merged.

@rwightman
Copy link
Collaborator

@patricklabatut yeah, I just have to verify the outputs are the same otherwise ready to push a PR, hopefully this weekend sometime.

@patricklabatut
Copy link
Author

looking into fixing the 10 broken tests...

Pushed a potential fix for this only for reference.

@patricklabatut
Copy link
Author

Closing this PR in favor of an alternative approach as discussed - thanks for working on this!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

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.

3 participants