Downloads · 30 days
0
0% of all-time downloads
legionsound/sift-siglip2
sift-siglip2 is a machine learning model from legionsound. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for coreml. The card lists the license as apache-2.0.
Re-hosted Core ML conversion of google/siglip2-so400m-patch14-384 for Sift, a local photo library app. Public so the app can download embeddings models without tokens. Nothing personal went through this pipeline — val…
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
3
Public
Repo size
11.3 GB
Likes
0
Public
Click a slice to open those files.
.zip2.3 GB · 100%
From the Hugging Face model README
Re-hosted Core ML conversion of google/siglip2-so400m-patch14-384
for Sift, a local photo library app.
Public so the app can download embeddings models without tokens. Nothing
personal went through this pipeline — validation uses seeded synthetic
gradients plus CC0 stock photos, not real library content.
google/siglip2-so400m-patch14-384e8e487298228002f3d8a82e0cd5c8ea9c567f57fct.transform.FP16ComputePrecision)| File | Size | sha256 | What it is |
|---|---|---|---|
sift-siglip2-image.mlpackage.zip | 0.854 GB | 8748cc4cd54695a8 (full value in sha256.txt) | Vision tower: pixel_values [1,3,384,384] fp32 in → 1152-dim feature |
sift-siglip2-text.mlpackage.zip | 1.416 GB | 35e55a7da541b0e0 (full value in sha256.txt) | Text tower: input_ids/attention_mask [1,64] int32 → 1152-dim feature |
Both towers output the pooled, projected feature — the same vector the
upstream get_image_features / get_text_features APIs return. Length
normalisation, if wanted, is the caller's step. The fp32 build that
previously sat at this path remains in repo history (~4.54 GB zipped).
Image preprocessing (from the upstream preprocessor_config.json):
size: {height: 384, width: 384}), bilinear
interpolation (resample: 2 = PIL BILINEAR).1/255 (rescale_factor 0.00392156862745098) → [0,1].image_mean, image_std).Text preprocessing (Gemma tokenizer from the upstream snapshot):
padding="max_length" (right padding, padding_side=right),
truncation=True.return_attention_mask=True is required — the Gemma tokenizer omits
the mask by default, and the model needs it.input_ids and attention_mask as int32, shape [1, 64].Output: 1152-dim fp32 feature vector per tower.
Deterministic gate: worst cosine vs the upstream torch model across all fixed samples, computed against the UNMODIFIED upstream weights (references are generated before the conversion-time pooling-head swap, so the gate measures the rewrite honestly). Gate: cosine ≥ 0.999 on every sample.
| Mode | Worst cosine | Gate | Zipped size |
|---|---|---|---|
| fp16 straight | 0.998943 | FAIL | ~2.4 GB |
| fp16-mixed (shipped) | 0.999019 | PASS | 2.27 GB |
| fp32 | 1.000000 | PASS | 4.54 GB |
The fp16 straight failure was a synthetic high-contrast IMAGE sample; text samples were ≥ 0.999997 in every mode.
Full per-sample numbers in validation.json:
The vision tower's attention-pooling head is reimplemented with explicit
matmul/softmax for the conversion (same weights; upstream's
nn.MultiheadAttention wrapper does not convert to Core ML). The gate
above is what verifies that reimplementation is faithful.