Views
No views yet

| Model name | Corpus | Number of layers | Attention Heads | Embedding Dimension | Sequence Length | Model URL |
|---|---|---|---|---|---|---|
DrBERT-7-GB-cased-Large | NACHOS 7 GB | 24 | 16 | 1024 | 512 | HuggingFace |
DrBERT-7-GB-cased | NACHOS 7 GB | 12 | 12 | 768 | 512 | HuggingFace |
DrBERT-4-GB-cased | NACHOS 4 GB | 12 | 12 | 768 | 512 | HuggingFace |
DrBERT-4-GB-cased-CP-CamemBERT | NACHOS 4 GB | 12 | 12 | 768 | 512 | HuggingFace |
DrBERT-4-GB-cased-CP-PubMedBERT | NACHOS 4 GB | 12 | 12 | 768 | 512 | HuggingFace |
1from transformers import AutoModel, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("Dr-BERT/DrBERT-7GB")
4model = AutoModel.from_pretrained("Dr-BERT/DrBERT-7GB")1from transformers import pipeline
2
3fill_mask = pipeline("fill-mask", model="Dr-BERT/DrBERT-7GB", tokenizer="Dr-BERT/DrBERT-7GB")
4results = fill_mask("La patiente est atteinte d'une <mask>")1accelerate @ git+https://github.com/huggingface/accelerate@66edfe103a0de9607f9b9fdcf6a8e2132486d99b
2datasets==2.6.1
3sentencepiece==0.1.97
4protobuf==3.20.1
5evaluate==0.2.2
6tensorboard==2.11.0
7torch >= 1.3from_scratch or continued_pretraining directory.Use In Transformers button and get the Git link git clone https://huggingface.co/roberta-base../corpus.txt by using ./build_tokenizer.sh.tokenizer_path of the shell script to match the path of your tokenizer directory downloaded before using HuggingFace Git or the one you have build../preprocessing_dataset.sh to generate the tokenized dataset by using the givent tokenizer.--ntasks=128 you are needing to match your computational capabilities in the shell script called run_training.sh. In our case, we used 128 V100 32 GB GPUs from 32 nodes of 4 GPUs (--ntasks-per-node=4 and --gres=gpu:4) during 20 hours (--time=20:00:00).-A flag to match one of your @gpu profile capable of running the job. You also need to move ALL of your datasets, tokenizer, script and outputs on the $SCRATCH disk space to preserve others users of suffuring of IO issues.--model_type="camembert" and to update the --config_overrides= according to the specifications of the architecture you are trying to train. In our case, RoBERTa had a 514 sequence length, a vocabulary of 32005 (32K tokens of the tokenizer and 5 of the model architecture) tokens, the identifier of the beginning-of-sentence token (BOS) and end-of-sentence token (EOS) are respectivly 5 and 6. Change the./from_scratch/ directory.sbatch ./run_training.sh to send the training job in the SLURM queue.--model_name_or_path= / --tokenizer_name= to the path of the model downloaded from HuggingFace's Git in the section 3.3../continued_pretraining/ directory.sbatch ./run_training.sh to send the training job in the SLURM queue.Dr-BERT/DrBERT-7GB in any of the examples given by HuggingFace's team here.1@inproceedings{labrak2023drbert,
2 title = {{DrBERT: A Robust Pre-trained Model in French for Biomedical and Clinical domains}},
3 author = {Labrak, Yanis and Bazoge, Adrien and Dufour, Richard and Rouvier, Mickael and Morin, Emmanuel and Daille, Béatrice and Gourraud, Pierre-Antoine},
4 booktitle = {Proceedings of the 61th Annual Meeting of the Association for Computational Linguistics (ACL'23), Long Paper},
5 month = july,
6 year = 2023,
7 address = {Toronto, Canada},
8 publisher = {Association for Computational Linguistics}
9}