/ Модель

Характеристики

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Библиотека
transformers
Опубликована
17 ноя 2026

biomedical-ner-chemical-disease

Разметка токеновТекст → label3 профессии
272скачиваний за 30 дней1лайквеса обновлены1 дек 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

BERT-модель извлекает упоминания химических веществ и заболеваний из англоязычных биомедицинских текстов.

quorumbio разработала модель распознавания биомедицинских сущностей на основе BERT, дообученную от microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext. Модель содержит 136,7 млн параметров по метаданным и принимает английский текст, размечая упоминания химических веществ и заболеваний. Она обучена на BC5CDR и NCBI-disease; максимальная длина контекста составляет 512 токенов.

Модель предназначена для извлечения химических веществ и заболеваний из биомедицинских публикаций, в частности аннотаций PubMed. В карточке приведены результаты на тестовых выборках: F1 0,889 для BC5CDR и 0,878 для NCBI-disease. Репозиторий включает веса Safetensors и ONNX, в том числе динамически квантованный вариант int8. Лицензия — Apache-2.0.

Модель поддерживает только английский язык и два типа сущностей; она не связывает их с идентификаторами MeSH. Обучение на аннотациях PubMed может ограничивать точность на клинических записях, полном тексте статей и других жанрах; границы составных и разрывных упоминаний могут определяться несовершенно. Модель не проверена для клинического или диагностического применения.

Сценарии применения

  • извлечение названий химических веществ из аннотаций PubMed
  • распознавание заболеваний в биомедицинских публикациях
  • автоматическая разметка сущностей в корпусах BC5CDR и NCBI-disease
  • подготовка биомедицинских текстов для поиска и последующего анализа

Ограничения

Модель работает только с английским языком и двумя типами сущностей, не выполняет нормализацию по MeSH и может хуже работать на клинических записях, полном тексте и других жанрах. Она не проверена для клинического или диагностического применения; границы составных и разрывных упоминаний определяются несовершенно.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Biomedical NER: Chemical and Disease (BiomedBERT-base, Apache-2.0)

Token-classification model that tags Chemical and Disease mentions in English biomedical text. 108.9M parameters, fine-tuned from microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext on the BC5CDR and NCBI-disease training sets. ONNX (fp32 and int8) files are included.

Version note. This is v2 (trained on BC5CDR + NCBI-disease). v1 (BC5CDR only) is kept as the git revision v1.0 of this repo.

Need genes, species, variants or cell lines too? See quorumbio/biomedical-ner-gene-chemical-disease-species, which tags six types in one pass and scores about the same as this model on BC5CDR (slightly lower on NCBI-disease).

Use

from transformers import pipeline
ner = pipeline("token-classification", model="quorumbio/biomedical-ner-chemical-disease", aggregation_strategy="simple")
ner("Naloxone reverses the antihypertensive effect of clonidine.")

ONNX: onnx/model.onnx (fp32, 435.8 MB) and onnx/model_quantized.onnx (dynamic int8, 109.7 MB), inputs input_ids, attention_mask, token_type_ids, output logits. Tokenize with the tokenizer in this repo.

Results

Entity-level precision / recall / F1 (seqeval) on words from a simple regex tokenizer, sentence-split input, test splits scored once. The checkpoint was chosen on the validation sets (best mean validation entity F1 across the two corpora, epoch 5). The released checkpoint is seed 13; seed variation is measured below.

Test setEntity types scoredP / R / F1v1 (BC5CDR only) F1
BC5CDR (500 abstracts)Chemical, Disease0.881 / 0.897 / 0.8890.896
NCBI-disease (100 abstracts)Disease0.859 / 0.898 / 0.8780.735 (never trained on this corpus)

BC5CDR per type (P / R / F1): Chemical 0.927 / 0.916 / 0.922; Disease 0.828 / 0.875 / 0.850.

NCBI-disease annotates Disease only, so on that test set predicted Chemical mentions are dropped before scoring. Adding NCBI-disease to training lowered BC5CDR F1 slightly (v1, a single seed: 0.896; v2 over 5 seeds: 0.889 ± 0.002, so the drop looks real but small) and raised NCBI-disease F1 a lot, which is expected since it is now in-domain. We also tried ignoring O labels for NCBI sentences (to avoid penalizing unlabeled chemicals); that variant collapsed precision on NCBI-disease (F1 0.427) and was discarded.

Seed variation

We retrained v2 with the same data and settings using 4 more seeds (1, 2, 3, 4), chosen before training. All 5 runs (with the released seed 13) are reported, none dropped. Numbers are test entity F1 from the training script's own evaluation: same seqeval metric, but a different input path from the pipeline-based table above, which is why seed 13 shows 0.870 on NCBI-disease here and 0.878 there.

Test setMean ± SDRange
BC5CDR0.889 ± 0.0020.887 to 0.891
NCBI-disease0.872 ± 0.0020.870 to 0.875

The released checkpoint is typical, not a lucky seed. These intervals cover training randomness only, not uncertainty from the small test sets (NCBI-disease test has 100 abstracts). Per-seed values: seed_results.json.

Test-set uncertainty

