SigLIP 2, converted for siglip

SigLIP 2 (Tschannen et al., SigLIP 2: Multilingual Vision-Language Encoders with Improved Semantic Understanding, Localization, and Dense Features, 2025), converted for the siglip Rust crate: MLX (Apple silicon GPU) and ONNX Runtime (elsewhere). The towers are unchanged; only their form is.

Sources (Apache 2.0, by Google): google/siglip2-base-patch16-224 at 75de2d55ec2d0b4efc50b3e9ad70dba96a7b2fa2, google/siglip2-large-patch16-256 at 787800c8990e6f058423089178e718139608408c, google/siglip2-so400m-patch16-384 at dd658faac399427308559e2c3ac1e99cbe43845d.

Files

Per model (MODEL is siglip2-base-patch16-224, siglip2-large-patch16-256 or siglip2-so400m-patch16-384):

  • MODEL.tokenizer.json: the source's tokenizer.json (Gemma's tokenizer), unchanged.
  • MODEL.tokens.safetensors: the token embedding table (256,000 rows), int8, symmetric, with one float32 scale per 64 values of a row (tokens (V, D) int8, scales (V, D/64) float32). The text tower takes token embeddings, not ids: the table is most of the text tower, and the crate reads only the rows a text uses. It moves the text features by a cosine of 0.9998 at worst.
  • MODEL.vision.mlx.safetensors, MODEL.text.mlx.safetensors: each tower in float16, linear weights as (in, out), q/k/v fused, the patch embedding as a (16*16*3, D) matrix over channels-last patches, the pooling head's query projected once (its probe is a constant); the tower's shape as JSON in the metadata (shape).
  • MODEL.vision.onnx: input pixels (N, S, S, 3) float32, the image resized to S x S (Pillow's bilinear, no crop) and normalised as (x / 255 - 0.5) / 0.5; output features (N, D), the image's features before normalisation. Opset 17.
  • MODEL.text.onnx: input embeddings (N, 64, D) float32, the token embeddings of the text's ids (lowercased, Gemma's tokenizer, <eos> appended, padded with <pad> or truncated to 64); output features (N, D), before normalisation.

The ONNX files compute in float32, with their larger weights stored as float16 and cast once when the session loads (half the download).

Logits are cosine(image, text) x scale + bias, and their sigmoid the probability that the text describes the image:

Model Image side D scale bias
base 224 768 112.66889953613281 -16.771724700927734
large 256 1024 108.04971313476562 -16.347614288330078
so400m 384 1152 109.85502624511719 -15.932409286499023
File Bytes SHA-256
siglip2-base-patch16-224.tokens.safetensors 208896328 a09ecb327544a9cc7c1defba395f0d0c36ec69cb2226f09b7e78da9305e0ccb7
siglip2-base-patch16-224.tokenizer.json 34363039 cb9140fae3ac5122c972d37adf83e1248471a38147ad76f8215c8872c6fd8322
siglip2-base-patch16-224.vision.mlx.safetensors 184601632 13e153380de627b75d0c8bc9d69e5a568155fa43ebfe20fd1c64e660bad8e307
siglip2-base-patch16-224.text.mlx.safetensors 171404912 fa75c159f5a943ea42da93f3ff398b1bd2af7b07c4f5265973d1d36d5118644b
siglip2-base-patch16-224.vision.onnx 184868451 1a362f5975625647afa4f6feace3f3a358d3311bc7e9142af6294c794b711564
siglip2-base-patch16-224.text.onnx 171649066 567ee9e8d6e7fe57d2cbed52806b149b474c0427dce75e79dc5d2bdd5b04daa2
siglip2-large-patch16-256.tokens.safetensors 278528336 c53df24b2be14f7338d7987f26edc7843152af2cd33dde1cca7c801e12fc509c
siglip2-large-patch16-256.tokenizer.json 34363039 cb9140fae3ac5122c972d37adf83e1248471a38147ad76f8215c8872c6fd8322
siglip2-large-patch16-256.vision.mlx.safetensors 629841048 188d4a1a6876134e472eaefa9e2c14d9dfbf7de75e533c49cff9829ba90226ff
siglip2-large-patch16-256.text.mlx.safetensors 606879968 75dba73d54e7290dfe1ba4ab7566cdf284971c619bcb3a61d9f63a4e67c9dc02
siglip2-large-patch16-256.vision.onnx 630131112 511ec6727a4782c1ec32044cdd0d67fe8cb8ad3ebf3f722c8561535e784675ff
siglip2-large-patch16-256.text.onnx 607154357 3467f5d777bbc892467aa4b957b034be7b90e7dd7b2bb319ff4309cb4e3d84e9
siglip2-so400m-patch16-384.tokens.safetensors 313344336 88872456ed10aa2eafee186ee4792bd248f1df0f64eec3bbadcaefb9dada2029
siglip2-so400m-patch16-384.tokenizer.json 34363039 cb9140fae3ac5122c972d37adf83e1248471a38147ad76f8215c8872c6fd8322
siglip2-so400m-patch16-384.vision.mlx.safetensors 853888016 41cccb95ee3d5421b5ccae98de7c8335491405aa1946080f283fc56220938bbf
siglip2-so400m-patch16-384.text.mlx.safetensors 825771960 03a7efdeeda9e6f80d1ae42e5946047ec0dde70e53517455a0a613749e3d3eb1
siglip2-so400m-patch16-384.vision.onnx 854213175 4fe6445701d4b03053f7c60e8bd0936a697e6cf8cb6b4246b628a99b4309743d
siglip2-so400m-patch16-384.text.onnx 826081425 763cbdb44d307b4a3485d800e2a26113fda2a77127b94ed7b66af175b00f2055

How they were checked

conversion/convert.py in the crate's repository made them. It restates both towers from the converted weights alone and checks them against transformers on four test images and ten prompts (features within 1.4e-4); ONNX Runtime is within a cosine of 0.999997 of the restatement. On an Apple M5, the MLX engine (float16) gives SigLIP 2 base's image features within a cosine of 0.999997 of transformers, its text features (with the int8 table) within 0.9999, and logits within 0.1.

Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for octamap/siglip

Quantized
(28)
this model