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-lifted position_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 stated structural changes are (1) lifting the per-image position-embedding resize out of the graph to a host-computed input, and, from revision 90d4dd2, (2) the MAP attention-pooling head written out explicitly (q/k/v/out projections, scale on q, finite pad mask) in place of the stock nn.MultiheadAttention lowering, and (3) a tail-exact gelu_pytorch_tanh (cubic on clamp(x, Β±10) with explicit selects beyond it). Both rewrites keep the fp32 output identical to the stock model (1.00000000 on the fixture corpus) and change the fp16 GPU result by 5.9e-7 in cosine.

Compute unit: CpuAndGpu remains the recommended default. Before revision 90d4dd2 the vision encoder collapsed on the Apple Neural Engine (cosine ~0.31 vs fp32) because the ANE executed the stock MAP-head lowering wrongly; from 90d4dd2 the ANE arm holds the floor (CpuAndNeuralEngine 0.99992, All 0.99993, measured on an M1 Max / macOS 26.5), so the arm is usable, but it was also the slower arm on that host (vision β‰ˆ52 ms/image vs β‰ˆ17 ms on the GPU); energy per image has not been measured. See coremlit's conversion/siglip/README.md, 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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support