← All models

zero-shot NER · text · WASM · ~183 MB

Zero-shot entity extraction (GLiNER)

The built NER models only know a fixed handful of classes (person, org, location…). GLiNER extracts entities of any types you name — type medication, spaceship, or price and it finds them, with no retraining. It scores every candidate word-span against your entity-type prompts. Edit the text and the types below and watch the tags change. Runs entirely on your device.

At a glance

Modelonnx-community/gliner_small-v2.1 (GLiNER small v2.1) — a single deberta-v3-small span encoder
Tasktoken-classification (zero-shot / open-vocabulary NER) — run via raw ONNX Runtime Web (see note below)
Runtimeonnxruntime-web 1.21 (transformers.js has no GLiNER pipeline) + a transformers.js tokenizer
Inputtext + a list of entity types, encoded as <<ENT>> type … <<SEP>> words with span indices
Outputa relevance score per (word-span × type); sigmoid + greedy non-overlapping (or nested) selection → tagged spans
Quantizationq8 (model_quantized.onnx) — runs on the plain WASM backend, no WebGPU needed
Download~183 MB, cached after first load (auto-inits on return)
LicenseApache-2.0 (GLiNER) — the weights stay Apache-2.0 wherever converted
Web APIsWebAssembly, Web Workers — all Baseline widely available

Extract

Why raw ONNX Runtime Web?

transformers.js has no GLiNER pipeline, so we run the ONNX graph directly with onnxruntime-web and tokenize with a transformers.js tokenizer. The preprocessing and span decoding faithfully reimplement the MIT-licensed gliner library — build the <<ENT>>…<<SEP>> prompt, enumerate candidate spans, score each against each type, then greedily keep the highest-scoring non-overlapping ones. It was proven correct against known sentences before shipping. Everything runs on your device.

Use-case ladder