Views
No views yet
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.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.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.