/ Модель

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

Контекст
8 192 токена
Параметры
307 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Базовая модель
mmBERT-base
Библиотека
openmed
Опубликована
30 окт 2026

mmBERT-ClinicalNER-Disease-Spanish-Base-v1

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

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

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

Модель OpenMed находит и размечает упоминания заболеваний в испанских клинических текстах с точными символьными смещениями.

OpenMed mmBERT ClinicalNER Disease Spanish Base v1 — модель извлечения упоминаний заболеваний из испанских клинических текстов, разработанная OpenMed на основе jhu-clsp/mmBERT-base. Это энкодер ModernBERT с 306,9 млн параметров, дообученный для разметки токенов одной меткой Disease; он возвращает точные фрагменты текста, символьные смещения и оценки уверенности. Контекст модели — до 8192 токенов.

Модель предназначена для поиска заболеваний в клинических публикациях и может использоваться для извлечения упоминаний из медицинских текстов, включая длинные записи. Она работает локально на CPU, также поддерживает запуск на GPU через OpenMed SDK. Обучение и оценка проводились на испанских клинических историях болезни из DisTEMIST; на описанном тестовом наборе F1 составил 69,96.

Модель поддерживает только испанский язык и одну метку. Она может выделять упоминания заболеваний даже при отрицании, не нормализует их в коды SNOMED CT или ICD-10 и не предназначена для диагностики. В README отмечены ограничения переноса на больничные записи, некалиброванные оценки уверенности и невозможность одновременно возвращать вложенные упоминания при плоской разметке. Лицензия — Apache-2.0.

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

  • извлечение названий заболеваний из испанских клинических публикаций
  • поиск диагнозов и болезней в клинических историях болезни
  • разметка упоминаний заболеваний с точными границами фрагментов
  • ранжирование найденных упоминаний по оценке модели

Ограничения

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

OpenMed's open model for finding diseases in Spanish clinical text. It returns every disease mention in Spanish clinical text with exact character offsets and a confidence score. Trained and evaluated by OpenMed. Apache-2.0, runs on CPU.

Developed byOpenMed
TaskDisease mention extraction, one label: Disease
Outputtext, start, end, score; text[start:end] is the exact span
Parameters308M
DecodingHighest-scoring tag per token, no threshold
LanguageSpanish
LicenseApache-2.0

About OpenMed

OpenMed builds open models and open-source tools for clinical and biomedical text that run on your own hardware.

Quick start

pip install -U "openmed[hf]"  # OpenMed 3.1 or later
from openmed import analyze_text

text = (
    "Varón de 67 años con diabetes mellitus tipo 2, "
    "enfermedad renal crónica estadio 3 y fibrilación "
    "auricular, que ingresa por una neumonía adquirida en "
    "la comunidad."
)
result = analyze_text(
    text,
    model_id="OpenMed/mmBERT-ClinicalNER-Disease-Spanish-Base-v1",
    sentence_language="es",
)
for e in result.entities:
    print(e.start, e.end, e.text, f"{e.confidence:.2f}")
21 45 diabetes mellitus tipo 2 1.00
47 71 enfermedad renal crónica 1.00
84 105 fibrilación auricular 1.00
127 135 neumonía 1.00

Long notes, many notes, GPU

  • Pass a whole note: analyze_text splits it into sentences (sentence_language="es") and returns offsets into the original text.
  • The model loads once and stays cached, so call analyze_text in a loop for many notes.
  • On a GPU, pass config=OpenMedConfig(device="cuda") (from openmed import OpenMedConfig).

Evaluation

DisTEMIST, 150 held-out documents: Spanish clinical case reports with 1,723 human-annotated disease mentions, nested ones included. The model was trained on 452 other DisTEMIST documents, its settings were chosen on 148 more, and these 150 were scored once at the end. A prediction counts only if its character span matches exactly. The official DisTEMIST test set was not used, so these numbers are not comparable to the shared-task leaderboard.

