← All models

token-classification Β· text Β· WASM Β· ~67 MB

Biomedical NER β€” read a clinical note like a clinician

General named-entity recognition knows people, places and organizations. This one knows medicine. It labels each span in clinical and biomedical text with one of 40+ domain entity types β€” a diseaseDisease disorder, a drugMedication, a lab valueLab value, a procedureDiagnostic procedure β€” that generic NER would miss entirely. Paste a case note and watch it light up. All on your device.

At a glance

Modelonnx-community/biomedical-ner-all-ONNX (ONNX of d4data/biomedical-ner-all)
Task / pipelinetoken-classification
LabelsBIO tags over 43 biomedical entity types β€” Disease_disorder, Sign_symptom, Medication, Dosage, Diagnostic_procedure, Lab_value, Biological_structure, Severity, Age, Sex, Date… (trained on the MACCROBAT clinical-case corpus)
ArchitectureDistilBERT (6 layers, ~65M params) fine-tuned for biomedical NER
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~67 MB, cached after first load
LicenseApache-2.0
Web APIsWebAssembly, Web Workers β€” all Baseline widely available

Run it

Type or paste clinical / biomedical text. Entities are highlighted inline a moment after you stop typing; hover a highlight for its exact type and confidence.

See inside β€” per-token tags and the entity mix

The model doesn't see "myocardial infarction" as one thing β€” it tags each WordPiece token independently: B-Disease_disorder (begin), I-Disease_disorder (inside), and so on, across 43 types. We stitch consecutive B-/I- runs into whole entities. Below are the raw per-token tags and confidences straight from the model, then the mix of entity groups it found β€” a one-glance profile of what the text is about.

Why it matters

A generic NER model tells you a note mentions a person and a place. A biomedical one tells you the diagnosis, the drug, the dose, and the lab value β€” the structured clinical facts a downstream system can actually act on. Doing it in the browser means you can mine or de-identify clinical text without a single byte leaving the device β€” the difference between "possible" and "compliant" for regulated health data.

A research/education demo β€” not a medical device, and not for clinical decisions. Model output is probabilistic and will make mistakes; the confidence scores are shown for exactly that reason.

Use cases

Basics

Paste clinical text and see 40+ biomedical entity types highlighted inline with confidences.

Practical

Extract a structured problem/medication/finding list, and de-identify Age/Sex/Date/person spans on-device.

Wild

Drug–event radar: scan dense clinical text for a medication and an adverse sign co-occurring.

Multi-model

Tag the entities, then group near-duplicate mentions by meaning with MiniLM embeddings.

How the API works

Token classification is one pipeline call β€” only the model id is domain-specific:

import { pipeline } from "@huggingface/transformers";

const ner = await pipeline("token-classification", "onnx-community/biomedical-ner-all-ONNX", { dtype: "q8" });
const out = await ner("started on aspirin 300mg for chest pain");
// β†’ [{ entity: "B-Medication", word: "aspirin", score: 0.99, index: 3 },
//    { entity: "B-Dosage", word: "300", score: 0.99, index: 4 },
//    { entity: "I-Dosage", word: "##mg", score: 0.99, index: 5 },
//    { entity: "B-Sign_symptom", word: "chest", score: 0.99, index: 7 },
//    { entity: "I-Sign_symptom", word: "pain", score: 0.99, index: 8 }]

The pipeline returns one BIO-tagged row per WordPiece token, but no character offsets. We map each token back to its span in the original text (a cursor-walk) so highlights land exactly, then merge B-/I- runs (and ## sub-word pieces) into whole entities with a pooled confidence. Because there are 43 fine-grained types, the UI colours them by eight clinically meaningful groups (condition, anatomy, procedure, medication, measurement, temporal, person, descriptor) while always showing the exact type. It all runs in a Web Worker so typing stays smooth.

References