Downloads · 30 days
20
2% of all-time downloads
abazoge/DrLongformer
DrLongformer is a fill-mask model from abazoge. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as apache-2.0.
<span style="font-size:larger;"DrLongformer</span is a French pretrained Longformer model based on Clinical-Longformer that was further pretrained on the NACHOS dataset (same dataset as DrBERT). This model allows up t…
Downloads · 30 days
20
2% of all-time downloads
All-time downloads
957
Public
Repo size
1.2 GB
Likes
1
Public
Click a slice to open those files.
.bin595 MB · 99%
From the Hugging Face model README
<span style="font-size:larger;">DrLongformer</span> is a French pretrained Longformer model based on Clinical-Longformer that was further pretrained on the NACHOS dataset (same dataset as DrBERT). This model allows up to 4,096 tokens as input. DrLongformer consistently outperforms medical BERT-based models across most downstream tasks regardless of sequence length, except on NER tasks. Evaluated downstream tasks cover named entity recognition (NER), question answering (MCQA), Semantic textual similarity (STS) and text classification tasks (CLS) from DrBenchmark. For more details, please refer to our paper: Adaptation of Biomedical and Clinical Pretrained Models to French Long Documents: A Comparative Study.
We explored multiple strategies for the adaptation of Longformer models to the French medical domain:
All Pretraining scripts to reproduce the experiments are available in this Github repository: DrLongformer.
For the from scratch and further pretraining strategies, the training scripts are the same as DrBERT, only the bash scripts are different and available in this repository.
All models were trained on the Jean Zay French supercomputer.
| Model name | Corpus | Pretraining strategy | Sequence Length | Model URL |
|---|---|---|---|---|
DrLongformer (DrLonformer-CP) | NACHOS 7 GB | Further pretraining of Clinical-Longformer | 4096 | HuggingFace |
DrBERT-4096 | NACHOS 7 GB | Conversion of DrBERT-7B to the Longformer architecture | 4096 | HuggingFace |
DrLongformer-FS (from scratch) | NACHOS 7 GB | Pretraining from scratch | 4096 | Not available |
You can use DrLongformer directly from Hugging Face's Transformers:
# !pip install transformers
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("abazoge/DrLongformer")
model = AutoModelForMaskedLM.from_pretrained("abazoge/DrLongformer")
@misc{bazoge2024adaptation,
title={Adaptation of Biomedical and Clinical Pretrained Models to French Long Documents: A Comparative Study},
author={Adrien Bazoge and Emmanuel Morin and Beatrice Daille and Pierre-Antoine Gourraud},
year={2024},
eprint={2402.16689},
archivePrefix={arXiv},
primaryClass={cs.CL}
}