The files Memome's photo search downloads and runs on the phone with ONNX Runtime. They are
google/siglip2-base-patch16-256 (Google, Apache 2.0) as
exported by onnx-community/siglip2-base-patch16-256-ONNX
(revision d1114256522a37ffa257a0a58017348ab0058db2), with one change to the text model.
| File | What it is |
|---|---|
vision_model_q4.onnx |
The image model with 4-bit weights, unchanged. Input: 1 x 3 x 256 x 256, pixels in -1..1, the whole photo squashed to the square. Output pooler_output: 768 values. |
text_model_q4_rows.onnx |
The text model with 4-bit weights and its token table cut out. Input: 1 x 64 x 768, each token's row of the table. Output pooler_output: 768 values. |
token_rows.bin |
The token table: 256,000 little-endian float32 scales, then 256,000 rows of 768 int8 values. A token's row is its int8 values times its scale. |
tokenizer.model |
The model's SentencePiece vocabulary, unchanged. Texts are lower-cased, end with token 1 and are padded with 0 to 64 tokens. |
Cutting the table out lets a phone hold about 68 MB for the text model instead of 440 MB: it reads the 64 rows a text needs from the file. The image and text vectors are compared by cosine similarity, as in SigLIP 2.
token_rows.bin 198 MBvision_model_q4.onnx 63 MBtext_model_q4_rows.onnx 56 MBgoogle/siglip2-base-patch16-256