← All models

zero-shot-image-classification Β· vision + language Β· WASM Β· ~200 MB

SigLIP β€” CLIP, but every label gets its own probability

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.

At a glance

ModelXenova/siglip-base-patch16-224 (ONNX build of google/siglip-base-patch16-224)
Task / pipelinezero-shot-image-classification
ArchitectureViT-B/16 vision encoder + text transformer β†’ shared 768-d space
Training lossSigmoid (pairwise), not softmax/contrastive β€” that's the whole difference from CLIP
Read-outper-label logit = scale Β· cosine + bias, then sigmoid(logit) β€” independent probabilities
TokenizerSentencePiece, padded to a fixed max_length of 64 (SigLIP was trained this way)
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~200 MB, cached after first load
LicenseApache-2.0 (Google SigLIP)
Web APIsWebAssembly, Web Workers, FileReader β€” all Baseline widely available

Run it

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.

Drop an image here, or click to choose
Two cats sleeping on a pink couch A cozy sunlit bedroom with a bookshelf A riverside at golden hour with a swan
Selected image preview

SigLIP wraps each label in its training caption This is a photo of {label}, so type class names, not full sentences.

0.15

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.

See inside β€” sigmoid vs softmax, on the same numbers

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.

Run a scoring to see the raw numbers.

Why it matters

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.

Use cases

Basics

Feel independent sigmoids first-hand, and watch the same logits become sigmoid vs softmax side by side.

Practical

Multi-label auto-tagging and threshold-based moderation β€” the shippable version.

Wild

An aesthetic/vibe meter and a live webcam "does this fit the vibe?" check.

Multi-model

SigLIP tags a batch, then compares its per-label calls against CLIP's softmax on the same images.

How the API works

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.

References