SigLIP 2 (fastforks)

SigLIP 2 (Tschannen et al. 2025, Google) image towers: ViT-B / L / So400m / g (fixed-resolution checkpoints), patch tokens + attention-pool embedding at any size; the native resolution is in the id.

This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: https://github.com/kleinicke/fastforks. Kernels for the kernels backend: https://huggingface.co/fastforks/kernels. Original code: https://github.com/huggingface/pytorch-image-models at 0df212b369a5.

Author weight repos: https://huggingface.co/timm/vit_base_patch16_siglip_256.v2_webli, https://huggingface.co/timm/vit_base_patch16_siglip_512.v2_webli, https://huggingface.co/timm/vit_giantopt_patch16_siglip_256.v2_webli, https://huggingface.co/timm/vit_giantopt_patch16_siglip_384.v2_webli, https://huggingface.co/timm/vit_large_patch16_siglip_256.v2_webli, https://huggingface.co/timm/vit_large_patch16_siglip_512.v2_webli, https://huggingface.co/timm/vit_so400m_patch14_siglip_224.v2_webli, https://huggingface.co/timm/vit_so400m_patch14_siglip_378.v2_webli, https://huggingface.co/timm/vit_so400m_patch16_siglip_256.v2_webli, https://huggingface.co/timm/vit_so400m_patch16_siglip_512.v2_webli.

Task: features. Tier: stable. Outputs: last_hidden_state, pooler_output, hidden_states. Backends: portable, kernels.

Input: one RGB image. Output: dense patch features and a pooled image feature.

Variants

Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in card.toml.

variant weights (author link) SHA-256 weights licence commercial use
siglip2-b16-256@1 vit_base_patch16_siglip_256.v2_webli.safetensors 13ab9d238865 Apache-2.0 yes
siglip2-b16-512@1 vit_base_patch16_siglip_512.v2_webli.safetensors dc3df9f40f64 Apache-2.0 yes
siglip2-g16-256@1 vit_giantopt_patch16_siglip_256.v2_webli.safetensors 2fb45abae97f Apache-2.0 yes
siglip2-g16-384@1 vit_giantopt_patch16_siglip_384.v2_webli.safetensors 877646a6cefc Apache-2.0 yes
siglip2-l16-256@1 vit_large_patch16_siglip_256.v2_webli.safetensors ffe422ca7824 Apache-2.0 yes
siglip2-l16-512@1 vit_large_patch16_siglip_512.v2_webli.safetensors d41762587702 Apache-2.0 yes
siglip2-so400m14-224@1 vit_so400m_patch14_siglip_224.v2_webli.safetensors 1c079ddc4d7f Apache-2.0 yes
siglip2-so400m14-378@1 vit_so400m_patch14_siglip_378.v2_webli.safetensors 03e8de52efb0 Apache-2.0 yes
siglip2-so400m16-256@1 vit_so400m_patch16_siglip_256.v2_webli.safetensors 68c976f5691f Apache-2.0 yes
siglip2-so400m16-512@1 vit_so400m_patch16_siglip_512.v2_webli.safetensors 8e937c5c827a Apache-2.0 yes

Licence

Original-code strings, recorded as they are (research-use package; check them before any other use). Code: Apache-2.0.

Training data: WebLI (Google web image-text data, not released) (WebLI image-text pairs (multilingual), sigmoid contrastive loss plus captioning / self-distillation / masked prediction (SigLIP 2 paper); not released).

Licence evidence: https://huggingface.co/timm/vit_base_patch16_siglip_256.v2_webli/blob/ac4cc431026674dcac29e34a00d3bd2048390eb3/README.md

Input size

