use case · basics · GLiNER Small v2.1 · onnxruntime-web · WASM · ~183 MB

Custom Entity Schema & Span-Score Inspector

Every forward pass of GLiNER Small v2.1 scores every candidate word-span (up to width 12) against your arbitrary entity-type prompts. Build a custom schema below, run one on-device pass retaining raw detections down to 0.15, and scrub the confidence threshold or toggle Flat vs Nested NER instantly without losing raw spans.

1 · Model & domain schema builder

Prepare GLiNER Small v2.1 above to extract custom entity schemas on-device.

Active entity schema (click a chip to remove it):

0.40

Filters the raw >= 0.15 candidate pool instantly without re-running ONNX.

Span overlap resolution mode

Nested mode preserves inner entities contained inside wider spans (rejecting partial crossings).

2 · Highlighted inline text & span-score table

Kept spans–
Raw pool (>=0.15)–
Words / Tokens–
Candidate spans–
Latency–
BackendWASM · q8
# Span text Entity label Confidence Char offsets Resolution
Run GLiNER above to inspect every scored span and offset.

3 · Inside the ONNX span encoder & Flat/Nested resolver

Inspect the exact raw ONNX Runtime Web prompt/span tensor pipeline in worker.js and the deterministic Flat/Nested span resolver in gliner-core.mjs.

Show the code — GLiNER ONNX Runtime Web prompt, span tensors & sigmoid decode
Show the code — Flat vs Nested non-crossing span resolver