Add SigLIP 2 B/16-256 Core ML encoders and tokenizer
Browse files- ImageEncoder.mlpackage.zip +3 -0
- README.md +49 -0
- TextEncoder.mlpackage.zip +3 -0
- manifest.json +25 -0
- tokenizer.zip +3 -0
ImageEncoder.mlpackage.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:426115f240ead5faf69b073e08dd1b959d850ca5c592537cd81886992283b2fb
|
| 3 |
+
size 91700398
|
README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: google/siglip2-base-patch16-256
|
| 4 |
+
tags:
|
| 5 |
+
- coreml
|
| 6 |
+
- siglip2
|
| 7 |
+
- image-text-retrieval
|
| 8 |
+
library_name: coreml
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# SigLIP 2 B/16-256 — Core ML
|
| 12 |
+
|
| 13 |
+
Core ML conversion of [google/siglip2-base-patch16-256](https://huggingface.co/google/siglip2-base-patch16-256),
|
| 14 |
+
split into separate image and text encoders for on-device text→image retrieval.
|
| 15 |
+
Used by the Resource Library in ScreenKite and PilotCut.
|
| 16 |
+
|
| 17 |
+
Redistributed from [palmier-io/siglip2-base-coreml](https://huggingface.co/palmier-io/siglip2-base-coreml)
|
| 18 |
+
under Apache 2.0. The files are byte-identical to that repository.
|
| 19 |
+
|
| 20 |
+
## Files
|
| 21 |
+
|
| 22 |
+
| File | Contents |
|
| 23 |
+
|---|---|
|
| 24 |
+
| `ImageEncoder.mlpackage.zip` | Vision tower, 256×256 input, 8-bit palettized (per-grouped-channel) |
|
| 25 |
+
| `TextEncoder.mlpackage.zip` | Text tower, 64-token input, 8-bit palettized |
|
| 26 |
+
| `tokenizer.zip` | Gemma SentencePiece tokenizer files (`tokenizer.json`, config) |
|
| 27 |
+
| `manifest.json` | File names, sha256s, sizes, model dims |
|
| 28 |
+
|
| 29 |
+
Both encoders emit L2-normalized 768-d embeddings (`embedding` output); similarity
|
| 30 |
+
is a plain dot product. Minimum deployment target: macOS 15.
|
| 31 |
+
|
| 32 |
+
## Usage notes
|
| 33 |
+
|
| 34 |
+
- Image preprocessing is a **squash-resize** to 256×256 (no center crop), pixels
|
| 35 |
+
scaled to [-1, 1]. The `ImageType` input already applies the scaling.
|
| 36 |
+
- Text must be tokenized with the bundled Gemma tokenizer and **padded to 64
|
| 37 |
+
with the pad token (0), no attention mask** — SigLIP was trained that way and
|
| 38 |
+
embeddings drift if padding differs.
|
| 39 |
+
|
| 40 |
+
## Versioning
|
| 41 |
+
|
| 42 |
+
Files in this repo are immutable once published. Re-conversions are published as
|
| 43 |
+
new versions, never overwrites.
|
| 44 |
+
|
| 45 |
+
## License
|
| 46 |
+
|
| 47 |
+
Apache 2.0, same as the original weights by Google. This repository redistributes
|
| 48 |
+
a converted form of those weights without modification to their values beyond
|
| 49 |
+
8-bit palettization.
|
TextEncoder.mlpackage.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:48f80e35ce40a9dcdc55bef986a104d3153e1cfa78229bb45c4724f3f3427368
|
| 3 |
+
size 258593083
|
manifest.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "siglip2-base-patch16-256",
|
| 3 |
+
"version": 1,
|
| 4 |
+
"weights": "palettized-8bit",
|
| 5 |
+
"embeddingDim": 768,
|
| 6 |
+
"imageSize": 256,
|
| 7 |
+
"contextLength": 64,
|
| 8 |
+
"files": {
|
| 9 |
+
"imageEncoder": {
|
| 10 |
+
"name": "ImageEncoder.mlpackage.zip",
|
| 11 |
+
"sha256": "426115f240ead5faf69b073e08dd1b959d850ca5c592537cd81886992283b2fb",
|
| 12 |
+
"bytes": 91700398
|
| 13 |
+
},
|
| 14 |
+
"textEncoder": {
|
| 15 |
+
"name": "TextEncoder.mlpackage.zip",
|
| 16 |
+
"sha256": "48f80e35ce40a9dcdc55bef986a104d3153e1cfa78229bb45c4724f3f3427368",
|
| 17 |
+
"bytes": 258593083
|
| 18 |
+
},
|
| 19 |
+
"tokenizer": {
|
| 20 |
+
"name": "tokenizer.zip",
|
| 21 |
+
"sha256": "c37f2a8e8555d8561109564c4f60ee962b0072abddcfcfd599d321469d6d1ef5",
|
| 22 |
+
"bytes": 5460173
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
tokenizer.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c37f2a8e8555d8561109564c4f60ee962b0072abddcfcfd599d321469d6d1ef5
|
| 3 |
+
size 5460173
|