At a glance
| Upstream model | OpenMed/OpenMed-NER-DiseaseDetect-BioMed-335M |
|---|---|
| Browser ONNX build |
onnx-community/OpenMed-NER-DiseaseDetect-BioMed-335M-ONNX
· onnx/model_quantized.onnx
|
| Task / pipeline |
token-classification with { ignore_labels: [] } ·
id2label: {"0":"O","1":"B-DISEASE","2":"I-DISEASE"}
|
| Architecture |
BertForTokenClassification (24 layers · 16 heads · 1024 hidden · 4096 FFN ·
max_position_embeddings: 512)
|
| Tokenizer & vocab |
BertTokenizer (do_lower_case: true) · config.json
vocab_size: 30,522 · tokenizer.json 28,895 WordPiece tokens
|
| BC5CDR_DISEASE card eval | F1 0.9005 · Precision 0.8887 · Recall 0.9126 · Accuracy 0.9838 (1,500 PubMed abstracts, 5,818 entities) |
| Quantization & exact bytes |
q8 · 336.51 MB (335,827,631 B ONNX +
679,168 B tokenizer.json + 2,988 B configs = 336,509,787 B)
|
| Runtime & backend |
Shared @huggingface/transformers@3.7.5 via ../../lib/webai.js on
WebAssembly (wasm) in a module Web Worker
|
| License | apache-2.0 |
Interactive disease entity extraction lab
Prepare the model above to extract disease spans.
Extracted DISEASE spans
See inside: WordPiece BIO tags & raw 3-class logits
The 24-layer uncased BERT-Large head outputs three logits per WordPiece token: O,
B-DISEASE, and I-DISEASE. Inspecting both the merged WordPiece strip and the
raw per-token logit/probability table reveals how subword continuations (##) assemble into
complete disease spans.
| # | WordPiece | BIO Tag | Top Score | O prob (logit) | B-DISEASE prob (logit) | I-DISEASE prob (logit) |
|---|---|---|---|---|---|---|
| Run extraction to inspect per-token probabilities and logits. | ||||||
Why it matters
Running a 335M biomedical disease extractor directly inside the visitor's browser unlocks private literature curation, pharmacovigilance screening, and pre-ingestion EHR tagging without transmitting clinical text over the network.
- Literature curation — extract normalized disease lexicons from PubMed abstracts offline.
- Zero-egress clinical NLP — combine with local PHI scrubbing before downstream disease indexing.
- Transparent probability thresholds — tune recall vs precision interactively with full token logits.
Use-case ladder
Basics · BIO & thresholds
Inspect B-DISEASE vs orphan I-DISEASE repair ablation, sweep 0.50–0.95 thresholds, and test >512-token truncation.
Practical · Batch lexicon
Upload CSV/JSON/MD/TXT abstracts with ragged auto-column detection, mid-batch cancel, deduplicated lexicon, and formula-safe exports.
Wild · Edge probes
Stress-test ambiguous abbreviations (MS/PE/SLE/CHF/CAD), negation scope, anatomy boundaries, and typos/cognates live.
Multi-model · DeID → Disease NER
Stage 1 Clinical DeID-BERT scrubs HIPAA PHI locally; Stage 2 OpenMed DiseaseDetect extracts diseases from the sanitized note.