/ Модель

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

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

docto-s1-modernbert-fr-base-v0.1

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

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

41скачиваний за 30 дней0лайковвеса обновлены2 окт 2026

Бенчмарки

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

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

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

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

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

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

Docto-S1 ModernBERT-fr-base-v0.1 — французская медицинская модель для оценки вариантов ответа, разработанная на основе DoctoModernBERT-fr-base. Это энкодер ModernBERT с 149 млн параметров, дообученный на наборе medical-s1-fr-v0.1; он присваивает каждому варианту вероятность за один проход и рассчитан на быстрые решения по сообщениям пациентов, клиническим заметкам и описаниям случаев. Контекст составляет 8 192 токена, формат весов — Safetensors, лицензия — Apache-2.0.

Модель подходит для медицинской сортировки обращений, определения срочности и тревожных признаков, маршрутизации к специалисту, классификации намерений и проверки соблюдения правил. Лучше всего работает на задачах, близких к обучающим; для новых задач возможно применение без дообучения. В опубликованной оценке на медицинском бенчмарке показаны средняя точность 81,04% и медианная задержка 8 мс на H100, однако результаты зависят от задачи и условий проверки.

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

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

🩺 Docto-S1 ModernBERT-fr-base (v0.1)

Medical System One benchmark

✨ Summary

Docto-S1 is a family of French medical decision models. You give a text (a patient message, a clinical note, a case report), a question and the possible answers, and the model returns one probability per answer.

This model is the encoder of the family: a 150M-parameter ModernBERT fine-tuned from DoctoModernBERT-fr-base. It scores every option in one forward pass, which makes it the smallest and fastest model of the family, several times faster than the LLM versions on the same hardware.

The task is defined at inference time by the instruction, the question and the answers. Tasks close to the training ones work best, and new tasks can be tried zero-shot.

🎯 Use cases

areaexamples
Patient messagesurgency level, red flags, triage, specialty routing, health topic
Practice inboxrequest intent, who should answer, visit motive, reminder replies
Assistant safetyinput guardrail, answer compliance, rule and rubric checks, personal identifiers
Clinical textassertion and temporality, medications, allergies, note sections, claim support
Coding and documentsICD-10 chapter, document type, article specialty, passage relevance

🚀 Usage

import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer

repo = "bofenghuang/docto-s1-modernbert-fr-base-v0.1"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForMaskedLM.from_pretrained(repo, dtype=torch.bfloat16).eval().to("cuda")
ONE, ZERO = tok.encode("1", add_special_tokens=False)[-1], tok.encode("0", add_special_tokens=False)[-1]


def decide(task, question, options, context=None, profile=None, item=None, kind="choice"):
    """options: [(key, definition)]. kind: "choice", "score" (levels in order) or "noul" (one option: the proposition)."""
    parts = [f"[TASK] {task}"]
    if profile:
        parts.append(f"[PROFILE] {profile}")
    if context:
        parts.append(f"[CONTEXT]\n{context}")
    if item:
        parts.append(f"[ITEM] {item}")
    parts += [f"[QUESTION] {question}", "[OPTIONS]"]
    parts += [f"({i}) {d} -> [unused0] {tok.mask_token}" for i, (_, d) in enumerate(options, 1)]
    enc = tok("\n".join(parts), return_tensors="pt").to(model.device)
    with torch.no_grad():
        logits = model(**enc).logits[0]
    s = logits[enc.input_ids[0] == tok.mask_token_id][:, [ONE, ZERO]].float()
    s = s[:, 0] - s[:, 1]  # one score per option: logit("1") - logit("0") at its mask
    if kind == "noul":
        return torch.sigmoid(s[0]).item()  # P(true)
    return dict(zip([k for k, _ in options], torch.softmax(s, -1).tolist()))


decide(task="Déterminer la conduite à tenir la plus appropriée face à ce message.",
       profile="Patient : homme, 58 ans. Antécédents : hypertension.",
       context="Patient : Bonjour, j'ai une douleur dans la poitrine qui serre depuis 30 minutes et qui descend dans le bras gauche.",
       question="Quel niveau d'urgence correspond à cette situation ?",
       options=[("home_care", "Pas d'urgence : auto-surveillance à domicile chez un adulte sans fragilité, ou demande sans symptôme."),
                ("consult_48h", "Consultation dans les 48 heures : médecin traitant, sans caractère de gravité mais qui dure ou gêne."),
                ("same_day", "Consultation le jour même : signe préoccupant sans détresse vitale."),
                ("emergency_now", "Urgence immédiate : appeler le 15 ou se rendre immédiatement aux urgences.")],
       kind="score")
# -> {'home_care': 0.001, 'consult_48h': 0.000, 'same_day': 0.001, 'emergency_now': 0.998}

decide(task="Dire si le signe indiqué est décrit comme présent chez l'enfant dans la conversation.",
       profile="Enfant : bébé de 4 mois, garçon",
       context="Parent : Bonjour, mon fils a 39 de fièvre depuis ce matin, il ne boit presque plus ses biberons et il est très mou.",
       item="Signe : nourrisson de moins de 6 mois qui boit nettement moins que d'habitude",
       question="Ce signe est-il présent d'après le parent ?",
       options=[("present", "Oui, le parent décrit ce signe comme présent.")],
       kind="noul")
# -> 0.97
  • Write each option as a full French sentence: the model reads the definitions. For choice, option order does not matter. For score, keep the levels in order.
  • For noul, pass a single option (the proposition) and read P(true).
  • The text is French and the tags ([TASK], [CONTEXT]...) are English. Leave out empty fields. The context window is 8,192 tokens: if a text is too long, shorten the context, not the options.