ModelPrecisionRecallF1
OpenMed mmBERT ClinicalNER Disease Spanish Base v1 (this model)67.1173.0769.96
Reference, no Spanish disease training: fastino/gliner2.5-multi-v1, threshold 0.738.1440.0539.07

jhu-clsp/mmBERT-base has no disease tagger before fine-tuning, so the reference is the multilingual GLiNER2.5 extractor on the same documents. This model scores +30.9 F1 points above it (95% CI +27.9 to +33.6, paired bootstrap over 142 groups of documents from the same publication).

The OpenMed Spanish disease models

Same training documents, same test documents, each model at its default setting.

ModelParametersPrecisionRecallF1
OpenMed GLiNER2.5 ClinicalNER Disease Spanish v1287M74.5372.0373.26
OpenMed mmBERT ClinicalNER Disease Spanish Base v1 (this model)308M67.1173.0769.96

Examples

Real outputs of this model through the OpenMed SDK, with default settings, on CPU. The sentences are synthetic, written in Spanish for this card. Extracted spans are in bold with their scores.

  1. Clinical note: Varón de 67 años con diabetes mellitus tipo 21.00, enfermedad renal crónica1.00 estadio 3 y fibrilación auricular1.00, que ingresa por una neumonía1.00 adquirida en la comunidad.
  2. Abbreviations: Antecedentes: HTA1.00, DM21.00, EPOC0.98 e IC0.62. Ingresa por una reagudización de EPOC1.00.
  3. Oncology genetics: Las variantes germinales de BRCA1 y BRCA2 aumentan el riesgo de cáncer de mama1.00 y de cáncer de ovario1.00.
  4. Rare inherited disease: La poliquistosis renal autosómica dominante1.00 es la causa hereditaria más frecuente de enfermedad renal terminal1.00.
  5. Adverse drug events: Dos pacientes presentaron una hepatotoxicidad inducida por fármacos1.00 y uno un síndrome de Stevens-Johnson1.00 tras iniciar el nuevo tratamiento.
  6. Neurology differential: La resonancia magnética era compatible con esclerosis múltiple1.00; la neuromielitis óptica1.00 y la encefalomielitis aguda diseminada1.00 se consideraron menos probables.
  7. Hematology: La biopsia confirmó un linfoma difuso de células B grandes1.00 en una paciente con síndrome de Sjögren1.00 y anemia hemolítica autoinmune1.00 de larga evolución.
  8. Infection before biologics: Se trató una tuberculosis latente1.00 antes de iniciar adalimumab por su artritis reumatoide1.00.
  9. Newborn screening: El cribado neonatal detectó fibrosis quística1.00, hipotiroidismo congénito1.00 y fenilcetonuria1.00, pendientes de confirmación.
  10. Cardiology: El ecocardiograma mostró una miocardiopatía hipertrófica1.00 con insuficiencia mitral moderada1.00, sin derrame pericárdico1.00.
  11. Negation and family history: Sin antecedentes de asma1.00 ni de epilepsia1.00. Su madre padecía la enfermedad de Huntington1.00.
  12. Medications only: Se inicia metformina 850 mg cada 12 horas y enalapril 10 mg al día; control en cuatro semanas. (nothing extracted)

A longer note (1,246 characters, 22 spans) in one analyze_text call:

