Instructions to use google/siglip2-base-patch16-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/siglip2-base-patch16-224 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="google/siglip2-base-patch16-224") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("google/siglip2-base-patch16-224", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
10 days ago
-
Remove the Gemma chat template from tokenizer_config.json
Verified signatureSigLIP2's text tower reuses the Gemma tokenizer, and `tokenizer_config.json` still carries Gemma's `chat_template`. SigLIP2 has no chat format, so tools that honor a tokenizer's chat template wrap the text in `<start_of_turn>user ... <end_of_turn>` markers and drop EOS. For example, vLLM's `/v1/embeddings` with `messages` returns a different embedding than for the same plain text (11 tokens instead of 6 for "a photo of a cat"; vLLM-side fix in https://github.com/vllm-project/vllm/pull/66624). This PR removes that one key. Tokenizer and processor output are unchanged (checked with Transformers); only `apply_chat_template` stops working, which has no meaning for this model. The same template is in the other fixed-resolution SigLIP2 checkpoints, which could take the same one-line change: `siglip2-base-patch16-256`, `-384`, `-512`, `siglip2-base-patch32-256`, `siglip2-large-patch16-256`, `-384`, `-512`, `siglip2-so400m-patch14-224`, `-384`, `siglip2-so400m-patch16-256`, `-384`, `-512`, a…8a47809
-
Upload README.md with huggingface_hub
Verified signature75de2d5 -
Upload README.md with huggingface_hub (#1)
Verified signature- Upload README.md with huggingface_hub (6f0d392755b053ddb91b3b469fffe56860b980bb)022b6f7
-
Upload config
Verified signatureaa61322
-
Upload processor
Verified signature997aaec -
Upload model
Verified signaturea7d0427 -
initial commit
Verified signature9a9692a