token-classification · text · CPU WASM q8 · 65.77 MB · Apache-2.0

DistilBERT-NER — Live Entity Tagger & Diagnostics Lab

A 66M-parameter DistilBERT fine-tuned on CoNLL-2003 that finds people, organizations, locations and miscellaneous names in English text — running entirely in a Web Worker on your device in tens of milliseconds, with every WordPiece, BIO tag and probability open for inspection.

At a glance

Pipeline tasktoken-classification
ArchitectureDistilBERT (6 layers) · 66M params
Artifact & quantmodel_quantized.onnx · q8 · 65.77 MB
BackendCPU WASM (Web Worker)
Labels9 BIO · PER ORG LOC MISC
Training dataCoNLL-2003 English (Reuters)
Card evalF1 0.9217 · P 0.9202 · R 0.9232
LicenseApache-2.0
RuntimeTransformers.js 3.7.5
Web APIsWorkers · WebAssembly · Cache Storage

Run it — live entity tagger

Pick a grounded preset, type your own text, or load a local .txt file:

Presets run automatically once the model is ready; edits run when you press Tag entities.

Show entity types:

Pipeline latency–
Entities shown–
WordPieces / words–
Sub-token disagreements–
Softmax ↔ pipeline parity–
NaN check–
Backend · dtypeWASM · q8
PER · Person ORG · Organization LOC · Location MISC · Miscellaneous
Initialise the model above to tag entities live.

Merged entities

Merged entity spans with type, text, confidence, character span and WordPiece count
# Type Entity Confidence Char span Words · pieces
Run the tagger to list entities.

See inside — every WordPiece and its BIO tag

This is the raw token-classification output (called with ignore_labels: [] so O tokens are kept) plus the full 9-way softmax from the same model. Rows whose word's sub-tokens disagree on entity type are tinted — that is exactly where the word strategy above changes the answer (try the Science preset: So leans LOC while ##rbonne leans ORG).

Per-WordPiece BIO predictions with score, character span and top-3 alternatives
Index WordPiece BIO label Score Char span Top-3 of 9 labels
No tokens yet.

Why it matters

Honest limits: CoNLL-2003 is cased English Reuters news from 1996. The model relies heavily on capitalisation (lowercase text loses almost every entity — measured live on the Basics rung), and it has no labels for dates, money, emails or phone numbers.

Use-case ladder

Basics

Cased vs ALL-CAPS vs lowercase fragility and a live WordPiece BIO merge inspector.

Open Basics →

Practical

Batch news & briefing extractor with file upload, master entity index and CSV / JSON / CoNLL export.

Open Practical →

Wild

Keyboard-navigable entity co-occurrence network plus one-click selective redaction by class.

Open Wild →

Multi-model

Stage 1 NER feeds each entity's sentence into DeBERTa-v3 NLI for role, sentiment and topic.

Open Multi-model →

How the API works

import { TRANSFORMERS_URL } from "/lib/webai.js"; // shared Transformers.js 3.7.5 pin
const { pipeline } = await import(TRANSFORMERS_URL);

const ner = await pipeline("token-classification", "onnx-community/distilbert-NER-ONNX", {
  device: "wasm",
  dtype: "q8", // onnx/model_quantized.onnx, 65.77 MB
});
const tokens = await ner("Marie Curie worked in Paris.", { ignore_labels: [] });
// → [{ entity: "B-PER", score: 0.997, index: 1, word: "Marie" },
//    { entity: "I-PER", score: 0.995, index: 2, word: "C" }, { …, word: "##uri" }, …]
// 3.7.5 returns no character offsets, so ner-core.mjs aligns pieces and merges BIO spans.
Show the code — worker.js: runOne() (pipeline call, softmax parity, chunked offsets)
Show the code — ner-core.mjs: groupWordPieces() (first / max / average strategies)
Show the code — ner-core.mjs: bioMerge() (B-/I- span merging rules)

References