any H x W >= 1, resized or padded inside the model Tested up to (portable, fp16, RTX 5060 Ti 16 GB): siglip2-b16-256 3000x4000 (1.7 GiB peak allocated, 1.9 reserved); siglip2-b16-512 3000x4000 (1.7 GiB peak allocated, 1.8 reserved); siglip2-g16-256 3000x4000 (4.7 GiB peak allocated, 4.9 reserved); siglip2-g16-384 3000x4000 (4.7 GiB peak allocated, 4.9 reserved); siglip2-l16-256 3000x4000 (2.5 GiB peak allocated, 2.8 reserved); siglip2-l16-512 3000x4000 (2.5 GiB peak allocated, 2.7 reserved); siglip2-so400m14-224 3000x4000 (3.2 GiB peak allocated, 3.4 reserved); siglip2-so400m14-378 3000x4000 (3.2 GiB peak allocated, 3.4 reserved); siglip2-so400m16-256 3000x4000 (2.8 GiB peak allocated, 3.1 reserved); siglip2-so400m16-512 3000x4000 (2.8 GiB peak allocated, 3.1 reserved)

Speed and memory

Features, synthetic, 224x224

model time (ms): original fp32 original portable kernels kernels speed-up: vs original vs portable peak memory (MiB, allocated / reserved): original portable kernels
siglip2-b16-256 6.29 6.11 3.28 1.43 4.3x 2.3x 583 / 620 216 / 248 216 / 248
siglip2-b16-512 6.32 5.99 3.31 1.44 4.2x 2.3x 583 / 618 219 / 266 217 / 268
siglip2-g16-256 59.8 30.9 14.7 10.7 2.9x 1.4x 6733 / 6854 2262 / 2290 2262 / 2312
siglip2-g16-384 59.9 31.0 14.7 10.7 2.9x 1.4x 6735 / 6854 2264 / 2288 2263 / 2312
siglip2-l16-256 17.4 11.1 5.71 3.36 3.3x 1.7x 1843 / 1890 643 / 668 643 / 670
siglip2-l16-512 17.5 11.1 5.70 3.35 3.3x 1.7x 1846 / 1888 647 / 666 644 / 670
siglip2-so400m14-224 23.9 12.4 6.38 4.32 2.9x 1.5x 2515 / 2632 858 / 868 858 / 892
siglip2-so400m14-378 23.9 12.5 6.38 4.33 2.9x 1.5x 2516 / 2632 861 / 908 860 / 912
siglip2-so400m16-256 22.8 12.6 6.42 4.21 3.0x 1.5x 2515 / 2636 857 / 868 857 / 890
siglip2-so400m16-512 22.8 12.4 6.40 4.21 2.9x 1.5x 2518 / 2636 861 / 906 858 / 910

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
siglip2-b16-256 14.20 – – 0.18 0.07 0.05
siglip2-b16-512 14.17 – – 0.18 0.07 0.05
siglip2-g16-256 140.56 – – 0.22 0.10 0.08
siglip2-g16-384 139.99 – – 0.22 0.08 0.07
siglip2-l16-256 40.91 – – 0.19 0.05 0.03
siglip2-l16-512 41.54 – – 0.18 0.05 0.03
siglip2-so400m14-224 54.40 – – 0.20 0.08 0.07
siglip2-so400m14-378 54.79 – – 0.20 0.08 0.07
siglip2-so400m16-256 54.53 – – 0.20 0.08 0.07
siglip2-so400m16-512 54.67 – – 0.20 0.08 0.07

torch.compile and TensorRT

model input time: portable compile TensorRT fp16 kernels preparation: compile (cold first call) ONNX + engine build peak MiB (alloc / reserved): portable compile kernels TensorRT (engine + torch)
siglip2-b16-256 224x224 3.28 ms 2.53 ms 1.13 ms 1.43 ms 6.89 s 24.3 s 216 / 248 250 / 266 216 / 248 407 / 440
siglip2-b16-512 224x224 3.31 ms 2.75 ms 1.14 ms 1.44 ms 6.85 s 24.3 s 219 / 266 251 / 286 217 / 268 408 / 460
siglip2-g16-256 224x224 14.7 ms 15.3 ms 9.99 ms 10.7 ms 17.9 s 51.2 s 2262 / 2290 2307 / 2348 2262 / 2312 4441 / 4474
siglip2-g16-384 224x224 14.7 ms 16.9 ms 10.2 ms 10.7 ms 19.3 s 54.1 s 2264 / 2288 2308 / 2348 2263 / 2312 4442 / 4474
siglip2-l16-256 224x224 5.71 ms 5.15 ms 2.93 ms 3.36 ms 10.8 s 31.7 s 643 / 668 679 / 708 643 / 670 1253 / 1282
siglip2-l16-512 224x224 5.70 ms 5.38 ms 2.91 ms 3.35 ms 11.1 s 28.2 s 647 / 666 681 / 706 644 / 670 1252 / 1278
siglip2-so400m14-224 224x224 6.38 ms 6.71 ms 3.77 ms 4.32 ms 12.3 s 34.7 s 858 / 868 887 / 908 858 / 892 1659 / 1674
siglip2-so400m14-378 224x224 6.38 ms 6.98 ms 3.79 ms 4.33 ms 12.2 s 32.4 s 861 / 908 888 / 926 860 / 912 1660 / 1712
siglip2-so400m16-256 224x224 6.42 ms 6.62 ms 3.60 ms 4.21 ms 12.9 s 30.0 s 857 / 868 894 / 908 857 / 890 1657 / 1672
siglip2-so400m16-512 224x224 6.40 ms 7.02 ms 3.61 ms 4.21 ms 13.2 s 29.8 s 861 / 906 896 / 928 858 / 910 1658 / 1712

Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).