The seed variation above covers training randomness only. To show how much the test sets limit precision, we bootstrapped whole test abstracts, with 2000 resamples, for the released checkpoint on the pipeline path of the main table. 95% percentile intervals for entity F1:

Test setF195% interval
BC5CDR (500 abstracts), all types0.8890.879 to 0.898
BC5CDR, Chemical0.9220.909 to 0.934
BC5CDR, Disease0.8500.836 to 0.863
NCBI-disease (100 abstracts), Disease0.8780.851 to 0.904

v1 vs v2 on BC5CDR, paired on the same resampled abstracts: v2 minus v1 F1 = -0.0069 (95% interval -0.0121 to -0.0020). v2 scored lower in 99.5% of resamples, so the drop is small but consistent. Details: bootstrap_ci.json; script: training/bootstrap_ner.py.

Runtime check (ONNX via onnxruntime, CPU)BC5CDR F1NCBI-disease F1ms/sentenceSize
fp320.8890.87824.47435.8 MB
int8 (dynamic quantization)0.8860.87913.63109.7 MB

fp32 ONNX vs PyTorch: max absolute logit difference 3.43e-05, token argmax agreement 1.0000 on 300 BC5CDR sentences.

Comparison with d4data/biomedical-ner-all

We ran d4data/biomedical-ner-all through the same pipeline and scoring (the v1 numbers below are from that run; v2 is in the table above). It is a general clinical model with 84 entity types that was not trained on either corpus, so its labels do not line up and we mapped them ourselves, which affects its score. Strict mapping (Disease_disorder to Disease, Medication to Chemical): BC5CDR F1 0.479 (P 0.629, R 0.386); NCBI-disease Disease F1 0.377 (P 0.502, R 0.302). Generous mapping (also Sign_symptom to Disease): BC5CDR F1 0.533; NCBI-disease F1 0.329. Our model was trained on these corpora's training splits, so this is an in-domain versus out-of-domain comparison, not evidence that our model is better in general. d4data/biomedical-ner-all (66.4M parameters) is smaller and ran faster than this model in our GPU test (13.7 s vs 17.2 s for 4821 BC5CDR sentences). Its coverage of other entity types (symptoms, procedures, doses and more) is far broader than ours.

These scores are not directly comparable to published BC5CDR or NCBI-disease numbers, which use different tokenization and scoring.

Training

training/ has the scripts and provenance.json (source URLs and SHA256). 5 epochs, batch size 16, learning rate 5e-05, max length 256, bf16 autocast, AdamW with linear warmup/decay, one NVIDIA RTX 3060 (about 5 minutes). Reproduce: python training/prepare_data.py then python training/train2.py --base microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext --out run2a (v1: train.py --corpus bc5cdr).

Limitations

  • English only, two entity types only (Chemical, Disease). No normalization to MeSH identifiers.
  • NCBI-disease has no Chemical labels, so chemicals in NCBI-disease sentences are labeled O during training. This adds some label noise for the Chemical class.
  • Trained on PubMed abstracts; expect lower accuracy on clinical notes, full text, patents, or social media.
  • Boundary conventions follow BC5CDR and NCBI-disease, which differ in places (for example disease classes and modifiers); composite and discontinuous mentions are handled imperfectly.
  • Not validated for clinical or diagnostic use. Do not use it to make medical decisions.
  • Seed variation measured with 5 seeds (above); v1 was a single seed. Test-set bootstrap intervals are above; the NCBI-disease test set is small (100 abstracts).

Data and licensing

Model weights: Apache-2.0. Base model: MIT (see NOTICE). Training data: (1) BioCreative V CDR corpus (Li et al., 2016, Database baw068): the distributors do not state an explicit license on the BioCreative page or the public GitHub mirror ("freely available for the research community"); BigBio lists it as Public Domain Mark 1.0. (2) NCBI Disease corpus (Dogan et al., 2014): distributed by NCBI under its public domain notice. If you have strict compliance needs, review the corpus terms yourself.

Files

SHA256SUMS lists checksums for every file in this repo.

Citation

If you use this model in published work, please cite it. Author: Misha Golubev (ORCID 0009-0008-8339-248X), Quorum Bio.

@misc{quorumbio2026ner_chemdis,
  author       = {Golubev, Misha},
  title        = {Biomedical NER: Chemical and Disease (BiomedBERT-base)},
  year         = {2026},
  publisher    = {Hugging Face},
  doi          = {10.57967/hf/12058},
  howpublished = {\url{https://huggingface.co/quorumbio/biomedical-ner-chemical-disease}},
  note         = {Technical report: \url{https://github.com/QuorumBio/quorum-bio/blob/main/docs/report.md}}
}

Please also cite the work it builds on:

  • Gu Y, et al. Domain-specific language model pretraining for biomedical natural language processing. ACM Trans Comput Healthcare 3(1):2 (2021).
  • Li J, et al. BioCreative V CDR task corpus: a resource for chemical disease relation extraction. Database baw068 (2016).
  • Doğan RI, Leaman R, Lu Z. NCBI disease corpus: a resource for disease name recognition and concept normalization. J Biomed Inform 47:1-10 (2014).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · token-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForTokenClassification
Ревизия весов
8f298cb

0 моделей