Skip to content

fix: load DINOv3 BackboneClassifier checkpoints in VSS - #18

Merged
danellecline merged 1 commit into
mainfrom
fix/dinov3-backbone-classifier
Oct 30, 2026
Merged

danellecline merged 1 commit into
mainfrom
fix/dinov3-backbone-classifier

Conversation

@danellecline

@danellecline danellecline commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Load sslvitstrain DINOv3 fine-tunes saved as BackboneClassifier (model_type: backbone_classifier), which AutoModel cannot resolve
  • Rebuild the backbone from the checkpoint's backbone_config (or base_model), strip the backbone. weight prefix, and drop the unused classification head so embeddings still use the CLS token
  • Add unit tests covering successful weight restore and rejection of incomplete classifier configs

Test plan

  • Run tests/test_backbone_classifier.py
  • Point a worker at a local BackboneClassifier checkpoint and confirm it loads without Unrecognized model / backbone_classifier errors
  • Confirm embedding shape still matches hidden_size and Redis KNN search works for a small batch
  • Smoke-test a standard (non-classifier) ViT/DINOv3 path still loads via AutoModel

AutoModel cannot resolve model_type backbone_classifier from sslvitstrain
fine-tunes. Rebuild the backbone from the saved config and drop the head.

Co-authored-by: Cursor <cursoragent@cursor.com>
@danellecline
danellecline merged commit 3954d1a into main Oct 30, 2026
1 check passed
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.

1 participant