SigLIP 2 NaFlex (base, patch16) β CoreML (coremlit)
CoreML conversions of Google DeepMind's SigLIP 2 siglip2-base-patch16-naflex vision + text encoders (shared 768-dim joint embedding), for coremlit's embeddings::siglip module.
siglip2-base-patch16-naflex-512/ (the 512-patch NaFlex tier):
siglip2_vision_512.mlmodelcβ image encoder; 3 inputs (pixel_values, host-liftedposition_embeddings,attention_mask) β 768-dim.siglip2_text_64.mlmodelcβ text encoder (input_ids, 64-token) β 768-dim.pos_embed_16x16x768.f32le.binβ the base 16Γ16 position-embedding table the Rust runtime resizes per image.
Provenance
Converted from-official by coremlit/crates/coremlit/conversion/siglip/ from google/siglip2-base-patch16-naflex @ b53b807d3a2d5e2b3911292f2d69e5341cdc064c (per-file SHA-256 in coremlit's tests/siglip/model_io.rs). fp32 parity vs the stock model: cosine 1.0000000; shipped fp16 GPU parity ~0.99999. The weight VALUES are unchanged; the one stated structural change is lifting the per-image position-embedding resize out of the graph to a host-computed input.
Compute unit: use CpuAndGpu. The vision encoder is numerically unstable on the ANE (fp16 collapse to ~0.31 cosine); the GPU path holds the floor. See coremlit's tests/siglip/placement.rs and issue #51.
License & attribution
Apache-2.0. Upstream: Google DeepMind β SigLIP 2 (Tschannen et al., 2025). Retain the Apache-2.0 license and copyright notices, and state changes, when redistributing.