Views
No views yet

| Architecture | ModernBERT |
|---|---|
| Parameters | 350M |
| Context length | 8,192 tokens |
| Language | French |
| Base model | almanach/ModernCamemBERT-bio-large |
1from transformers import AutoTokenizer, AutoModelForMaskedLM
2
3model_id = "rntc/ModernCamemBERT-bio-v2-large"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForMaskedLM.from_pretrained(model_id)
6
7text = "Le patient présente une [MASK] aiguë du myocarde."
8inputs = tokenizer(text, return_tensors="pt")
9logits = model(**inputs).logits
10i = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)
11print(tokenizer.decode(logits[0, i].argmax(-1)))| 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 |
1@inproceedings{touchent:hal-05697506,
2 TITLE = {{OntoBook: Ontology-Grounded Synthetic Textbooks for Medical Encoder Pretraining}},
3 AUTHOR = {Touchent, Rian and de la Clergerie, {\'E}ric},
4 URL = {https://hal.science/hal-05697506},
5 BOOKTITLE = {{Proceedings of Knowledge Graphs and Large Language Models Workshop}},
6 ADDRESS = {Palma de Mallorca, Spain},
7 YEAR = {2026},
8 MONTH = May,
9 PDF = {https://hal.science/hal-05697506v1/file/main.pdf},
10 HAL_ID = {hal-05697506},
11 HAL_VERSION = {v1},
12}
13
14@misc{touchent2026causallanguagemodelingdetour,
15 title={A Causal Language Modeling Detour Improves Encoder Continued Pretraining},
16 author={Rian Touchent and Eric de la Clergerie},
17 year={2026},
18 eprint={2605.12438},
19 archivePrefix={arXiv},
20 primaryClass={cs.CL},
21 url={https://arxiv.org/abs/2605.12438},
22}