/ Модель

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

Контекст
514 токенов
Параметры
138 млн
Лицензия
Apache 2.0
Архитектура
roberta · dense
Библиотека
transformers
Опубликована
16 июн 2026

doctobert-fr-base

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

Франкоязычный медицинский энкодер RoBERTa для заполнения пропусков и дообучения под задачи клинического NLP.

2 021скачиваний за 30 дней8лайковвеса обновлены2 июл 2026

Бенчмарки

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

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

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

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

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

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

DoctoBERT-fr-base — франкоязычный медицинский энкодер на архитектуре RoBERTa от Doctolib Lab, предварительно обученный с нуля на корпусах FineMed-fr и FineMed-rephrased-fr. Модель предназначена для биомедицинской и клинической обработки французского текста: заполнения пропусков, а после дообучения — распознавания сущностей, классификации и поиска по медицинским текстам.

В README указано 111 млн параметров, 12 слоёв и контекст до 512 токенов; метаданные указывают 138,4 млн параметров и 514 токенов. Токенизатор SentencePiece BPE обучен на 32 768 токенах и учитывает плотную медицинскую лексику. В оценке DrBenchmark модель показала лучшие совокупные результаты среди сравниваемых энкодеров, лидируя в пяти из семи задач.

Модель не генерирует текст и рассчитана на использование как энкодер с подходящей головой задачи или после дообучения. Она не является медицинским устройством, а её результаты не должны использоваться для принятия клинических решений; возможны смещения и пробелы, унаследованные от открытых веб-, PDF- и энциклопедических источников. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

DoctoBERT-fr-base

📚 Introduction

DoctoBERT-fr-base is a French medical encoder for biomedical and clinical NLP. It uses the RoBERTa architecture (111M parameters, 512-token context) and is pretrained from scratch on FineMed-fr and FineMed-rephrased-fr. DoctoBERT leads the academic DrBenchmark, topping both aggregate metrics and five of seven tasks.

Its training data is curated from heterogeneous open web corpora (FineWeb-2, FinePDFs, FineWiki), which bring scale, source and stylistic diversity, and inherited quality control. Each document is annotated along three axes: subdomain, educational quality, and medical-term density. DoctoBERT then trains on a mix of two parts: the filtered high-quality, entity-rich documents, and LLM-rephrased variants that raise medical-term density and vary the contexts around medical terms across many genres, audiences, and registers. This breadth and density build robustness to real-world clinical text, which is often noisy and inconsistent in style.

For long-context use, see its sibling DoctoModernBERT-fr-base.

🚀 How to Use

Fill-mask

Using AutoModelForMaskedLM:

from transformers import AutoTokenizer, AutoModelForMaskedLM

model_id = "doctolib-lab/doctobert-fr-base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id)

text = f"Le patient souffre d'une {tokenizer.mask_token} aiguë."
inputs = tokenizer(text, return_tensors="pt")
logits = model(**inputs).logits

masked_index = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)
print(tokenizer.decode(logits[0, masked_index].argmax(-1)))

Using a pipeline:

from transformers import pipeline

fill = pipeline("fill-mask", model="doctolib-lab/doctobert-fr-base")
print(fill(f"Le patient souffre d'une {fill.tokenizer.mask_token} aiguë."))

Fine-tuning

DoctoBERT fine-tunes like any BERT/RoBERTa encoder, with the appropriate task head or framework:

📐 Model Overview

PropertyValue
ArchitectureRoBERTa
Parameters111M total (85M backbone, 26M embeddings)
Layers12
Hidden size768
Attention heads12
MLPGELU
Intermediate size3072
Context window512 tokens
Vocabulary size32,768
LanguageFrench

🔧 Training

The tokenizer is a SentencePiece BPE model of 32,768 tokens, trained on the entity-rich FineMed-filtered subset (educational quality >= 4 and medical-term density >= 0.1) for efficient tokenization of dense medical vocabulary. It splits digits into single tokens and uses byte fallback for unseen characters.

DoctoBERT is pretrained from scratch over two phases on a mix of FineMed-filtered (FineMed-fr under the same educational-quality and medical-term-density filter) and FineMed-rephrased-fr:

  1. Pretraining (500B tokens). Masked-language-modeling on the full mix (long documents are hierarchically chunked to fit the context window rather than truncated), building broad medical-language representations.
  2. Annealing (200B tokens). Continued training on the biomedical & clinical subdomains of the mix, focusing the final updates on content closest to downstream medical use.

📊 Evaluation

Across 11 encoders from English medical, French generalist, and French medical families, DoctoBERT-fr-base achieves the best DrBenchmark aggregate scores, leading five of seven tasks. On the real-world clinical NER task, scores cluster tightly and its long-context sibling DoctoModernBERT-fr-base achieves the best F1.

DrBenchmark

We adapted the DrBenchmark, filtered to 7 high-quality tasks: QUAERO (NER on EMEA drug leaflets and MEDLINE abstracts), E3C (clinical and temporal NER), DEFT-2021 (clinical NER), MorFITT (biomedical specialty classification), and DiaMed (clinical diagnostic classification). Per model and task, hyperparameters are tuned on the validation split, then the mean F1 over 5 test-split seeds is reported. We also report two per-model scores aggregated across all tasks: Min-Max rescales each task's scores onto a 0–100 scale before averaging, capturing the magnitude of the gaps (a model that lags on a few tasks is penalized heavily); WP (Win Probability) is the average percentage of tasks on which a model outscores each other model, capturing rank consistency (robust to outliers but blind to effect size).

Real-world Clinical NER

A proprietary French clinical NER task from a real-world production setting, annotated with 12 entity types (e.g., pathology, drug, exam, biometry) and 9 qualifiers (e.g., negation, family relationship, date). Scores are the mean over 3 test-split seeds.

⚠️ Intended Use & Limitations

DoctoBERT is an encoder for French biomedical and clinical NLP (NER, classification, retrieval), used by fine-tuning on a downstream task. It is not generative and not a medical device; its outputs must not drive clinical decisions. It was pretrained on public web, PDF, and encyclopedic medical text and reflects the biases and gaps of those sources.

⚖️ License

Released under Apache-2.0. DoctoBERT was trained on FineMed-fr and FineMed-rephrased-fr, which derive from FineWeb-2 / FinePDFs (ODC-BY 1.0) and FineWiki (CC BY-SA 4.0); please attribute those upstream sources.

🏛️ Acknowledgments

This work was granted access to the HPC resources of IDRIS (Jean Zay) under the allocations 2025-AD011016291 and 2026-A0200617487 made by GENCI.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
RobertaForMaskedLM
Ревизия весов
314480d

0 моделей