โ† All models

zero-shot-image-classification ยท vision + language ยท WASM ยท ~420 MB

SigLIP 2 โ€” a newer, multilingual CLIP alternative

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.

At a glance

Modelonnx-community/siglip2-base-patch16-224-ONNX (ONNX build of google/siglip2-base-patch16-224)
Task / pipelinezero-shot-image-classification
ArchitectureViT-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 1Multilingual Gemma tokenizer + a stronger 2025 training recipe (self-distillation + captioning objectives)
Training lossSigmoid (pairwise), not softmax/contrastive โ€” each label independent
Read-outper-label logit = scale ยท cosine + bias, then sigmoid(logit)
TokenizerGemma (multilingual), padded to a fixed max_length of 64
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~420 MB, cached after first load
LicenseApache-2.0 (Google SigLIP 2)
Web APIsWebAssembly, Web Workers, FileReader โ€” all Baseline widely available

Run it

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.

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
0.30%

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.

See inside โ€” cosine โ†’ logit โ†’ sigmoid, plus the softmax CLIP would use

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.

Run a scoring to see the raw numbers.

Why it matters

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.

Use cases

Basics

Feel independent sigmoids, and watch one image line up with the same concept across languages.

Practical

Multi-label auto-tagging and threshold-based moderation with labels in any language.

Wild

A live cross-lingual concept meter and an aesthetic/vibe score.

Multi-model

Score the same image with SigLIP 2 and English-only CLIP side by side.

How the API works

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.

References