zero-shot-image-classification ยท vision + language ยท WASM ยท ~420 MB
SigLIP 2 (Google, 2025) keeps SigLIP's sigmoid read-out โ each label scored independently, so two labels can both fire and "none of the above" is a real answer โ but pairs it with a fresher training recipe and a multilingual Gemma tokenizer. The practical upshot: you can label an image in English, French, Japanese or Chinese and it lands in the same shared space. Score any image against any labels, in any language, entirely on your device.
| Model | onnx-community/siglip2-base-patch16-224-ONNX (ONNX build of google/siglip2-base-patch16-224) |
|---|---|
| Task / pipeline | zero-shot-image-classification |
| Architecture | ViT-B/16 vision encoder + text transformer โ shared 768-d space (the ONNX export declares model_type: siglip, so it runs on the existing SigLIP pipeline) |
| What's new vs SigLIP 1 | Multilingual Gemma tokenizer + a stronger 2025 training recipe (self-distillation + captioning objectives) |
| Training loss | Sigmoid (pairwise), not softmax/contrastive โ each label independent |
| Read-out | per-label logit = scale ยท cosine + bias, then sigmoid(logit) |
| Tokenizer | Gemma (multilingual), padded to a fixed max_length of 64 |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~420 MB, cached after first load |
| License | Apache-2.0 (Google SigLIP 2) |
| Web APIs | WebAssembly, Web Workers, FileReader โ all Baseline widely available |
Pick or drop an image, type comma-separated labels โ in any language โ and hit Score. Each bar is an independent sigmoid probability; they don't add up to 100%. Bar length is drawn relative to the top label so the small scores stay visible; the number is the true probability.

SigLIP 2 base (q8) is very conservative โ its sigmoid scores run low (a clear match often sits under 1%), but the ranking and logit gap between a match and a non-match are large and clean. Trust the order and the "See inside" logits, and set the threshold to fit your labels.
SigLIP 2 turns your image into one 768-number vector and each label into its own, then takes the cosine between them. It scales that cosine by a learned temperature and adds a learned bias to get a logit. Then it squashes each logit through an independent sigmoid (its training objective), so every label is a standalone yes/no. CLIP would instead run a softmax across all labels, forcing them to compete and sum to 100%. Same logits, two different answers โ and the logit column is where SigLIP 2's clean match/non-match separation lives.
| Label | cosine | logit | sigmoid (SigLIP) | softmax (CLIP-style) |
|---|
The sigmoid column can total more (or far less) than 100% โ that's the point. The softmax column always totals 100% because it makes the labels fight over a fixed pie. Notice the softmax still crowns a clear winner even when every sigmoid is tiny.
SigLIP 2 inherits everything that made SigLIP a better tagger than CLIP โ independent per-label sigmoids, a real "reject everything" state, cheaper training at scale โ and adds the piece most real products need: languages other than English. The label set is still just an input you decide at runtime, now in whatever language your users speak.
beach,
sunset, and people at once; independent sigmoids let all three fire.Feel independent sigmoids, and watch one image line up with the same concept across languages.
Multi-label auto-tagging and threshold-based moderation with labels in any language.
A live cross-lingual concept meter and an aesthetic/vibe score.
Score the same image with SigLIP 2 and English-only CLIP side by side.
The pipeline call is identical to SigLIP/CLIP โ the model id is the only change:
import { pipeline } from "@huggingface/transformers";
const classify = await pipeline(
"zero-shot-image-classification",
"onnx-community/siglip2-base-patch16-224-ONNX",
); // downloads + caches ~420 MB once
const output = await classify(imageURL, ["a cat", "un chat", "็ซ"]);
// โ [{ label: "a cat", score: 0.009 }, โฆ]
// Each score is an INDEPENDENT sigmoid probability โ they need not sum to 1.
For "See inside" this page reuses the pipeline's own model, processor, and tokenizer to read the raw
logits_per_image and the image/text embeddings from a single forward pass โ then it
computes the sigmoid (SigLIP's real read-out) and a softmax over the same logits so you can
see how differently the two objectives answer. SigLIP 2's Gemma tokenizer reports a
model_max_length of 1e30, so we pad explicitly to max_length: 64 (the
length SigLIP trained on) โ the pipeline's default padding would otherwise throw. Inference runs in
a Web Worker so the page never janks.