almanach / ModernCamemBERT-bio-v2-base

huggingface.co
Total runs: 19
24-hour runs: 0
7-day runs: 5
30-day runs: -68
Model's Last Updated: August 03 2026
fill-mask

Introduction of ModernCamemBERT-bio-v2-base

Model Details of ModernCamemBERT-bio-v2-base

ModernCamemBERT-bio-v2-base

ModernCamemBERT-bio-v2-base is a French biomedical encoder for document-level tasks. It is obtained by continuing the pretraining of ModernCamemBERT-bio-base with an OntoBook phase, with an 8,192-token context window. On our French biomedical document benchmark it reaches 70.0 micro-F1 at 150M parameters. A larger version is available as ModernCamemBERT-bio-v2-large .

Authors

Rian Touchent and Eric de la Clergerie
Sorbonne Université, Inria Paris

Overview

ModernCamemBERT-bio is already adapted to French biomedical text through a CLM detour. The v2 variant adds a second continued-pretraining phase that we call OntoBook. Instead of plain masked language modeling, we train on ontology-grounded synthetic textbooks built from CIM-10, CCAM and ATC ontology walks, mixed with clinical text. The aim is to inject structured coding knowledge without adding a task-specific head. This is the base-size document specialist.

Architecture ModernBERT
Parameters 150M
Context length 8,192 tokens
Language French
Base model almanach/ModernCamemBERT-bio-base
Usage
from transformers import AutoTokenizer, AutoModelForMaskedLM

model_id = "rntc/ModernCamemBERT-bio-v2-base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id)

text = "Le patient présente une [MASK] aiguë du myocarde."
inputs = tokenizer(text, return_tensors="pt")
logits = model(**inputs).logits
i = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)
print(tokenizer.decode(logits[0, i].argmax(-1)))
Evaluation

Per-task results on the document core of our French biomedical benchmark, scored with micro-F1 and averaged over nine seeds.

Model FrACCO-30 FrACCO-100 CANTEMIST MORFITT MedDialog-FR Avg
ModernCamemBERT-bio-v2-large 82.0 67.8 74.6 74.3 65.2 72.8
ModernCamemBERT-bio-v2-base 78.0 63.7 70.9 73.5 63.7 70.0
ModernCamemBERT-bio-base 74.2 61.1 71.2 72.9 63.7 68.6
DoctoModernBERT 74.0 58.3 69.3 73.9 64.7 68.0
DrBERT 54.2 39.6 41.2 71.0 64.1 54.0
DoctoBERT 51.6 34.7 36.2 73.5 62.1 51.6
CamemBERT-bio 44.0 22.3 17.7 70.9 45.8 40.1

At base size, ModernCamemBERT-bio-v2-base leads the average and scores 1.4 points above its ModernCamemBERT-bio-base starting point. ModernCamemBERT-bio-v2-large scores 2.8 points higher at 350M parameters.

Environmental impact

The OntoBook phase reported here ran for about 1.3 GPU-hours on a single H100, on the Jean Zay cluster (GENCI-IDRIS) in France. We estimate roughly 0.04 kg CO2eq for this phase. This figure covers the continued-pretraining step only and does not include the pretraining of the base model.

License

MIT

Citation
@inproceedings{touchent:hal-05697506,
  TITLE = {{OntoBook: Ontology-Grounded Synthetic Textbooks for Medical Encoder Pretraining}},
  AUTHOR = {Touchent, Rian and de la Clergerie, {\'E}ric},
  URL = {https://hal.science/hal-05697506},
  BOOKTITLE = {{Proceedings of Knowledge Graphs and Large Language Models Workshop}},
  ADDRESS = {Palma de Mallorca, Spain},
  YEAR = {2026},
  MONTH = May,
  PDF = {https://hal.science/hal-05697506v1/file/main.pdf},
  HAL_ID = {hal-05697506},
  HAL_VERSION = {v1},
}

@misc{touchent2026causallanguagemodelingdetour,
  title={A Causal Language Modeling Detour Improves Encoder Continued Pretraining},
  author={Rian Touchent and Eric de la Clergerie},
  year={2026},
  eprint={2605.12438},
  archivePrefix={arXiv},
  primaryClass={cs.CL},
  url={https://arxiv.org/abs/2605.12438},
}

Runs of almanach ModernCamemBERT-bio-v2-base on huggingface.co

19
Total runs
0
24-hour runs
2
3-day runs
5
7-day runs
-68
30-day runs

More Information About ModernCamemBERT-bio-v2-base huggingface.co Model

More ModernCamemBERT-bio-v2-base license Visit here:

https://choosealicense.com/licenses/mit

ModernCamemBERT-bio-v2-base huggingface.co

ModernCamemBERT-bio-v2-base huggingface.co is an AI model on huggingface.co that provides ModernCamemBERT-bio-v2-base's model effect (), which can be used instantly with this almanach ModernCamemBERT-bio-v2-base model. huggingface.co supports a free trial of the ModernCamemBERT-bio-v2-base model, and also provides paid use of the ModernCamemBERT-bio-v2-base. Support call ModernCamemBERT-bio-v2-base model through api, including Node.js, Python, http.

ModernCamemBERT-bio-v2-base huggingface.co Url

https://huggingface.co/almanach/ModernCamemBERT-bio-v2-base

almanach ModernCamemBERT-bio-v2-base online free

ModernCamemBERT-bio-v2-base huggingface.co is an online trial and call api platform, which integrates ModernCamemBERT-bio-v2-base's modeling effects, including api services, and provides a free online trial of ModernCamemBERT-bio-v2-base, you can try ModernCamemBERT-bio-v2-base online for free by clicking the link below.

almanach ModernCamemBERT-bio-v2-base online free url in huggingface.co:

https://huggingface.co/almanach/ModernCamemBERT-bio-v2-base

ModernCamemBERT-bio-v2-base install

ModernCamemBERT-bio-v2-base is an open source model from GitHub that offers a free installation service, and any user can find ModernCamemBERT-bio-v2-base on GitHub to install. At the same time, huggingface.co provides the effect of ModernCamemBERT-bio-v2-base install, users can directly use ModernCamemBERT-bio-v2-base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

ModernCamemBERT-bio-v2-base install url in huggingface.co:

https://huggingface.co/almanach/ModernCamemBERT-bio-v2-base

Url of ModernCamemBERT-bio-v2-base

ModernCamemBERT-bio-v2-base huggingface.co Url

Provider of ModernCamemBERT-bio-v2-base huggingface.co

almanach
ORGANIZATIONS

Other API from almanach