/ Модель

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

Контекст
512 токенов
Параметры
136 млн
Лицензия
CC BY-NC-SA 4.0
Архитектура
bert · dense
Опубликована
3 мая 2024

dragon-bert-base-mixed-domain

Заполнение пропусковТекст → текст

Нидерландская BERT-модель, обученная на клинических отчетах для заполнения пропусков и дообучения на задачах медицинского NLP.

116скачиваний за 30 дней0лайковвеса обновлены23 мая 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

DRAGON BERT base mixed-domain — модель Joeran Bosma и соавторов, дообученная на нидерландских клинических отчетах с целью masked language modeling. Она основана на bert-base-multilingual-cased и использует его токенизатор; архитектура — BERT для предсказания замаскированных токенов, размер по метаданным — 136,3 млн параметров, контекст — до 512 токенов.

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

Возможны смещения в предсказаниях, которые могут передаваться дообученным версиям. Лицензия — CC BY-NC-SA 4.0; условия требуют указания авторства и распространения производных материалов на аналогичных условиях, а коммерческое использование запрещено.

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

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

Ограничения

Модель преимущественно предназначена для дообучения на конкретной задаче и не подходит для авторегрессионной генерации текста. Предсказания могут быть смещёнными; контекст ограничен 512 токенами.

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

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

Открыть на Hugging Face

DRAGON BERT base mixed-domain

Pretrained model on Dutch clinical reports using a masked language modeling (MLM) objective. It was introduced in this paper. The model was first pretrained using general domain data, as specified here. The pretrained model was taken from HuggingFace: bert-base-multilingual-cased. Subsequently, the model was pretrained using domain-specific data (i.e., clinical reports). The tokenizer of bert-base-multilingual-cased was used.

Model description

BERT is a transformers model that was pretrained on a large corpus of Dutch clinical reports in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labeling them in any way with an automatic process to generate inputs and labels from those texts.

This way, the model learns an inner representation of the Dutch medical language that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled reports, for instance, you can train a standard classifier using the features produced by the BERT model as inputs.

Model variations

Multiple architectures were pretrained for the DRAGON challenge.

Model#paramsLanguage
joeranbosma/dragon-bert-base-mixed-domain109MDutch → Dutch
joeranbosma/dragon-roberta-base-mixed-domain278MMultiple → Dutch
joeranbosma/dragon-roberta-large-mixed-domain560MMultiple → Dutch
joeranbosma/dragon-longformer-base-mixed-domain149MEnglish → Dutch
joeranbosma/dragon-longformer-large-mixed-domain435MEnglish → Dutch
joeranbosma/dragon-bert-base-domain-specific109MDutch
joeranbosma/dragon-roberta-base-domain-specific278MDutch
joeranbosma/dragon-roberta-large-domain-specific560MDutch
joeranbosma/dragon-longformer-base-domain-specific149MDutch
joeranbosma/dragon-longformer-large-domain-specific435MDutch

Intended uses & limitations

You can use the raw model for masked language modeling, but it's mostly intended to be fine-tuned on a downstream task.

Note that this model is primarily aimed at being fine-tuned on tasks that use the whole text (e.g., a clinical report) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2.

How to use

You can use this model directly with a pipeline for masked language modeling:

from transformers import pipeline
unmasker = pipeline("fill-mask", model="joeranbosma/dragon-bert-base-mixed-domain")
unmasker("Dit onderzoek geen aanwijzingen voor significant carcinoom. PIRADS <mask>.")

Here is how to use this model to get the features of a given text in PyTorch:

from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("joeranbosma/dragon-bert-base-mixed-domain")
model = AutoModel.from_pretrained("joeranbosma/dragon-bert-base-mixed-domain")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors="pt")
output = model(**encoded_input)

Limitations and bias

Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions. This bias will also affect all fine-tuned versions of this model.

Training data

For pretraining, 4,333,201 clinical reports (466,351 consecutive patients) were selected from Ziekenhuisgroep Twente from patients with a diagnostic or interventional visit between 13 July 2000 and 25 April 2023. 180,439 duplicate clinical reports (179,808 patients) were excluded, resulting in 4,152,762 included reports (463,692 patients). These reports were split into training (80%, 3,322,209 reports), validation (10%, 415,276 reports), and testing (10%, 415,277 reports). The testing reports were set aside for future analysis and are not used for pretraining.

Training procedure

Pretraining

The model was pretrained using masked language modeling (MLM): taking a sentence, the model randomly masks 15% of the words in the input then runs the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally masks the future tokens. It allows the model to learn a bidirectional representation of the sentence.

The details of the masking procedure for each sentence are the following:

  • 15% of the tokens are masked.
  • In 80% of the cases, the masked tokens are replaced by [MASK].
  • In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace.
  • In the 10% remaining cases, the masked tokens are left as is.

The HuggingFace implementation was used for pretraining: run_mlm.py.

Pretraining hyperparameters

The following hyperparameters were used during pretraining:

  • learning_rate: 5e-05
  • train_batch_size: 4
  • eval_batch_size: 4
  • seed: 42
  • gradient_accumulation_steps: 4
  • total_train_batch_size: 16
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 3.0
  • max_seq_length: 512

Framework versions

  • Transformers 4.29.0.dev0
  • Pytorch 2.0.0+cu117
  • Datasets 2.11.0
  • Tokenizers 0.13.3

Evaluation results

This model was evaluated on the DRAGON benchmark for clinical NLP.

Citation

If you are using DRAGON resources, please cite the following article:

J. S. Bosma, K. Dercksen, L. Builtjes, R. André, C, Roest, S. J. Fransen, C. R. Noordman, M. Navarro-Padilla, J. Lefkes, N. Alves, M. J. J. de Grauw, L. van Eekelen, J. M. A. Spronck, M. Schuurmans, A. Saha, J. J. Twilt, W. Aswolinskiy, W. Hendrix, B. de Wilde, D. Geijs, J. Veltman, D. Yakar, M. de Rooij, F. Ciompi, A. Hering, J. Geerdink, and H. Huisman on behalf of the DRAGON consortium. The DRAGON benchmark for clinical NLP. npj Digital Medicine 8, 289 (2025). https://doi.org/10.1038/s41746-025-01626-x

Download the citation file for your reference manager: BibTeX | RIS

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

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

GPU в ailist

Универсальный рантайм · fill-mask

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

Подбираем GPU…

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

0 моделей