zero-shot-image-classification Β· vision + language Β· WASM Β· ~200 MB
SigLIP learned the same shared space for pictures and words as CLIP β but it was trained with a sigmoid loss instead of a softmax one. The practical upshot: each label is scored independently. Two labels can both read 90%, and if none fit, all of them can read near 0. That "none of the above" honesty is exactly what tagging and moderation need. Nothing leaves your device.
| Model | Xenova/siglip-base-patch16-224 (ONNX build of google/siglip-base-patch16-224) |
|---|---|
| Task / pipeline | zero-shot-image-classification |
| Architecture | ViT-B/16 vision encoder + text transformer β shared 768-d space |
| Training loss | Sigmoid (pairwise), not softmax/contrastive β that's the whole difference from CLIP |
| Read-out | per-label logit = scale Β· cosine + bias, then sigmoid(logit) β independent probabilities |
| Tokenizer | SentencePiece, padded to a fixed max_length of 64 (SigLIP was trained this way) |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~200 MB, cached after first load |
| License | Apache-2.0 (Google SigLIP) |
| Web APIs | WebAssembly, Web Workers, FileReader β all Baseline widely available |
Pick or drop an image, type comma-separated labels, and hit Score. Each bar is an independent sigmoid probability β they don't add up to 100%. Slide the match threshold to decide what counts as a hit.

SigLIP wraps each label in its
training caption This is a photo of {label}, so type class names, not full sentences.
SigLIP is deliberately conservative β its sigmoid scores run low, so a real match might sit around 0.2β0.5, not 0.9. Pick the threshold that fits your labels rather than assuming 0.5.
SigLIP 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. Here's the fork in the road: SigLIP 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 very different answers β watch the two right-hand columns diverge.
| 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.
CLIP's softmax always crowns a winner even when the truth is "none of these," and it can't say "this image is both a cat and cozy." SigLIP's per-label sigmoid fixes both: it's a natural multi-label tagger with a real "reject everything" state, it's cheaper to train at scale (which is why the SigLIP family tops many zero-shot benchmarks), and the label set is still just an input you decide at runtime.
beach, sunset,
and people at once; independent sigmoids let all three fire.minimalist, nostalgic) as absolute 0β1 scores you can compare across images.Feel independent sigmoids first-hand, and watch the same logits become sigmoid vs softmax side by side.
Multi-label auto-tagging and threshold-based moderation β the shippable version.
An aesthetic/vibe meter and a live webcam "does this fit the vibe?" check.
SigLIP tags a batch, then compares its per-label calls against CLIP's softmax on the same images.
The pipeline call is identical to CLIP β the difference is in how you read the scores:
import { pipeline } from "@huggingface/transformers";
const classify = await pipeline(
"zero-shot-image-classification",
"Xenova/siglip-base-patch16-224",
); // downloads + caches ~200 MB once
const output = await classify(imageURL, ["a cat", "a dog", "a city street"]);
// β [{ label: "a cat", score: 0.91 }, β¦]
// Each score is an INDEPENDENT sigmoid probability β they need not sum to 1.
// (CLIP's pipeline returns a softmax over the labels instead.)
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. The SentencePiece tokenizer is padded to max_length: 64,
the length SigLIP trained on. Inference runs in a Web Worker so the page never janks.