SigLIP 2 base, text half, Core ML
The text encoder of google/siglip2-base-patch16-256
(commit 3f9f96cb90da5dbc758b01813f2f6f1aee24c1ab), converted to Core ML in float16. It turns a search into
the 768-number vector that the model's image half gives for pictures, so text can be compared with frames
by cosine. rushbin downloads it to search footage by how it looks
on a Mac that works alone.
Files
| File | Size (bytes) | SHA-256 |
|---|---|---|
SigLIP2Text.mlmodelc.zip |
530503967 | 3ecdb11c635acf687d1400958be31ee20c146525616dd4b5c3a374c1cc1e4a7e |
tokenizer.model |
4241003 | 61a7b147390c64585d6c3543dd6fc636906c9af3865a5548f27f31aee1d4c8e2 |
convert-text.py |
the conversion script | |
LICENSE |
Apache License 2.0, with the changes made |
SigLIP2Text.mlmodelc.zip holds the compiled model folder SigLIP2Text.mlmodelc (unzip it; load it with
MLModel(contentsOf:), macOS 13 or later). tokenizer.model is the original SentencePiece file of the model,
unchanged.
Input and output
- Input
ids: int32, shape (1, 64). The search through the model's Gemma tokenizer astransformersapplies it (AutoProcessor,padding="max_length", max_length=64, truncation=True): no lower case,<eos>(1) at the end, padded with<pad>(0). No attention mask, as in training. - Output
embedding: float32, shape (1, 768), normalized.
Conversion
convert-text.py with Python 3.12, torch 2.7.0, transformers 4.51.3, coremltools 9.0 (sentencepiece,
protobuf), eager attention, compute_precision=FLOAT16, minimum_deployment_target=macOS13, compiled with
coremltools.utils.compile_model:
python convert-text.py OUT_DIR QUERIES.json
Parity (12 November 2026, Apple M5 Pro, macOS 26.6)
Against the reference (transformers 5.22.1 and torch 2.15.0, get_text_features, normalized) on 35 searches
in English and Italian with accents, punctuation, runs of spaces, emoji, other scripts, and searches longer
than 64 tokens:
| Where it runs | Cosine min | Cosine mean | Time per search |
|---|---|---|---|
Neural Engine (.cpuAndNeuralEngine) |
0.99998 | 0.99999 | 1.4 ms |
GPU (.cpuAndGPU) |
1.00000 | 1.00000 | 2.1 ms |
| CPU, Intel build under Rosetta | 1.00000 | 1.00000 |
Against PyTorch with the conversion pins: 1.00000 on the same 35 searches. On 10 searches over 405 frames of 81 clips, the 10 nearest clips are the same, in the same order, as with the reference vectors.
License
Apache License 2.0, as the original model. Copyright Google LLC for the model and the tokenizer. Changes: only
the text half, traced and converted to Core ML, weights unchanged and stored as float16. See LICENSE.
Model tree for artideinnova/siglip2-base-patch16-256-text-coreml
Base model
google/siglip2-base-patch16-256