Hardware, protocol and caveats: benchmarks (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or (fp32) where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.

Accuracy

On public datasets

Two disjoint seeded subsets of the val folders; each image shorter side 256 (bicubic), centre crop 224, the CLS / pooled feature; cosine kNN, vote weighted by similarity. Original = the original code named under Details, same checkpoint and protocol.

variant dataset original fp32 original fp16 portable kernels note
siglip2-b16-256 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 53.84 53.78 53.80 53.86
siglip2-b16-512 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 26.24 26.06 26.28 26.52
siglip2-l16-256 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 64.74 64.84 64.68 64.62
siglip2-l16-512 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 65.18 65.12 65.14 65.10
siglip2-so400m14-224 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 66.18 66.12 66.10 66.10
siglip2-so400m14-378 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 59.90 59.94 60.00 59.92
siglip2-so400m16-256 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 59.52 59.46 59.34 59.50
siglip2-so400m16-512 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 67.14 67.16 67.04 67.20
siglip2-g16-256 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 67.92 67.84 67.80 68.00
siglip2-g16-384 ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images) 69.02 69.06 69.12 69.10

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 8bce3316, 2026-11-11 to 2026-11-12.

Parity with the original code

Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 6.5 % and p99 <= 65 % of the reference's median |value| (absolute error of the output last_hidden_state).

Limitations

  • kernels replays a CUDA graph per small input shape without hidden states (up to about 1M activations: ViT-B ~460 px, ViT-L ~300 px), captured on the shape's second call, at most 4 per model; model.release_graphs() frees them.
  • Small kernels calls (graph-sized, with or without layers) run GEMMs of at most 600 tokens on cuBLAS: faster in a graph replay (ViT-B/16 224 px: 1.26 against 1.52 ms), about 10 % slower eagerly on ViT-T / B; a replay equals the eager call bit for bit.
  • fp32_accumulate = true puts every GEMM on cuBLAS with fp32 accumulation (the portable precision; slower on GeForce).

Usage

from fastforks import features

model = features.load("siglip2-b16-256")  # mode="auto": the preferred backend from recorded measurements
result = model("photo.jpg", size=518)
result.last_hidden_state  # tokens [N, C], as Hugging Face's output
result.backend  # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')

Install with pip install fastforks (see https://github.com/kleinicke/fastforks). Other variants: siglip2-b16-256, siglip2-b16-512, siglip2-g16-256, siglip2-g16-384, siglip2-l16-256, siglip2-l16-512, siglip2-so400m14-224, siglip2-so400m14-378, siglip2-so400m16-256, siglip2-so400m16-512.

Kernels backend

features.load("siglip2-b16-256", mode="kernels") runs our CUDA kernels (cudnn_hacc, fvm_conv, fvm_extra, fvm_mb, fvm_r3). It needs a prebuilt kernel for your GPU architecture (downloaded from https://huggingface.co/fastforks/kernels on first use) and a recent NVIDIA driver; if there is none it raises BackendUnavailableError with the reason and never falls back silently. mode="auto" picks kernels when it can run and logs the choice.

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

Collection including fastforks/siglip2