License clarification + a weight-loading issue in the released checkpoint

#4
by ibrahimsahdev - opened

Hi, and thank you for releasing these models.

We are building a lost-pet matching service and benchmarked six embedding
models on public re-identification datasets (DogFaceNet, MPDD,
CatIndividualImages). SigLIP2-Base-for-animal-identification gave the best
verification performance of all candidates - the lowest EER on all three
datasets, roughly half the error rate of general-purpose SigLIP2 and CLIP
baselines. Thank you for making it public.

Two things.

  1. License

The model card has no license field, and there is no LICENSE file in the
repository. Could you clarify under which license the weights are released,
and whether commercial use is permitted? We would of course cite your
Journal of Imaging paper.

  1. A loading issue that may affect other users

The checkpoint does not load correctly with the standard call:

AutoModel.from_pretrained("AvitoTech/SigLIP2-Base-for-animal-identification")

Two reasons:

  • All 408 tensor keys are prefixed with clip.. transformers strips only the
    target class prefix, which for SiglipModel is siglip, so none of the keys
    match. The model silently loads with randomly initialised weights and only
    emits a warning. In our first run this produced Top-1 20.2% instead of the
    expected ~95%, and we nearly discarded the model as underperforming.

  • text_config.vocab_size is absent from config.json, so it defaults to 32000
    while the checkpoint's token embedding is [256000, 768].

We worked around both locally (stripping the prefix and setting vocab_size),
after which the model loads with 0 missing / 0 unexpected / 0 mismatched keys
and reproduces the performance reported on your model card.

The same clip. prefix is present in CLIP-ViT-base-for-animal-identification,
but there it happens to load correctly because CLIPModel's prefix is clip.

Thanks again for the models.

Sign up or log in to comment