📊 Evaluation

Results on the Medical System One benchmark: 12 decision tasks on real French patient messages and two clinical datasets (DiaMed, MORFITT). The benchmark repository has the data and the evaluation code.

modelmean accuracy [95% CI]mean ECE [95% CI]order consistency [95% CI]latency p50 (ms)
Docto-S1
Docto-S1 ModernBERT-fr-base (this model)81.04 [79.59, 82.39]6.54 [5.51, 7.68]94.19 [92.47, 95.72]8
Docto-S1 Qwen3.5-0.8B81.85 [80.40, 83.29]7.75 [6.67, 8.86]93.57 [91.75, 95.16]37
Docto-S1 Qwen3.5-2B84.91 [83.57, 86.20]7.25 [6.34, 8.24]94.86 [93.58, 95.99]36
Docto-S1 Gemma-4-E2B84.94 [83.65, 86.24]7.07 [6.09, 8.11]92.10 [90.11, 93.93]25
Docto-S1 MedGemma-1.5-4B86.25 [85.00, 87.57]7.78 [6.91, 8.74]95.09 [93.67, 96.38]41
Docto-S1 Qwen3.5-4B88.94 [87.90, 90.06]7.91 [7.13, 8.69]96.98 [95.89, 97.92]47
Docto-S1 Gemma-4-E4B90.13 [89.11, 91.10]7.79 [7.00, 8.61]95.15 [93.86, 96.30]27
Small LLMs (zero-shot)
Qwen3.5-0.8B47.80 [45.96, 49.54]23.07 [21.49, 24.65]36.80 [34.52, 39.16]37
Qwen3.5-2B60.12 [58.31, 61.99]17.32 [15.94, 18.87]58.15 [55.10, 61.41]36
Gemma-4-E2B76.49 [75.08, 77.91]21.27 [19.91, 22.59]78.85 [76.46, 81.28]25
MedGemma-1.5-4B59.00 [57.18, 60.79]23.49 [22.13, 24.95]45.57 [42.65, 48.43]41
Qwen3.5-4B77.79 [76.15, 79.44]9.81 [8.51, 11.15]73.88 [71.05, 76.69]47
Gemma-4-E4B80.74 [79.25, 82.25]14.20 [12.91, 15.49]81.72 [79.30, 83.96]27
Frontier LLMs
Gemini-2.5-Flash-Lite83.74 [82.53, 85.01]12.88 [11.75, 14.00]84.40 [81.90, 86.55]312
Gemini-2.5-Flash84.02 [82.49, 85.51]11.71 [10.40, 13.10]79.91 [77.19, 82.68]361
Decision models
Jev89.65 [88.57, 90.71]9.54 [8.78, 10.36]93.09 [91.31, 94.79]239
OpenJev88.15 [86.89, 89.41]10.42 [9.52, 11.35]90.06 [87.67, 92.42]83
Kev-4B81.98 [80.69, 83.27]18.63 [17.51, 19.68]89.24 [87.22, 91.13]46
Kev-9B82.25 [80.86, 83.53]15.85 [14.74, 16.91]89.35 [87.27, 91.34]46
BioDecision-4B77.88 [76.42, 79.38]9.30 [8.19, 10.40]88.32 [86.46, 90.04]41
Laya-Multilingual32.95 [31.33, 34.43]30.61 [29.17, 32.17]18.60 [16.45, 20.93]12

This model on each task:

tasknaccuracy [95% CI]ECE
noul:triage_need (silver)53291.92 [89.66, 94.17]2.23
choice:specialty_referral (silver)82489.32 [87.14, 91.26]1.85
score:urgency_level (silver)1,20873.18 [70.78, 75.75]1.71
noul:symptom_presence (silver)32582.15 [77.85, 86.15]7.45
choice:symptom_severity (silver)1,06672.61 [69.70, 75.14]4.22
noul:routine_request (silver)10288.24 [82.33, 94.12]9.90
choice:request_guardrail (silver)5682.14 [71.43, 91.07]10.97
choice:health_topic (silver)23787.34 [83.12, 91.14]5.10
noul:health_topic (silver)24793.93 [91.09, 96.76]5.47
choice:diagnosis_coding (gold, DiaMed)15466.23 [58.44, 73.38]14.76
choice:article_specialty (gold, MORFITT)74561.88 [58.66, 65.23]9.96
mixed:audited_patient_messages (audit)20083.50 [78.50, 88.50]4.90
  • All scores are percentages. Labels: silver = Qwen3.8-27B and Qwen3.5-122B-A10B agree on the answer, gold = human labels of the dataset, audit = blind relabelling by another model.
  • 95% CIs from 1,000 bootstrap resamples of the items in each task. Order consistency: share of answers that stay the same when the options of the 6 choice tasks are shown in 3 different orders.
  • Latency: median time for one request, on one H100 in BF16 (OpenJev in FP8), without inference optimisation. Jev and Gemini are timed from the client, network included.

🏋️ Training

Full fine-tune of DoctoModernBERT-fr-base for 2 epochs on medical-s1-fr-v0.1 (943,013 decision records, 108 tasks). The target of each record is half the correct answer and half the answer distribution of Qwen3.8-27B.

⚠️ Limitations

  • This is a research model, not a medical device, and it has not been validated clinically. Keep a human in the loop.
  • It can under-estimate urgency. Do not use it as the only safety net for triage.
  • It is weaker on tasks far from the training tasks and on medical knowledge questions.
  • Most training labels come from one model family (Qwen), so the model shares its conventions and its errors.
  • French only. Check calibration on your own task before choosing a threshold.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertForMaskedLM
Ревизия весов
db58cd5

0 моделей