INFORME DE ALTA
Motivo de ingreso: mujer de 72 años con insuficiencia cardiaca con fracción de eyección reducida, enfermedad pulmonar obstructiva crónica y diabetes mellitus tipo 2 que consulta por disnea progresiva de tres días, ortopnea y edemas en ambas piernas.
Evolución: la radiografía de tórax mostró edema pulmonar y un pequeño derrame pleural derecho. La troponina estaba levemente elevada sin curva, y se descartó un síndrome coronario agudo. Se trató con furosemida intravenosa. Al segundo día presentó una insuficiencia renal aguda, que mejoró al reducir la dosis del diurético. Una infección urinaria se trató con fosfomicina. El ingreso se complicó además con un delirium, resuelto al alta.
Antecedentes: hipertensión arterial, dislipemia, artrosis de ambas rodillas, enfermedad por reflujo gastroesofágico y un cáncer de mama tratado hace años con tumorectomía y radioterapia. Sin antecedentes de ictus. Su padre falleció de un cáncer colorrectal.
Diagnósticos al alta: insuficiencia cardiaca descompensada; insuficiencia renal aguda, resuelta; infección urinaria; delirium, resuelto.
Seguimiento: consulta de cardiología en dos semanas con analítica de control; descartar apnea del sueño y anemia ferropénica de forma ambulatoria.

Good to know

  • It finds mentions, including negated ones: Sin antecedentes de asma ni de epilepsia still returns asma and epilepsia (example 11). OpenMed's assert_context rules are written for English and have not been validated on Spanish, so check negation and family history yourself.
  • Abbreviations work: HTA, DM2, EPOC and IC are found in example 2 (IC with a lower score, 0.62).
  • Scores are averaged tag probabilities and sit near 1.00 (30 of 32 example spans round to 1.00), so use them to rank spans, not as calibrated probabilities.
  • It tags tokens with one flat label sequence, so it returns one mention where the annotators marked a mention inside another; the evaluation still counts every annotated mention.
  • Symptoms are not diseases: disnea, ortopnea and edemas in the longer note are not returned, following the DisTEMIST annotation guidelines.
  • Drug names are not diseases: example 12 returns nothing.

Limitations

  • Trained and tested on Spanish clinical case reports published in the medical literature (DisTEMIST). It has not been validated on hospital notes; the notes above are synthetic.
  • Spanish only, one label. Other labels and the base model's other tasks were not evaluated after fine-tuning.
  • No normalization: spans are not mapped to SNOMED CT or ICD-10 codes.
  • It finds text spans. It does not diagnose anything and is not a medical device.

Built on

OpenMed fine-tuned this model from jhu-clsp/mmBERT-base by Johns Hopkins University CLSP (MIT), built with the open-source Transformers library. Training and evaluation data: the DisTEMIST corpus of Spanish clinical case reports by Miranda-Escalada et al. (CC BY 4.0). Thank you to Johns Hopkins University CLSP and to the DisTEMIST authors for releasing their work openly.

This model is released under Apache-2.0. No corpus text is included in this repository.

Citation

@misc{panahi2025openmedner,
  title={OpenMed NER: Open-Source, Domain-Adapted State-of-the-Art Transformers for Biomedical NER Across 12 Public Datasets},
  author={Maziyar Panahi},
  year={2025},
  eprint={2508.01630},
  archivePrefix={arXiv}
}

@inproceedings{miranda2022overview,
  title={Overview of DisTEMIST at BioASQ: Automatic detection and normalization of diseases from clinical texts: results, methods, evaluation and multilingual resources},
  author={Miranda-Escalada, Antonio and Gasc{\'o}, Luis and Lima-L{\'o}pez, Salvador and Farr{\'e}-Maduell, Eul{\`a}lia and Estrada, Darryl and Nentidis, Anastasios and Krithara, Anastasia and Katsimpras, Georgios and Paliouras, Georgios and Krallinger, Martin},
  booktitle={Working Notes of the Conference and Labs of the Evaluation Forum (CLEF), CEUR Workshop Proceedings},
  year={2022}
}

@misc{marone2025mmbert,
  title={mmBERT: A Modern Multilingual Encoder with Annealed Language Learning},
  author={Marc Marone and Orion Weller and William Fleshman and Eugene Yang and Dawn Lawrie and Benjamin Van Durme},
  year={2025},
  eprint={2509.06888},
  archivePrefix={arXiv}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertForTokenClassification
Ревизия весов
1c01344

0 моделей